:root {
  color-scheme: light;
  --rosewater: #dc8a78;
  --mauve: #8839ef;
  --green: #40a02b;
  --teal: #179299;
  --blue: #1e66f5;
  --yellow: #df8e1d;
  --red: #d20f39;
  --text: #4c4f69;
  --subtext: #6c6f85;
  --overlay: #9ca0b0;
  --surface: #eff1f5;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --crust: #dce0e8;
  --line: #ccd0da;
  --max-width: 900px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --rosewater: #f5e0dc;
  --mauve: #cba6f7;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --blue: #89b4fa;
  --yellow: #f9e2af;
  --red: #f38ba8;
  --text: #cdd6f4;
  --subtext: #a6adc8;
  --overlay: #7f849c;
  --surface: #313244;
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --line: #45475a;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  background: var(--base);
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(var(--surface) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface) 1px, transparent 1px),
    var(--base);
  background-size: 28px 28px;
  font-family:
    "JetBrainsMono Nerd Font Mono",
    "JetBrains Mono",
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--overlay);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--green);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--mauve);
  outline-offset: 3px;
}

.resume {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 40px auto;
  padding: clamp(24px, 5vw, 56px);
  background: color-mix(in srgb, var(--base) 94%, transparent);
  border: 1px solid var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.125rem;
  margin-bottom: 2.25rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--line);
  color: var(--subtext);
  font-size: 0.8125rem;
}

.site-nav a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 800;
}

.site-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.875rem;
}

a.nav-link {
  color: var(--subtext);
  text-decoration: none;
}

a.nav-link:hover,
a.nav-link:focus-visible {
  color: var(--green);
}

a.nav-link.is-current {
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--mauve);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.44rem 0.625rem;
  color: var(--text);
  background: color-mix(in srgb, var(--mantle) 78%, transparent);
  cursor: pointer;
  font:
    700 0.75rem/1 "JetBrainsMono Nerd Font Mono",
    "JetBrains Mono",
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  color: var(--green);
}

.hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: clamp(18px, 4vw, 32px);
  align-items: start;
  margin-bottom: 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.hero__avatar {
  display: block;
  width: 112px;
  padding: 4px;
  background: var(--mantle);
  border: 1px solid var(--line);
}

.hero__avatar img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--mauve);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "$ ";
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

h2 {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  margin: 2.4rem 0 0.85rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

h2::before {
  color: var(--mauve);
  content: "./";
}

h2::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--line);
}

h3 {
  margin: 1.45rem 0 0.25rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

p {
  margin-bottom: 0.85rem;
}

ul {
  margin-bottom: 1rem;
}

.subtitle {
  max-width: 58rem;
  margin-bottom: 1rem;
  color: var(--subtext);
  font-size: 0.95rem;
  font-weight: 700;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.downloads a,
.resume-body > p:nth-of-type(2) a {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.22rem 0.55rem;
  color: var(--blue);
  background: var(--mantle);
  border: 1px solid var(--line);
  text-decoration: none;
}

.downloads a:hover,
.downloads a:focus,
.resume-body > p:nth-of-type(2) a:hover,
.resume-body > p:nth-of-type(2) a:focus {
  color: var(--crust);
  background: var(--green);
  border-color: var(--green);
}

.resume-body > h1,
.resume-body > p:first-of-type {
  display: none;
}

.resume-body > p:nth-of-type(2) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.75rem 0 2rem;
  color: transparent;
}

.resume-body > p:nth-of-type(2) a {
  color: var(--teal);
}

.resume-body > h2:first-of-type + p,
.resume-body > h2:first-of-type + p + p {
  max-width: 74ch;
}

.resume-body > h2:first-of-type + p {
  color: var(--text);
}

.resume-body > ul {
  padding-left: 1.25rem;
}

li {
  margin: 0.45rem 0;
  padding-left: 0.15rem;
}

li::marker {
  color: var(--yellow);
}

.role {
  margin: 0.8rem 0 0.2rem;
  color: var(--mauve);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role + p {
  margin-top: 0;
  color: var(--subtext);
}

.site-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--subtext);
  font-size: 0.78rem;
}

.site-note span:first-child,
.site-note span:nth-child(2) {
  color: var(--green);
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .resume {
    width: calc(100% - 18px);
    margin: 9px auto;
    padding: 20px;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero__avatar {
    width: 96px;
  }

}

@media print {
  :root {
    --base: #ffffff;
    --mantle: #ffffff;
    --text: #000000;
    --subtext: #333333;
    --line: #cccccc;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 10.5pt;
  }

  .resume {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #ffffff;
  }

  .downloads,
  .site-nav,
  .site-note {
    display: none;
  }

  .hero {
    grid-template-columns: 84px 1fr;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .hero__avatar {
    width: 84px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .hero__avatar img {
    border: 1px solid #cccccc;
  }

  h1 {
    font-size: 28pt;
  }

  h2 {
    break-after: avoid;
    margin-top: 14pt;
    color: #000000;
  }

  h2::after {
    background: #cccccc;
  }

  .resume-body > p:nth-of-type(2) {
    display: block;
    color: #000000;
  }

  .resume-body > p:nth-of-type(2) a {
    display: inline;
    padding: 0;
    color: #000000;
    background: transparent;
    border: 0;
  }

  h3,
  p,
  li {
    break-inside: avoid;
  }
}
