:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #57575f;
  --line: #dedee4;
  --paper: #fff;
  --surface: #f5f5f7;
  --link: #005ab9;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font: 16px/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, ul { margin: 0; }
a { color: var(--link); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid #0068da; outline-offset: 3px; }

.skip {
  position: fixed;
  z-index: 1;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: var(--paper);
  transform: translateY(-160%);
}

.skip:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .shell { display: flex; align-items: center; min-height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: .96rem; font-weight: 600; letter-spacing: -.035em; }
.site-header .brand { min-height: 44px; text-decoration: none; }
.brand-mark { display: block; }

.intro { padding-block: var(--intro-space); }

h1 {
  font-size: clamp(2.8rem, 7.7vw, 3.5rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.059em;
  text-wrap: balance;
}

.intro p {
  max-width: 43ch;
  margin-top: var(--heading-gap);
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.24rem);
  text-wrap: balance;
}

.projects { border-top: 1px solid var(--line); }
.project { border-bottom: 1px solid var(--line); }

.project summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: clamp(17px, 2.5vw, 24px);
  font-size: clamp(1.14rem, 2.5vw, 1.42rem);
  font-weight: 660;
  line-height: 1.28;
  letter-spacing: -.035em;
  cursor: pointer;
  list-style: none;
}

.project summary::-webkit-details-marker { display: none; }
.project summary:hover { color: var(--link); }
.project summary:focus-visible { outline-offset: -2px; }
.project summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.project[open] summary::after { transform: translateY(2px) rotate(225deg); }
.project-content { padding-bottom: 15px; }
.project-content p { max-width: 62ch; padding-bottom: 16px; color: var(--muted); font-size: .96rem; }
code { font-family: var(--mono); font-size: .88em; }

.files { padding: 0; list-style: none; }
.files li { border-top: 1px solid var(--line); }

.file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 9px 0;
  text-decoration: none;
}

.file:hover { background: var(--surface); }
.folder-label { color: var(--ink); font-weight: 650; font-size: .93rem; }
.file code { display: block; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.file small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.download { flex: none; font-size: .82rem; font-weight: 580; white-space: nowrap; }
.download span { margin-left: 3px; font-size: 1.05em; }

.resources { padding-block: var(--section-space); }
.resources h2 { font-size: 1.04rem; font-weight: 660; letter-spacing: -.015em; }
.resources p { margin-top: 5px; color: var(--muted); font-size: .9rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.resource-links a { display: inline-flex; gap: 5px; align-items: center; min-height: 44px; font-size: .86rem; font-weight: 600; text-decoration: none; }
.resource-links a:hover { color: var(--ink); }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.site-footer .brand { font-size: .88rem; }

@media (max-width: 380px) {
  .file code, .download { font-size: .76rem; }
}
