:root {
  color-scheme: light;
  --background: #f6f6ef;
  --text: #333333;
  --muted: #666666;
  --line: #dfdfd2;
  --link: #555555;
  --link-hover: #111111;
  --active: #222222;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page {
  width: min(100%, 896px);
  margin: 0 auto;
  display: flex;
}

.sidebar {
  width: 192px;
  flex: 0 0 192px;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 32px;
}

nav {
  display: grid;
  gap: 4px;
}

.site-title {
  margin: 0;
}

.name {
  display: block;
  margin-bottom: 24px;
  color: var(--active);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

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

.nav-link {
  display: block;
  width: 100%;
  padding: 1px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  text-transform: capitalize;
}

.nav-link.is-active {
  color: var(--active);
  font-weight: 650;
}

main {
  flex: 1;
  min-width: 0;
  padding: 82px 32px 104px;
}

section {
  max-width: 640px;
  margin: 0 0 144px;
  scroll-margin-top: 32px;
}

section:last-child {
  margin-bottom: 0;
  padding-bottom: 64px;
}

h2 {
  margin: 0 0 16px;
  color: var(--active);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}

h3 {
  margin: 0 0 4px;
  color: var(--active);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

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

.projects li {
  margin-bottom: 16px;
}

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

.contact-list li {
  margin-bottom: 12px;
}

.projects a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
  font-weight: 400;
}

.project-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.substack-icon {
  fill: currentColor;
  color: #ff6719;
}

.app-icon {
  fill: none;
  stroke: #3c7cbc;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jelly-brand-icon {
  border-radius: 4px;
}

.calendar-icon {
  fill: none;
  stroke: var(--link);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linkedin-icon {
  color: #386f93;
}

.twitter-icon {
  color: var(--active);
}

.projects p,
.questions p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.projects p {
  padding-left: 26px;
}

.questions {
  display: grid;
  gap: 16px;
}

.questions article {
  min-width: 0;
}

.section-intro {
  margin: -4px 0 28px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
}

.brand-icon {
  fill: currentColor;
  stroke: none;
}

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

  .page {
    display: block;
  }

  .sidebar {
    width: auto;
    height: auto;
    position: sticky;
    z-index: 1;
    top: 0;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(246, 246, 239, 0.96);
    backdrop-filter: blur(12px);
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px 14px;
  }

  .site-title {
    flex: 0 0 100%;
  }

  .name {
    margin-bottom: 3px;
  }

  .nav-link {
    width: auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
  }

  main {
    padding: 36px 20px 52px;
  }

  section {
    max-width: none;
    margin-bottom: 104px;
    scroll-margin-top: 116px;
  }

  section:last-child {
    padding-bottom: 32px;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }

  .sidebar {
    padding-inline: 16px;
  }

  main {
    padding-inline: 16px;
  }

  .nav-link {
    min-height: 30px;
  }
}
