@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  color-scheme: light dark;
  --color-accent: oklch(54.471% 0.12757 22.203);
}

body {
  /* Set line height to 1.5 times the font size
	   and use the OS's UI font as the website font
	 */
  font: 100%/1.5 'Space Grotesk', system-ui;
  max-width: 100ch;
  margin-inline: auto;
  padding: 2rem;
  accent-color: var(--color-accent);
  background-color: light-dark(#fffaf6, #1c1614);
  color: light-dark(#463e40, #f0e8e4);
  position: relative;
}

nav ul {
  display: contents;
}

nav li {
  display: contents;
}

nav {
  --border-color: oklch(50% 10% 200 / 40%);
  display: flex;
  margin-bottom: 1em;
  border-bottom: 1px solid var(--border-color);
}

nav a {
  flex: 1;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 0.5em;
}

nav a.current {
  border-bottom: 0.4em solid var(--border-color);
  padding-bottom: 0.1em;
}

nav a:hover {
  border-bottom: 0.4em solid var(--color-accent);
  padding-bottom: 0.1em;
  background-color: color-mix(in oklch, var(--color-accent), canvas 85%);
}

label.color-scheme {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 80%;
}

input, textarea, button, select {
  font: inherit;
}

input, textarea {
  border: 1.5px solid light-dark(#99878c, #6a5a5e);
  border-radius: 6px;
  background-color: light-dark(#fffaf6, #2a2022);
  color: inherit;
}

form {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1em;
}

form label {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
}

button {
  grid-column: 1 / -1;
  background-color: #d8745e;
  color: #fdf0e4;
  border: 2px solid #d8745e;
  border-radius: 999px;
  padding: 0.5em 1.75em;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background-color 0.2s, transform 0.1s;
}

button:hover {
  background-color: #7fa870;
  border-color: #7fa870;
  transform: translateY(-2px);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: 250%;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
  gap: 1em;
}

.projects article {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
}

.projects h2 {
  margin: 0;
}

a {
  color: oklch(58.385% 0.09045 146.605);
}

a:hover {
  color: oklch(73.613% 0.10638 147.048);
}

section {
  margin-bottom: 1.5em;
}

section h2 {
  border-bottom: 2px solid oklch(50% 10% 200 / 40%);
  padding-bottom: 0.3em;
}

section h3 {
  margin-bottom: 0.3em;
}

.org {
  color: var(--color-accent);
}

time {
  font-weight: normal;
  color: light-dark(oklch(50% 0% 0), oklch(65% 0% 0));
}

section li {
  margin-bottom: 0.5em;
}
