*{box-sizing:border-box}
:root{
  --bg:#f4f4f4;
  --card:#ffffff;
  --text:#111111;
  --muted:#666666;
  --border:#d8d8d8;
  --soft:#f7f7f7;
  --soft2:#eeeeee;
}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  padding:20px;
  background:var(--bg);
  color:var(--text);
  font:14px/1.6 Arial,Helvetica,sans-serif;
}
a{color:#111;text-decoration:underline;text-underline-offset:2px}
p{margin:5px 0}
a:hover{color:#444}
.wrap{width:100%;max-width:500px;margin:0 auto}

.profile-card,.section-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:0;
  box-shadow:none;
}
.profile-card{
  padding:26px 24px;
  text-align:center;
}
.avatar{
  width:84px;
  height:84px;
  margin:0 auto 14px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:0;
  background:#f0f0f0;
  font-size:23px;
  font-weight:bold;
}
.avatar img{width:100%;height:100%;object-fit:cover}
h1,h2,h3{font-size:14px;line-height:1.6;font-weight:bold;letter-spacing:0}
h1{margin:0}
h2,h3{margin-top:0}
.role{margin:6px 0 1px;color:#555;font-size:14px}
.location{margin:0 0 12px;color:#777;font-size:13px}
.bio{max-width:560px;margin:0 auto;color:#333}

.section-card{margin-top:12px}
.foldout-card{padding:0;overflow:hidden;scroll-margin-top:12px}
.foldout-card>summary{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:54px;
  padding:14px 48px 14px 18px;
  cursor:pointer;
  list-style:none;
  background:#fff;
  font-size:14px;
  font-weight:bold;
  user-select:none;
}
.foldout-card>summary::-webkit-details-marker{display:none}
.foldout-card>summary:hover{background:var(--soft)}
.foldout-card>summary:focus-visible{outline:2px solid #777;outline-offset:-2px}
.foldout-card>summary::after{
  content:'+';
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border:1px solid #ccc;
  background:#eee;
  color:#333;
  font-size:16px;
  font-weight:normal;
  line-height:1;
}
.foldout-card[open]>summary::after{content:'−';background:#e5e5e5}
.foldout-title{min-width:0}
.foldout-count{
  display:inline-block;
  min-width:22px;
  padding:1px 6px;
  border:1px solid #ddd;
  background:#f4f4f4;
  color:#666;
  font-size:11px;
  font-weight:normal;
  text-align:center;
}
.foldout-content{
  padding:0 18px 18px;
  border-top:1px solid var(--border);
}
.foldout-content>p:first-child{margin-top:10px}
.foldout-content>p:last-child{margin-bottom:0}
.muted{color:var(--muted)}

.markdown{overflow-wrap:anywhere}
.markdown>:first-child{margin-top:0}
.markdown>:last-child{margin-bottom:0}
.markdown p{margin:5px 0}
.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{
  margin:10px 0 4px;
  font-size:14px;
  line-height:1.6;
  font-weight:bold;
}
.markdown ul,.markdown ol{margin:5px 0;padding-left:22px}
.markdown li{margin:2px 0}
.markdown blockquote{
  margin:7px 0;
  padding:2px 0 2px 10px;
  border-left:3px solid #ccc;
  color:#555;
}
.markdown pre{
  margin:7px 0;
  padding:9px 10px;
  overflow:auto;
  border:1px solid #ddd;
  background:#f7f7f7;
  font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
  white-space:pre-wrap;
}
.markdown code{
  padding:1px 3px;
  background:#f1f1f1;
  font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
}
.markdown pre code{padding:0;background:transparent}
.markdown hr{margin:10px 0;border:0;border-top:1px solid #ddd}
.foldout-content>.markdown:first-child{margin-top:10px}
.project>.markdown,.download>.markdown{margin-top:4px;color:#333}
.form-help{display:block;margin-top:4px;color:#777;font-size:11px;font-weight:normal}

.project,.download{padding:14px 0;border-top:1px solid #ddd}
.project:first-of-type,.download:first-of-type{border-top:0;padding-top:16px}
.project:last-child,.download:last-child{padding-bottom:0}
.project-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.project h3,.download h3{margin:0;font-size:14px}
.year{color:#777;font-size:12px;white-space:nowrap}
.project p,.download p{margin:4px 0 0;color:#333;font-size:14px}
.project-preview .text-link{margin-top:8px}
.text-link{display:inline-block;margin-top:7px;font-weight:bold;text-decoration:underline}
.section-actions{padding-top:12px;border-top:1px solid #ddd;margin-top:10px}

form{display:grid;gap:10px;padding-top:16px}
label{font-weight:bold;font-size:13px}
input,textarea,select{
  width:100%;
  padding:10px;
  border:1px solid #cfcfcf;
  border-radius:0;
  background:#fff;
  color:#111;
  font:14px Arial,Helvetica,sans-serif;
}
textarea{min-height:120px;resize:none}
button,.button{
  padding:10px 14px;
  border:1px solid #bbb;
  border-radius:0;
  background:#eee;
  color:#111;
  font:14px Arial,Helvetica,sans-serif;
  font-weight:bold;
  cursor:pointer;
}
button:hover,.button:hover{background:#e4e4e4}
.notice{padding:10px 12px;border:1px solid #ddd;margin:14px 0 0;background:#fafafa}
.notice.ok{border-color:#b7d8b7;background:#eef8ee;color:#205b20}
.notice.error{border-color:#e2bcbc;background:#fff3f3;color:#8b1f1f}

footer{padding:16px 4px 2px;text-align:center;color:#777;font-size:12px}
.social-links{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 9px}
.social-links a{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid #ccc;
  border-radius:0;
  background:#fff;
  color:#333;
  text-decoration:none;
}
.social-links a:hover{background:#eee;color:#000}
.social-links a:focus-visible{outline:2px solid #777;outline-offset:2px}
.social-links svg{width:17px;height:17px;display:block;fill:currentColor}
.footer-copy{line-height:1.4}

.error-page-wrap{padding-top:7vh}
.error-page{padding:32px 24px}
.error-code{margin:0 0 8px;color:#aaa;font-size:56px;font-weight:bold;line-height:1}
.error-message{margin-top:8px}
.error-home-link{
  display:inline-block;
  margin-top:18px;
  padding:9px 12px;
  border:1px solid #bbb;
  background:#eee;
  color:#111;
  font-weight:bold;
  text-decoration:none;
}
.error-home-link:hover{background:#e4e4e4}

.project-title-link{color:#111;text-decoration:underline}

/* Individual project page */
.section-card.project-page{
  margin-top:12px;
  padding:0;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--border);
}
.project-page-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid var(--border);
  background:var(--soft);
}
.project-page-head h2{
  margin:0;
  font-size:14px;
  line-height:1.6;
}
.project-page-head .year{
  padding-left:12px;
  color:#666;
  font-size:12px;
  white-space:nowrap;
}
.project-page-description{
  margin:0;
  padding:20px;
  color:#222;
  font-size:14px;
  line-height:1.7;
  overflow-wrap:anywhere;
}
.project-page-description:empty{display:none}
.project-page-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
  padding:14px 20px 18px;
  border-top:1px solid var(--border);
  background:#fafafa;
}
.project-page-link{
  display:inline-block;
  padding:9px 12px;
  border:1px solid #bbb;
  background:#eee;
  color:#111;
  font-weight:bold;
  text-decoration:none;
}
.project-page-link:hover{background:#e4e4e4}
.project-page-link:focus-visible{outline:2px solid #777;outline-offset:2px}
.project-back{margin-top:14px}

.project-archive{padding:22px 24px}
.archive-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:14px;border-bottom:1px solid #ddd}
.archive-head h1,.archive-head h2{margin:0;font-size:14px;line-height:1.6;font-weight:bold}
.archive-head .muted{margin:4px 0 0}
.archive-list{margin-top:0}

@media(max-width:520px){
  body{padding:12px}
  .profile-card{padding:22px 16px}
  .foldout-card>summary{padding:13px 44px 13px 15px}
  .foldout-card>summary::after{right:14px}
  .foldout-content{padding:0 15px 15px}
  .project-head{align-items:flex-start;flex-direction:column;gap:2px}
  .section-card.project-page{padding:0}
  .project-page-head{align-items:flex-start;flex-direction:column;gap:4px;padding:16px}
  .project-page-head .year{padding-left:0}
  .project-page-description{padding:16px}
  .project-page-actions{padding:12px 16px 16px}
  .project-archive{padding:18px 16px}
  .archive-head{display:block}
  .archive-head>a{display:inline-block;margin-top:8px}
  .error-page-wrap{padding-top:3vh}
  .error-page{padding:28px 18px}
  .error-code{font-size:48px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
