:root {
  color-scheme: light;
  --background: #fbfbf9;
  --surface: #ffffff;
  --text: #171717;
  --lede: #2c2d30;
  --muted: #696b6f;
  --line: #dddddc;
  --accent: #0f766e;
  --accent-soft: #e5f3f1;
  --focus: #a855f7;
  --toggle-bg: #ffffff;
  --toggle-border: #d4d4d0;
  --toggle-icon: #171717;
  --toggle-shadow: rgba(17, 24, 39, 0.14);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --background: #111210;
  --surface: #191a17;
  --text: #f3f0e8;
  --lede: #d8d3ca;
  --muted: #aaa49a;
  --line: #34362f;
  --accent: #5eead4;
  --accent-soft: #14342f;
  --focus: #c084fc;
  --toggle-bg: #1a1b18;
  --toggle-border: #383b34;
  --toggle-icon: #f8f2d8;
  --toggle-shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.62;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  gap: 42px;
  border-right: 1px solid var(--line);
  padding: 42px 28px;
}

.wordmark {
  display: grid;
  gap: 2px;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.wordmark small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.side-tabs {
  display: grid;
  gap: 4px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.side-tabs a {
  border-left: 2px solid transparent;
  color: var(--muted);
  padding: 6px 0 6px 12px;
  text-decoration: none;
}

.side-tabs a:hover,
.side-tabs a:focus-visible,
.side-tabs a[aria-current="page"] {
  border-left-color: var(--accent);
  color: var(--text);
}

.content {
  width: min(100%, 880px);
  padding: 72px 48px 36px;
}

.section {
  scroll-margin-top: 24px;
  padding: 58px 0;
}

.section:first-child {
  padding-top: 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 12ch;
  font-size: 76px;
  font-weight: 500;
}

h2 {
  font-size: 30px;
  font-weight: 500;
}

h3 {
  font-size: 19px;
  font-weight: 650;
}

.lede {
  max-width: 690px;
  margin: 28px 0 28px;
  color: var(--lede);
  font-size: 24px;
  line-height: 1.45;
}

.investing-highlight {
  max-width: 620px;
  margin: 8px 0 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 14px;
}

.tldr-list {
  display: grid;
  max-width: 620px;
  margin: 0;
  padding: 0;
  gap: 8px;
  color: var(--muted);
  list-style: none;
}

.tldr-list li::before {
  content: "- ";
  color: var(--text);
}

.section-heading {
  margin-bottom: 28px;
}

.project-list {
  display: grid;
}

.project-group {
  scroll-margin-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding-top: 28px;
  text-transform: uppercase;
}

.project-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.project-group--secondary {
  margin-top: 18px;
  border-top: 2px solid var(--text);
  padding-top: 34px;
}

.project-group + .project {
  border-top: 0;
}

.project {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 26px;
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.project:first-child {
  border-top: 0;
  padding-top: 0;
}

.project-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

.project-detail p {
  margin: 0;
}

.project-compact-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 22px;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.project-compact-list li {
  margin: 0;
}

.project-compact-list a {
  color: var(--text);
}

.building-subhead {
  margin: 22px 0 8px;
  color: var(--text);
}

.building-subhead + .project-compact-list {
  margin-top: 0;
}

.investing-category {
  margin: 24px 0 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.investing-line {
  margin: 8px 0 18px;
  color: var(--muted);
}

.investing-line a {
  color: var(--text);
}

.project-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.note-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.note-link {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  padding: 18px 0;
  text-decoration: none;
}

.note-link span {
  font-size: 20px;
}

.note-link small {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.note-link:hover span {
  color: var(--accent);
}

.contact p {
  margin-top: 0;
}

.note-page {
  max-width: 720px;
}

.note-page h1 {
  max-width: none;
  font-size: 46px;
}

.back-link {
  margin: 0 0 28px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.note-body {
  margin-top: 34px;
}

.note-body h2,
.note-body h3,
.note-body h4,
.note-body h5 {
  margin-top: 34px;
}

.note-body p,
.note-body ul,
.note-body ol,
.note-body blockquote {
  margin: 18px 0;
}

.note-body ul,
.note-body ol {
  padding-left: 1.2em;
}

.note-body blockquote {
  border-left: 3px solid var(--line);
  color: var(--muted);
  padding-left: 18px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.theme-toggle {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 30;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  background: var(--toggle-bg);
  color: var(--toggle-icon);
  box-shadow: 0 12px 34px var(--toggle-shadow);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition:
    opacity 0.24s ease,
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(-80deg) scale(0.45);
}

html[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(80deg) scale(0.45);
}

html[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .site-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 10;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--background) 92%, var(--surface));
    padding: 14px 18px;
  }

  .side-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .side-tabs a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 6px 8px;
  }

  .side-tabs a:hover,
  .side-tabs a:focus-visible,
  .side-tabs a[aria-current="page"] {
    border-bottom-color: var(--accent);
  }

  .content {
    padding: 48px 22px 32px;
  }

  .section {
    scroll-margin-top: 74px;
    padding: 42px 0;
  }

  .project-group {
    scroll-margin-top: 74px;
  }

  h1 {
    max-width: none;
    font-size: 44px;
  }

  .lede {
    font-size: 21px;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
  }

}

@media (max-width: 430px) {
  .sidebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .side-tabs {
    width: 100%;
  }

  .content {
    padding-inline: 18px;
  }
}
