:root {
  --bg: #e7e7ea;
  --pass: #ffffff;
  --pass-hover: #ffffff;
  --ink: #16161b;
  --muted: #5a5a66;
  --label: #666672;
  --perf: #cfcfd6;
  --shadow: 0 1px 2px rgba(22, 22, 27, 0.06), 0 8px 24px rgba(22, 22, 27, 0.06);
  --shadow-hover: 0 2px 4px rgba(22, 22, 27, 0.08), 0 14px 32px rgba(22, 22, 27, 0.1);
  --linkpass: #ff7a2f;
  --onset: #8aa8ff;
  --done: #5ed39a;
  /* The same hues darkened to 3:1 on the white card, for the small arrows */
  --linkpass-arrow: #ec6814;
  --onset-arrow: #708ce1;
  --done-arrow: #22a36e;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0e;
    --pass: #1b1b21;
    --pass-hover: #222229;
    --ink: #f1f0ec;
    --muted: #a9a8b3;
    --label: #8f8e9a;
    --perf: #3a3a45;
    --shadow: none;
    --shadow-hover: none;
    --linkpass-arrow: var(--linkpass);
    --onset-arrow: var(--onset);
    --done-arrow: var(--done);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 20px clamp(40px, 7vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Language switcher */

.lang {
  display: flex;
  justify-content: flex-end;
  margin: 0 -8px -24px 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--label);
  text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline 2px var(--es-red);
  text-underline-offset: 6px;
}
@media (prefers-color-scheme: dark) {
  .lang a[aria-current="page"] { text-decoration-color: var(--es-gold); }
}
.lang a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
  border-radius: 8px;
}

/* Passes */

.pass {
  position: relative;
  display: block;
  border-radius: 20px;
  background: var(--pass);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.perf {
  position: relative;
  margin: 0 22px;
  border-top: 2px dashed var(--perf);
}
.perf::before,
.perf::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
}
.perf::before { left: -34px; }
.perf::after { right: -34px; }

/* Intro pass */

.hero { border-radius: 24px; }

.hero-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 28px 26px;
}

/* The 14vw cap only kicks in with enlarged text, where the rem sizes would
   push the logo out of the card */
.wordmark {
  margin: 0;
  font-size: min(clamp(2.5rem, 9vw, 3.75rem), 14vw);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

/* Logo colors */
:root {
  --br-green: #009c3b;
  --br-blue: #002776;
  --es-red: #c60b1e;
  --es-gold: #d9a400;
}
@media (prefers-color-scheme: dark) {
  :root {
    --br-green: #22c35e;
    --br-blue: #5b8cff;
    --es-red: #ff4f5e;
    --es-gold: #ffd21f;
  }
}

.wm-br,
.wm-es {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wm-br { background-image: linear-gradient(90deg, var(--br-green) 10%, var(--br-blue) 90%); }
.wm-es { background-image: linear-gradient(180deg, var(--es-red) 51%, var(--es-gold) 51% 64%, var(--es-red) 64%); }
.wm-dot { display: inline-block; color: var(--es-gold); }

/* Plays once on load: the dot appears, drops and the color comes in as it falls */
.wm-br,
.wm-es { animation: wm-ink 1.62s cubic-bezier(0.3, 0.7, 0.4, 1) 0.5s both; }
.wm-dot { animation: wm-dot 1.62s cubic-bezier(0.3, 0.7, 0.4, 1) 0.5s both; }

@keyframes wm-ink {
  0%, 37% { color: var(--ink); }
  74%, 100% { color: transparent; }
}
@keyframes wm-dot {
  0% { max-width: 0; opacity: 0; transform: translateY(-0.9em); color: var(--ink); }
  37% { max-width: 0.5em; opacity: 1; transform: translateY(-0.9em); color: var(--ink); }
  74% { transform: translateY(0); color: var(--es-gold); }
  89% { transform: translateY(-0.14em); }
  100% { max-width: 0.5em; opacity: 1; transform: translateY(0); color: var(--es-gold); }
}

.fields {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 24px;
}
.fields div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fields dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}
.fields dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}
.role {
  display: flex;
  align-items: center;
}

/* 28px target around a 20px logo: 4px margin plus 4px inner space make the
   8px gap after the text, and the negative block margins keep the row height */
.linkedin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px 0 -4px 4px;
  border-radius: 4px;
  color: var(--ink);
}
.linkedin:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.bio {
  margin: 0;
  padding: 24px 28px 28px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* Project passes */

.projects {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.intro {
  margin: 0 0 4px 4px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.project:hover {
  transform: translateY(-2px);
  background: var(--pass-hover);
  box-shadow: var(--shadow-hover);
}
.project:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.project-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
}

.icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app);
  color: #16161b;
  font-size: 1.375rem;
  font-weight: 800;
}

.text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.name {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.line {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.stub {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 16px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--label);
}
.stub > :first-child { overflow-wrap: anywhere; }
.open {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}
.arrow {
  color: var(--app-arrow);
  transition: transform 0.15s ease;
}
.project:hover .arrow { transform: translate(2px, -2px); }

@media (prefers-reduced-motion: reduce) {
  .wm-br, .wm-es, .wm-dot { animation: none; }
  .project, .arrow { transition: none; }
  .project:hover, .project:hover .arrow { transform: none; }
}
