@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/webfonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/webfonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1d2021;
  --fg: #ebdbb2;
  --fg-muted: #a89984;
  --accent: #8ec07b;
  --link: #83a598;
  --link-hover: #fabd2f;
  --rule: #504945;

  --section-about: #fe8019;
  --section-status: #b8bb26;
  --section-experience: #b16286;
  --section-skills: #d79921;
  --section-projects: #d3869b;
  --section-links: #8ec07b;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 6rem) 1.25rem;
  animation: fade-in 300ms ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

header .tagline {
  font-size: 1rem;
  color: var(--fg-muted);
  margin: 0.25rem 0 0 0;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

section {
  margin-top: 2rem;
}

section h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: lowercase;
  margin: 0;
  padding-left: 1rem;
}

#about h2      { color: var(--section-about); }
#status h2     { color: var(--section-status); }
#experience h2 { color: var(--section-experience); }
#skills h2     { color: var(--section-skills); }
#projects h2   { color: var(--section-projects); }
#links h2      { color: var(--section-links); }

section > p,
section > dl,
section > .entries {
  margin: 0.5rem 0 0 0;
  padding-left: 2.5rem;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  align-items: baseline;
}

.entry {
  border-left: 2px solid var(--section-experience);
  padding-left: 1rem;
}

.entry .role {
  font-weight: 700;
  color: var(--section-experience);
}

.entry .dates,
.entry .org {
  color: var(--fg-muted);
}

.entry .dates {
  white-space: nowrap;
}

.entry p {
  margin: 0.25rem 0 0 0;
  max-width: 56ch;
}

section > p {
  max-width: 56ch;
}

dl {
  display: grid;
  grid-template-columns: 8rem 1fr;
  row-gap: 0.25rem;
}

dt {
  color: var(--fg-muted);
}

dd {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 120ms ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 1px dotted var(--link-hover);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  dl {
    grid-template-columns: 1fr;
    row-gap: 0.75rem;
  }

  dt {
    margin-top: 0.25rem;
  }

  section > p,
  section > dl,
  section > .entries {
    padding-left: 1rem;
  }
}
