/* Birch/ink Scandinavian palette, sitewide */
:root{
  --bg:#f3ede1;
  --fg:rgba(36,31,25,.84);
  --fg-strong:#1c1712;
  --muted:rgba(36,31,25,.5);
  --line:rgba(36,31,25,.15);
  --hover:rgba(36,31,25,.05);
  --code-fg:#9c4f2e;
  --code-bg:rgba(36,31,25,.06);
  --block-bg:#ece3d2;
  --accent:#546b52;
  --max:900px;
  --font:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji";
  --mono:"SFMono-Regular",Menlo,Consolas,"PT Mono","Liberation Mono",monospace;
}
:root[data-theme="dark"]{
  --bg:#201a14;
  --fg:rgba(243,237,225,.82);
  --fg-strong:#f3ede1;
  --muted:rgba(243,237,225,.5);
  --line:rgba(243,237,225,.15);
  --hover:rgba(243,237,225,.06);
  --code-fg:#e08a5c;
  --code-bg:rgba(243,237,225,.07);
  --block-bg:#2a2318;
  --accent:#7c9478;
}

/* --- minimal theme toggle, sitewide --- */
.theme-toggle{position:fixed; top:18px; right:18px; width:30px; height:30px; display:flex;
  align-items:center; justify-content:center; border-radius:50%; border:1px solid var(--line);
  background:var(--bg); color:var(--fg-strong); cursor:pointer; opacity:.6;
  transition:opacity .15s, border-color .15s; z-index:100; padding:0}
.theme-toggle:hover{opacity:1; border-color:var(--accent)}
.theme-toggle svg{width:15px; height:15px; display:block}
*{box-sizing:border-box}
body{margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 var(--font);
  -webkit-font-smoothing:antialiased}
.content{display:block}
.doc{max-width:var(--max); width:100%; margin:0 auto; padding:60px 96px 30px; min-width:0}

/* links: Notion underlines with a faint rule and dims on hover */
a{color:inherit; text-decoration:none; border-bottom:.05em solid var(--muted);
  opacity:1; transition:background .1s}
a:hover{background:var(--hover); text-decoration:none}
.doc p>a[href$=".html"],.doc li>a[href$=".html"]{
  border-bottom:.05em solid var(--muted); font-weight:500}
.doc p>a[href$=".html"]::before,.doc li>a[href$=".html"]::before{
  content:"\1F4C4"; margin-right:6px; opacity:.85; border:0}

/* breadcrumb = Notion's topbar */
.breadcrumb{font-size:14px; color:var(--muted); margin:0 0 34px; line-height:1.3}
.breadcrumb a{color:var(--muted); border:0; padding:2px 6px; border-radius:4px}
.breadcrumb a:hover{background:var(--hover); color:var(--fg)}

/* type scale */
.doc h1{font-size:40px; line-height:1.2; font-weight:700; color:var(--fg-strong);
  letter-spacing:-.01em; margin:0 0 22px; border:0; padding:0}
.doc h2{font-size:30px; line-height:1.3; font-weight:600; color:var(--fg-strong);
  margin:2em 0 4px; border:0; padding:0}
.doc h3{font-size:24px; line-height:1.3; font-weight:600; color:var(--fg-strong); margin:1.6em 0 2px}
.doc h4,.doc h5,.doc h6{font-size:20px; line-height:1.3; font-weight:600; color:var(--fg-strong); margin:1.4em 0 2px}
.doc p{margin:0; padding:3px 2px}
.spacer{height:22px}
.lede{color:var(--muted)}
.doc ul,.doc ol{margin:0; padding:0 0 0 1.7em}
.doc li{padding:3px 2px; margin:0}
.doc ul{list-style:disc}
.doc hr{border:0; border-top:1px solid var(--line); margin:12px 0}
.doc blockquote{margin:6px 0; padding:2px 0 2px 14px; border-left:3px solid currentColor;
  color:var(--fg); font-size:16px; background:none}

/* images sit flush like Notion blocks */
.doc img{max-width:100%; height:auto; border-radius:3px; border:0; background:none; display:block}
.figure{margin:6px 0; padding:3px 2px}
.img-link{border:0; display:inline-block; max-width:100%}
.img-link:hover{background:none}

