:root {
  --bg: #0e0f13;
  --surface: #15171d;
  --text: #e9e6dc;
  --muted: #8d909b;
  --line: #2a2d36;
  --accent: #ffd100;
  --accent-text: #ffd100;
  --on-accent: #0e0f13;
  --link: #ffd100;
  --scene-far: #1b1e26;
  --scene-mountain: #262a35;
  --scene-snow: #d9dce4;
  --scene-sun: #ffd100;
  --condor-body: #5b6070;
  --condor-white: #e9e6dc;

  --px: 3px;
  --control: 30px;
  --font-display: "Jersey 10", ui-monospace, monospace;
  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f3ea;
    --surface: #fffdf7;
    --text: #1a1b20;
    --muted: #5f6270;
    --line: #d9d3c3;
    --accent-text: #034ea2;
    --link: #034ea2;
    --scene-far: #e7e1d1;
    --scene-mountain: #d3cbb6;
    --scene-snow: #fffdf7;
    --scene-sun: #ffd100;
    --condor-body: #2b2c33;
    --condor-white: #aaa497;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f3ea;
  --surface: #fffdf7;
  --text: #1a1b20;
  --muted: #5f6270;
  --line: #d9d3c3;
  --accent-text: #034ea2;
  --link: #034ea2;
  --scene-far: #e7e1d1;
  --scene-mountain: #d3cbb6;
  --scene-snow: #fffdf7;
  --scene-sun: #ffd100;
  --condor-body: #2b2c33;
  --condor-white: #aaa497;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.7 var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

svg.px {
  display: inline-block;
  flex: none;
  shape-rendering: crispEdges;
  vertical-align: middle;
}

.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

/* pixel border: four hard shadows leave the corners notched */
.pixel-box,
.btn,
.card,
.chips li,
.lang,
.theme-toggle {
  background: var(--surface);
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--line),
    0 var(--px) 0 0 var(--line),
    calc(-1 * var(--px)) 0 0 0 var(--line),
    var(--px) 0 0 0 var(--line);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--on-accent);
}

/* top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo {
  font: 700 16px var(--font-pixel);
  color: var(--text);
  letter-spacing: 0.02em;
}

.logo:hover {
  text-decoration: none;
}

.logo-prompt {
  color: var(--accent-text);
  margin-right: 6px;
}

.cursor {
  color: var(--accent-text);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font: 400 13px var(--font-pixel);
}

.nav a {
  color: var(--muted);
}

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

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang {
  display: flex;
  margin: var(--px);
}

.lang a,
.theme-toggle {
  border: 0;
  background: none;
  color: var(--muted);
  font: 400 12px var(--font-pixel);
  cursor: pointer;
}

.lang a {
  display: grid;
  place-items: center;
  height: var(--control);
  padding: 0 10px;
}

.lang a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang a[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* same height as the language switcher; the 22px icon leaves 4px on each side */
.theme-toggle {
  display: grid;
  place-items: center;
  width: var(--control);
  height: var(--control);
  margin: var(--px);
  padding: 0;
  background: var(--surface);
  color: var(--text);
}

.theme-toggle:hover {
  color: var(--accent-text);
}

.icon-sun {
  display: none !important;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun {
    display: inline-block !important;
  }
  :root:not([data-theme="dark"]) .icon-moon {
    display: none;
  }
}

:root[data-theme="light"] .icon-sun {
  display: inline-block !important;
}

:root[data-theme="light"] .icon-moon {
  display: none;
}

/* hero */

.hero {
  padding-top: 88px;
  padding-bottom: 40px;
}

.hello {
  font: 400 14px var(--font-pixel);
  color: var(--accent-text);
}

.name {
  margin-top: 4px;
  font: 400 clamp(72px, 21vw, 120px) / 0.95 var(--font-display);
  letter-spacing: 0.01em;
}

.role {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 600;
}

.location {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
}

.bio {
  max-width: 60ch;
  margin-top: 24px;
  color: var(--text);
  opacity: 0.88;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: var(--px);
  padding: 8px 16px 8px 10px;
  color: var(--text);
  font: 400 13px var(--font-pixel);
  transition: transform 0.12s steps(2);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(calc(-1 * var(--px)));
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--accent),
    0 var(--px) 0 0 var(--accent),
    calc(-1 * var(--px)) 0 0 0 var(--accent),
    var(--px) 0 0 0 var(--accent),
    0 calc(3 * var(--px)) 0 0 color-mix(in srgb, var(--accent) 35%, transparent);
}

/* pixel landscape */

