:root {
  color-scheme: dark;
  --bg: #080b14;
  --text: #e8ecf4;
  --muted: #9aa3b5;
  --border: rgb(148 163 184 / 0.18);
  --tag-bg: #1c2333;
  --tag-text: #dbe2ee;
  --dot: #51a2e9;
  --accent: #ff4d5a;
  --yellow: #ffd23f;
  --purple: #b07cff;
  --highlight: #d21f3c;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}

/* Lives on the hero only and fades to the background before the résumé starts. */
.dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  display: block;
  opacity: 0.4;
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}

main {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 20px 96px;
}

main > section:first-of-type h2 {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  letter-spacing: -0.01em;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
}

h2 {
  margin: 44px 0 12px;
  font-size: 1.25rem;
}

h3 {
  margin: 0;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

p {
  margin: 0 0 10px;
  color: var(--muted);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--dot);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Résumé header */
.intro {
  margin-bottom: 44px;
  scroll-margin-top: 64px;
}

.intro .name {
  margin: 0;
  font-size: 1.75rem;
}

.intro .title {
  margin: 4px 0 2px;
}

/* Hero */
html {
  scroll-behavior: smooth;
}

.hero {
  position: relative;
  min-height: 100svh;
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.hero h1 {
  /* "I'm a Software Engineer." is ~11em wide; scale so it fits the gutters unwrapped. */
  font-size: min(5.5rem, (100vw - 40px) / 11.2);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero .line {
  display: block;
}

.hero .sub {
  color: var(--muted);
}

/* Each line rises in a beat after the one before it. */
.hero .line,
.hero-meta {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero .sub {
  animation-delay: 0.15s;
}

.hero-meta {
  animation-delay: 0.3s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
}

.hero .hl {
  color: var(--highlight);
}

.hero .nowrap {
  white-space: nowrap;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.hero-meta .location {
  margin: 0;
}

.scroll-cue {
  position: absolute;
  bottom: 48px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(28 35 51 / 0.7);
  color: var(--text);
  font: 600 18px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  animation: bob 2s ease-in-out infinite;
  transition: border-color 0.15s, background 0.15s;
}

.scroll-cue:hover {
  border-color: var(--highlight);
  background: var(--tag-bg);
}

.scroll-cue .icon {
  width: 20px;
  height: 20px;
  color: var(--highlight);
  stroke-width: 2.5;
}

@keyframes bob {
  50% {
    translate: -50% 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-cue,
  .hero .line,
  .hero-meta {
    animation: none;
  }
}

.location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  /* A tall line box leaves the mono glyphs sitting above the icon's centre. */
  line-height: 1;
}

.location .icon {
  width: 12px;
  height: 12px;
}

.socials {
  display: flex;
  gap: 6px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.socials a:hover {
  color: var(--text);
  background: var(--tag-bg);
}

/* Work */
.job {
  margin-bottom: 28px;
}

.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.job-head img,
.project img {
  border-radius: 3px;
}

.job-head h3 a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.job-head h3 a:hover {
  text-decoration: underline;
}

.dates {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.badge {
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  font-weight: 600;
}

.role {
  margin: 2px 0 6px;
  color: var(--text);
}

.job > p:not(.role),
.job li,
.project p {
  font-size: 12px;
}

.job ul:not(.tags) {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--muted);
}

.inline-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: bottom;
}

.inline-logo img {
  border-radius: 2px;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

/* Projects */
.project {
  max-width: 320px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.project h3 {
  margin-bottom: 8px;
}

.project h3 a {
  text-decoration: none;
}

.project h3 a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .dates {
    margin-left: 0;
    width: 100%;
  }
}

@media print {
  .dots,
  .socials,
  .scroll-cue {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 0 0 24px;
  }

  .hero h1 {
    font-size: 2rem;
  }
}