code{background:var(--code-bg); color:var(--code-fg); padding:.2em .4em; border-radius:3px;
  font-family:var(--mono); font-size:85%; line-height:normal; overflow-wrap:anywhere}
pre{background:var(--block-bg); border:0; border-radius:3px; padding:34px 16px 32px;
  overflow-x:auto; margin:6px 0; tab-size:2}
pre code{background:none; color:var(--fg); padding:0; font-size:14px; line-height:1.4;
  overflow-wrap:normal; font-family:var(--mono)}

.table-wrap{overflow-x:auto; margin:6px 0}
table{border-collapse:collapse; font-size:14px; min-width:100%}
th,td{border:1px solid var(--line); padding:7px 9px; text-align:left; vertical-align:top; line-height:1.4}
th{background:rgba(36,31,25,.04); font-weight:600; color:var(--fg-strong)}

/* bookmark blocks: title + description + favicon/url on the left, preview right */
.bookmark{display:flex; align-items:stretch; margin:4px 2px; border:1px solid var(--line);
  border-radius:4px; overflow:hidden; min-height:106px; color:inherit; text-decoration:none}
.bookmark:hover{background:var(--hover)}
.bm-text{flex:4 1 180px; display:flex; flex-direction:column; justify-content:space-between;
  padding:12px 14px 14px; min-width:0; overflow:hidden}
.bm-title{font-size:14px; line-height:20px; color:var(--fg); overflow:hidden;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}
.bm-desc{font-size:12px; line-height:16px; color:var(--muted); margin-top:2px; overflow:hidden;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}
.bm-url{display:flex; align-items:center; gap:6px; margin-top:6px; font-size:12px;
  line-height:16px; color:var(--fg); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.bm-icon{width:16px; height:16px; flex:0 0 16px; border-radius:2px; object-fit:contain}
.bm-img{flex:1 1 30%; position:relative; min-width:100px}
.bm-img img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  border-radius:0; display:block}
@media (max-width:600px){
  .bm-img{display:none}
}

/* uploaded files: icon + name + size, PDFs render inline */
.fileblock{display:flex; align-items:center; gap:8px; margin:2px; padding:6px 8px;
  border-radius:4px; border:0; color:inherit; text-decoration:none}
.fileblock:hover{background:var(--hover)}
.fb-icon{font-size:16px; line-height:1; flex:0 0 auto}
.fb-name{border-bottom:.05em solid var(--muted); overflow-wrap:anywhere}
.fb-size{color:var(--muted); font-size:12px; flex:0 0 auto}
.pdfblock{margin:6px 2px}
.pdfblock object{width:100%; height:640px; border:1px solid var(--line); border-radius:4px;
  background:var(--block-bg); display:block}

/* generated sub-page list, styled like Notion's page links */
.child-index{list-style:none; margin:8px 0; padding:0}
.child-index li{border:0}
.child-index a{display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:5px 6px; border:0; border-radius:3px; font-weight:500}
.child-index a::before{content:"\1F4C4"; margin-right:6px}
.child-index a:hover{background:var(--hover)}
.child-index a span{color:var(--muted); font-size:12px; font-weight:400}

#menu-toggle{display:none}
@media (max-width:900px){
  .doc{padding:40px 24px 24px}
  .doc h1{font-size:32px}
  .doc h2{font-size:24px}
  .doc h3{font-size:20px}
}

/* --- homepage: hero + card grid (scoped, doesn't touch subpages) --- */
.hero{padding:64px 0 8px}
.hero-name{font-size:44px; line-height:1.15; font-weight:700; color:var(--fg-strong);
  letter-spacing:-.02em; margin:0}
.hero-role{font-size:18px; color:var(--code-fg); font-weight:600; margin:10px 0 0}
.hero-bio{font-size:16px; color:var(--muted); max-width:640px; margin:14px 0 0; line-height:1.6}

.section-title{font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:.08em;
  color:var(--muted); margin:48px 0 16px; padding:0 2px}