/* --s is one sprite pixel: an integer scale keeps pixels square and sharp */
.scene {
  --s: 4px;
  position: relative;
  overflow: hidden;
  border-bottom: var(--px) solid var(--line);
}

@media (min-width: 720px) {
  .scene {
    --s: 5px;
  }
}

.landscape {
  display: block;
  width: 100%;
  height: calc(36 * var(--s));
}

.scene-far {
  color: var(--scene-far);
}

.scene-mountain {
  color: var(--scene-mountain);
}

.scene-snow {
  color: var(--scene-snow);
}

.scene-sun {
  color: var(--scene-sun);
}

/* the condor glides across the sky, bobs a little and flaps now and then */
.condor {
  position: absolute;
  top: calc(3 * var(--s));
  left: calc(-35 * var(--s));
  width: calc(35 * var(--s));
  height: calc(8 * var(--s));
  animation:
    condor-fly 42s linear infinite,
    condor-bob 3s steps(1, end) infinite;
  /* start mid-flight so it is already in view when the page opens */
  animation-delay: -15s, 0s;
}

.condor-body {
  color: var(--condor-body);
}

.condor-white {
  color: var(--condor-white);
}

.condor-glide {
  animation: condor-glide 7s steps(1, end) infinite;
}

.condor-flap {
  opacity: 0;
  animation: condor-flap 7s steps(1, end) infinite;
}

@keyframes condor-fly {
  to {
    left: 100%;
  }
}

@keyframes condor-bob {
  50% {
    transform: translateY(var(--s));
  }
}

@keyframes condor-flap {
  0%,
  87%,
  93% {
    opacity: 0;
  }
  84%,
  90% {
    opacity: 1;
  }
}

@keyframes condor-glide {
  0%,
  87%,
  93% {
    opacity: 1;
  }
  84%,
  90% {
    opacity: 0;
  }
}

/* sections */

.section {
  padding-top: 72px;
}

.section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
  font: 700 22px var(--font-pixel);
}

.num {
  color: var(--accent-text);
  font-size: 14px;
}

.num::after {
  content: ".";
}

.lead {
  margin: -12px 0 28px;
  color: var(--muted);
}

/* experience */

.company + .company {
  margin-top: 44px;
}

.company-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.company h3 {
  font: 700 18px var(--font-pixel);
}

.company h3 a {
  color: var(--text);
}

.company blockquote {
  margin: 16px 0 0;
  padding-left: 16px;
  border-left: var(--px) solid var(--accent);
  font-style: italic;
  color: var(--text);
  opacity: 0.88;
}

.roles {
  position: relative;
  margin: 22px 0 0 22px;
  padding-left: 26px;
  border-left: 2px dashed var(--line);
}

.roles li {
  position: relative;
}

.roles li + li {
  margin-top: 16px;
}

.roles li::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 7px;
  width: 12px;
  height: 12px;
  background: var(--bg);
  box-shadow: inset 0 0 0 var(--px) var(--muted);
}

.roles li:first-child::before {
  background: var(--accent);
  box-shadow: none;
}

.roles h4 {
  font-size: 15px;
  font-weight: 600;
}

/* projects */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: var(--px);
  padding: 18px;
  transition: transform 0.12s steps(2);
}

.card:hover {
  transform: translateY(calc(-1 * var(--px)));
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--accent),
    0 var(--px) 0 0 var(--accent),
    calc(-1 * var(--px)) 0 0 0 var(--accent),
    var(--px) 0 0 0 var(--accent),
    0 calc(3 * var(--px)) 0 0 color-mix(in srgb, var(--accent) 35%, transparent);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 400 12px var(--font-pixel);
  color: var(--accent-text);
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.card-link {
  color: var(--text);
}

/* the whole card is clickable */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.owner {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.card p {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.langtag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.langtag::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--lang);
}

.site {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 400 12px var(--font-pixel);
}

/* skills */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.chips li {
  margin: var(--px);
  padding: 2px 10px;
  font-size: 13px;
}

/* certifications */

.certs {
  display: grid;
  gap: 20px;
}

.certs li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.certs strong {
  display: block;
  font-weight: 600;
  line-height: 1.45;
}

/* footer */

.footer {
  margin-top: 96px;
  padding: 28px 0 40px;
  border-top: 2px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .controls {
    margin-left: auto;
  }

  .hero {
    padding-top: 56px;
  }
}

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

  .cursor {
    animation: none;
  }

  .btn,
  .card {
    transition: none;
  }

  /* a still condor resting in the sky */
  .condor,
  .condor-glide,
  .condor-flap {
    animation: none;
  }

  .condor {
    left: 18%;
  }
}
