/* Tokens */
:root {
  --paper: #eef1f5;
  --ink: #18202b;
  --muted: #5a6575;
  --rule: #c8d0db;
  --accent: #2b44d6;
  --accent-soft: #dfe4fb;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, sans-serif;

  --rail: 2.75rem;          /* column the commit graph lives in */
  --node: 0.875rem;         /* commit dot diameter */
  --line: 2px;
  --measure: 38rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121821;
    --ink: #e5e9f0;
    --muted: #93a0b2;
    --rule: #2b3544;
    --accent: #8e9fff;
    --accent-soft: #232c4a;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Graph: one continuous line from the name down to the first job */
.graph {
  position: relative;
  max-width: calc(var(--measure) + var(--rail) + 2rem);
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 1rem 3rem calc(var(--rail) + 1rem);
}

.graph::before {
  content: "";
  position: absolute;
  left: calc(1rem + var(--node) / 2 - var(--line) / 2);
  top: calc(clamp(3rem, 10vh, 7rem) + 1.1rem);
  bottom: 3rem;
  width: var(--line);
  background: var(--accent);
  transform-origin: top;
  animation: draw 1.4s cubic-bezier(.6, 0, .2, 1) .15s both;
}

@keyframes draw { from { transform: scaleY(0); } }

.node { position: relative; }
.node::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--rail));
  top: 0.45em;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: var(--paper);
  border: var(--line) solid var(--accent);
}
.node--head::before {
  top: 1.1rem;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.node--root::before { background: var(--accent); }
/* Hide the line below the oldest job: the graph starts there */
.node--root::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--rail) - 2px);
  top: calc(0.45em + var(--node));
  bottom: -3rem;
  width: calc(var(--node) + 4px);
  background: var(--paper);
}

/* Hero */
.hero { padding-bottom: clamp(4rem, 12vh, 8rem); }

.hero__hello {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero__name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.5rem, 15vw, 8.5rem);
  font-weight: 800;
  font-stretch: 78%;
  font-variation-settings: "opsz" 96;
  line-height: 0.86;
  letter-spacing: -0.035em;
}

.hero__role {
  max-width: 30rem;
  margin: 2rem 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  font-weight: 500;
}

/* Experience */
.section-title {
  margin: 0 0 2.5rem;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job { padding-bottom: 3rem; }
.job:last-child { padding-bottom: 0; }

.job__when {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.job__role {
  margin: 0.25rem 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 650;
  font-stretch: 90%;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.job__org {
  margin: 0.125rem 0 0;
  color: var(--muted);
}

.job__about {
  margin: 1rem 0 0;
}

.job__notes {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}
.job__notes li + li { margin-top: 0.375rem; }
.job__notes li::marker { color: var(--accent); }

.job__stack {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Footer */
.footer {
  max-width: calc(var(--measure) + var(--rail) + 2rem);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem calc(var(--rail) + 1rem);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer p { margin: 0; }

/* Small screens: tighten the rail */
@media (max-width: 30rem) {
  :root { --rail: 2rem; }
  .hero__role { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .graph::before { animation: none; }
}