.card-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px}
.link-card{display:block; border:1px solid var(--line); border-radius:8px; padding:16px 18px;
  color:inherit; text-decoration:none; transition:border-color .15s, transform .15s, background .15s}
.link-card:hover{background:var(--hover); border-color:rgba(36,31,25,.32); transform:translateY(-2px)}
.link-card-title{font-size:15px; font-weight:600; color:var(--fg-strong); display:block}
.link-card-desc{font-size:13px; color:var(--muted); margin-top:4px; display:block; line-height:1.4}
.link-card-url{font-size:11px; color:var(--muted); margin-top:8px; display:block;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; opacity:.6}

@media (max-width:600px){
  .hero{padding:36px 0 0}
  .hero-name{font-size:32px}
}

/* --- homepage-only: layout + type, colors inherited from the shared theme tokens --- */
.doc.home{
  --display:"Roboto Mono",Menlo,Consolas,monospace;
  --body-f:"Roboto Mono",Menlo,Consolas,monospace;
  --caption:"Roboto Mono",Menlo,Consolas,monospace;
  max-width:680px; font-family:var(--body-f); color:var(--fg-strong); padding:88px 0 60px;
}

.doc.home .mark{display:block; width:28px; height:4px; background:var(--accent); margin:0 0 20px}
.doc.home .masthead-name{font-family:var(--display); font-weight:600; font-size:32px;
  line-height:1.25; color:var(--fg-strong); margin:0; letter-spacing:-.01em}
.doc.home .masthead-role{font-family:var(--caption); font-size:12.5px; letter-spacing:.01em;
  color:var(--accent); margin:16px 0 0; line-height:1.7}
.doc.home .masthead-link{margin:14px 0 0}
.doc.home .masthead-link a{font-family:var(--body-f); font-size:13px; font-weight:500;
  color:var(--fg-strong); border-bottom:1px solid var(--line); padding-bottom:1px}
.doc.home .masthead-link a:hover{color:var(--accent); border-color:var(--accent); background:none}
.doc.home .top-rule{height:1px; background:var(--line); border:0; margin:48px 0 0}

.doc.home .bookmark .bm-img{display:none}
.doc.home .bm-text{padding:0}

.doc.home .report-section{margin-top:64px}
.doc.home .report-label{font-family:var(--display); font-size:18px; font-weight:600;
  letter-spacing:.01em; color:var(--fg-strong); margin:0 0 8px}
.doc.home .report-label b{font-weight:600}

.doc.home .bookmark{border:0; border-top:1px solid var(--line); border-radius:0;
  background:none; padding:20px 0; margin:0}
.doc.home .bookmark:hover{background:none}
.doc.home .bm-text{padding:0 24px 0 0}
.doc.home .bm-title{color:var(--fg-strong); font-family:var(--display); font-weight:600; font-size:15px}
.doc.home .bm-desc{color:var(--muted)}
.doc.home .bm-url{font-family:var(--caption); font-size:11px; color:var(--accent)}
.doc.home .bm-img img{border-radius:2px}

.doc.home .card-grid{display:block; background:none; border:0; border-top:1px solid var(--line)}
.doc.home .link-card{display:flex; align-items:baseline; justify-content:space-between; gap:16px;
  background:none; border:0; border-bottom:1px solid var(--line); border-radius:0;
  padding:14px 2px; transition:padding-left .15s, color .15s; overflow:hidden}
.doc.home .link-card:hover{padding-left:8px; background:none; transform:none}
.doc.home .link-card:hover .link-card-title{color:var(--accent)}
.doc.home .link-card-title{font-family:var(--body-f); color:var(--fg-strong); font-size:15px;
  font-weight:500; transition:color .15s; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; flex:1 1 auto; min-width:0}
.doc.home .link-card-url{font-family:var(--caption); color:var(--muted); opacity:.7;
  font-size:11px; white-space:nowrap; flex:0 0 auto}

@media (max-width:600px){
  .doc.home{padding:56px 0 40px}
  .doc.home .masthead-name{font-size:32px}
  .doc.home .link-card-title{font-size:14px}
  .doc.home .link-card-url{display:none}
}
