/* afresquet.com */

:root {
  color-scheme: dark light;
  --bg: #121314;
  --fg: #d9d6cd;
  --muted: #8d8d86;
  --mark: #5a5b58;
  --accent: #d7a35a;
  --rule: #2a2b2d;
  --code-bg: #1c1d1f;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4ef;
    --fg: #1f1f1d;
    --muted: #6b6a64;
    --mark: #aaa8a0;
    --accent: #9a5a12;
    --rule: #dcd9d0;
    --code-bg: #ebe8e1;
  }
}

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

body {
  margin: 0 auto;
  padding: 3.5rem 16px 3rem;
  max-width: 72ch;
  font: 15px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

a:hover {
  text-decoration-color: var(--accent);
}

p {
  margin: 0 0 1rem;
}

code {
  font: inherit;
  background: var(--code-bg);
  padding: 0 0.4ch;
  border-radius: 2px;
}

strong {
  font-weight: 700;
}

em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-underline-offset: 0.18em;
}

/* header */

.top {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.tagline {
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.links {
  margin: 0.75rem 0 0;
}

.sep {
  color: var(--mark);
}

/* sections */

section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

h2::before {
  content: "## ";
  color: var(--mark);
  font-weight: 400;
}

h2 a {
  color: inherit;
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--mark);
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.org,
.meta {
  color: var(--muted);
  font-weight: 400;
}

.note {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

ul {
  list-style: none;
  padding-left: 2ch;
  margin: 0 0 1rem;
}

ul li {
  position: relative;
}

ul li::before {
  content: "-";
  position: absolute;
  left: -2ch;
  color: var(--mark);
}

/* work */

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

.work > li {
  display: grid;
  grid-template-columns: 11ch 1fr;
  column-gap: 2ch;
  margin-bottom: 2rem;
}

.work > li:last-child {
  margin-bottom: 0;
}

.when {
  color: var(--muted);
  white-space: nowrap;
}

.what > :last-child,
.what > :last-child > :last-child {
  margin-bottom: 0;
}

/* projects */

.projects,
.projects > li {
  padding: 0;
}

.projects > li::before {
  content: none;
}

.projects > li {
  margin-bottom: 1.5rem;
}

.projects > li:last-child {
  margin-bottom: 0;
}

.projects > li > :last-child {
  margin-bottom: 0;
}

/* skills */

.skills {
  display: grid;
  grid-template-columns: 11ch 1fr;
  column-gap: 2ch;
  row-gap: 0.4rem;
  margin: 0;
}

.skills dt {
  color: var(--muted);
}

.skills dd {
  margin: 0;
}

/* small screens */

@media (max-width: 40rem) {
  body {
    padding-top: 2rem;
  }

  .work > li,
  .skills {
    grid-template-columns: 1fr;
  }

  .when {
    margin-bottom: 0.25rem;
  }

  .skills dt {
    margin-top: 0.4rem;
  }

  .skills dt:first-child {
    margin-top: 0;
  }
}
