:root{
  --paper:#efeae0;
  --ink:#161514;
  --accent:#d2452b;
  --highlight:#f3d34a;
  --muted:#6b655c;
  --line:#cfc9bd;
  --accent-deep:#a8371d;
}
*{box-sizing:border-box;}
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:"Helvetica Neue",Arial,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}
.wrap{ max-width:880px; margin:0 auto; padding:30px 40px 70px; }
a{ color:var(--accent); }

/* header / masthead */
header{ display:grid; grid-template-columns:auto 1fr; gap:20px; align-items:center; border-bottom:6px solid var(--ink); padding-bottom:16px; }
.mono{ width:78px;height:78px; background:var(--ink); color:var(--paper); font-weight:800; font-size:34px; letter-spacing:-1px; display:flex;align-items:center;justify-content:center; flex:none; text-decoration:none; transition:background .2s ease, transform .2s ease; }
.mono span{ color:var(--accent); transition:color .2s ease; }
.mono:hover{ background:var(--accent); transform:rotate(-3deg); }
.mono:hover span{ color:var(--ink); }
.name{ font-size:62px; font-weight:800; line-height:.9; letter-spacing:-2px; margin:0; text-transform:uppercase; }
.name a{ color:inherit; text-decoration:none; }
.name small{ display:block; font-size:13px; font-weight:700; letter-spacing:1px; text-transform:none; color:var(--muted); margin-top:8px; }

/* nav */
nav{ display:flex; flex-wrap:wrap; margin:0 0 30px; border-bottom:2px solid var(--ink); }
nav a{ text-decoration:none; color:var(--ink); font-weight:700; font-size:14px; text-transform:uppercase; letter-spacing:1px; padding:12px 22px; transition:background .15s ease, color .15s ease; }
nav a.active{ background:var(--accent); color:#fff; }
nav a:not(.active):hover{ background:var(--ink); color:var(--paper); }

.label{ font-size:12px; font-weight:800; letter-spacing:3px; text-transform:uppercase; color:var(--accent); margin:0 0 16px; }

/* home intro */
.intro{ font-size:20px; line-height:1.5; max-width:60ch; margin:0 0 18px; font-weight:500; }
.intro mark{ background:var(--highlight); color:var(--ink); padding:0 3px; }
.now{ display:inline-flex; gap:10px; align-items:baseline; font-size:13px; color:var(--muted); margin-bottom:40px; }
.now b{ background:var(--ink); color:var(--paper); font-size:11px; letter-spacing:2px; text-transform:uppercase; padding:3px 8px; }

/* writing filter */
.filterbar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 22px; }
.chip{ font:inherit; cursor:pointer; border:2px solid var(--ink); background:transparent; color:var(--ink); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1px; padding:6px 12px; transition:background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease; }
.chip:hover{ background:var(--ink); color:var(--paper); }
.chip:active{ transform:translateY(1px); }
.chip.active{ background:var(--accent); border-color:var(--accent); color:#fff; }

/* writing list */
.post{ display:grid; grid-template-columns:96px 1fr auto; gap:18px; align-items:start; padding:18px 0; border-bottom:1px solid var(--line); }
.post .pdate{ font-size:12px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:1px; padding-top:3px; transition:color .2s ease; }
.post .pbody{ transition:transform .2s ease; }
.post h2{ font-size:20px; margin:0; font-weight:800; letter-spacing:-.3px; line-height:1.2; }
.post h2 a{ color:var(--ink); text-decoration:none; padding-bottom:2px; background-image:linear-gradient(var(--accent),var(--accent)); background-repeat:no-repeat; background-position:0 100%; background-size:0% 2px; transition:background-size .28s ease, color .2s ease; }
.post:hover .pbody{ transform:translateX(5px); }
.post:hover .pdate{ color:var(--accent); }
.post:hover h2 a{ background-size:100% 2px; color:var(--accent); }
.pexcerpt{ font-size:14px; line-height:1.5; color:var(--muted); margin:7px 0 0; max-width:64ch; }
.tags{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.tag{ font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:var(--accent-deep); border:1px solid var(--accent-deep); padding:3px 7px; white-space:nowrap; }

/* featured (latest) post with hero */
.featured{ border-bottom:1px solid var(--line); padding-bottom:28px; margin-bottom:10px; }
.featured .hero{ display:block; border:2px solid var(--ink); margin-bottom:16px; overflow:hidden; line-height:0; }
.featured .hero img{ display:block; width:100%; height:auto; transition:transform .3s ease; }
.featured .hero:hover img{ transform:scale(1.015); }
.fmeta{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.fmeta .pdate{ font-size:12px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:1px; }
.featured h2{ font-size:30px; line-height:1.12; font-weight:800; letter-spacing:-.5px; margin:0 0 10px; }
.featured h2 a{ color:var(--ink); text-decoration:none; padding-bottom:2px; background-image:linear-gradient(var(--accent),var(--accent)); background-repeat:no-repeat; background-position:0 100%; background-size:0% 2px; transition:background-size .28s ease, color .2s ease; }
.featured h2 a:hover{ background-size:100% 2px; color:var(--accent); }
.featured .pexcerpt{ font-size:15px; line-height:1.55; color:var(--muted); max-width:68ch; margin:0; }

/* list-row thumbnail (only rendered when a post has an image) */
.pmeta{ display:flex; flex-direction:column; align-items:flex-end; gap:9px; }
.thumb{ display:block; width:84px; height:58px; border:1px solid var(--ink); flex:none; overflow:hidden; background:#e4ded2; line-height:0; }
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s ease; }
.thumb:hover img{ transform:scale(1.05); }

/* writing archive: year headings + "all writing" link */
.year-head{ font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:2px; color:var(--muted); border-bottom:2px solid var(--ink); padding-bottom:6px; margin:34px 0 6px; }
.year-head:first-child{ margin-top:4px; }
.more-link{ margin:24px 0 0; }
.more-link a{ font-weight:800; text-transform:uppercase; font-size:12px; letter-spacing:1px; text-decoration:none; color:var(--ink); padding-bottom:2px; background-image:linear-gradient(var(--accent),var(--accent)); background-repeat:no-repeat; background-position:0 100%; background-size:0% 2px; transition:background-size .25s ease, color .2s ease; }
.more-link a:hover{ background-size:100% 2px; color:var(--accent); }

/* lately on github */
.lately{ margin-top:46px; }
.gh-row{ display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; align-items:baseline; }
.gh-row:last-child{ border-bottom:none; }
.gh-act{ display:flex; align-items:baseline; gap:10px; }
.gh-act::before{ content:""; width:8px; height:8px; background:var(--accent); flex:none; align-self:center; }
.gh-act a{ color:var(--ink); text-decoration:none; font-weight:800; padding-bottom:1px; background-image:linear-gradient(var(--accent),var(--accent)); background-repeat:no-repeat; background-position:0 100%; background-size:0% 2px; transition:background-size .25s ease, color .2s ease; }
.gh-act a:hover{ background-size:100% 2px; color:var(--accent); }
.gh-when{ color:var(--muted); font-size:12px; white-space:nowrap; }
.gh-note{ color:var(--muted); font-size:13px; font-style:italic; margin:0; }

/* about */
.bio{ max-width:68ch; }
.bio p{ font-size:17px; line-height:1.62; margin:0 0 18px; }
.bio mark{ background:var(--highlight); color:var(--ink); padding:0 3px; }
.bio .visit{ font-weight:800; text-transform:uppercase; font-size:12px; letter-spacing:1px; text-decoration:none; }
.xp{ margin-top:42px; }
.xp h3{ font-size:13px; text-transform:uppercase; letter-spacing:2px; border-bottom:3px solid var(--ink); padding-bottom:6px; margin:0 0 6px; }
.xrow{ display:grid; grid-template-columns:150px 1fr; gap:18px; padding:14px 0; border-bottom:1px solid var(--line); }
.xrow:last-child{ border-bottom:none; }
.xrow .when{ font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:var(--accent); padding-top:2px; }
.xrow .what b{ font-size:16px; }
.xrow .what span{ display:block; font-size:14px; color:var(--muted); margin-top:2px; }
.entity{ margin-top:30px; font-size:12px; color:var(--muted); }

/* projects */
.proj{ border-bottom:1px solid var(--line); padding:0 0 26px; margin-bottom:26px; }
.proj:last-child{ border-bottom:none; }
.proj-head{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin-bottom:10px; }
.proj-head h2{ font-size:26px; font-weight:800; letter-spacing:-.5px; margin:0; }
.proj-head .meta{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:var(--muted); border:1px solid var(--muted); padding:3px 8px; }
.proj p{ font-size:15px; line-height:1.6; color:#33302c; max-width:68ch; margin:0 0 12px; }
.repo{ font-weight:800; text-transform:uppercase; font-size:12px; letter-spacing:1px; text-decoration:none; padding-bottom:2px; background-image:linear-gradient(var(--accent),var(--accent)); background-repeat:no-repeat; background-position:0 100%; background-size:0% 2px; transition:background-size .25s ease; }
.repo:hover{ background-size:100% 2px; }

/* article / post page */
.article{ max-width:68ch; }
.article-kicker{ font-size:12px; font-weight:800; letter-spacing:3px; text-transform:uppercase; color:var(--accent); margin:0 0 10px; }
.article-title{ font-size:40px; line-height:1.08; font-weight:800; letter-spacing:-1px; margin:0 0 12px; }
.article-meta{ font-size:13px; color:var(--muted); display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 30px; padding-bottom:18px; border-bottom:2px solid var(--ink); }
.post-content{ font-size:17px; line-height:1.7; }
.post-content p{ margin:0 0 20px; }
.post-content h2{ font-size:24px; font-weight:800; letter-spacing:-.4px; margin:34px 0 12px; }
.post-content h3{ font-size:19px; font-weight:800; margin:28px 0 10px; }
.post-content a{ color:var(--accent); text-decoration:underline; text-underline-offset:2px; }
.post-content ul,.post-content ol{ margin:0 0 20px; padding-left:22px; }
.post-content li{ margin-bottom:8px; }
.post-content blockquote{ margin:0 0 20px; padding:6px 0 6px 18px; border-left:3px solid var(--accent); color:var(--muted); font-style:italic; }
.post-content code{ font-family:"SF Mono",Consolas,Menlo,monospace; font-size:.88em; background:#e4ded2; padding:1px 5px; }
.post-content pre{ background:var(--ink); color:#f4f1ea; padding:16px 18px; overflow-x:auto; font-size:13px; line-height:1.5; margin:0 0 20px; }
.post-content pre code{ background:none; padding:0; color:inherit; }
.article-back{ margin-top:40px; padding-top:18px; border-top:2px solid var(--ink); font-weight:800; text-transform:uppercase; font-size:12px; letter-spacing:1px; }
.article-back a{ text-decoration:none; }
.syndication{ font-size:13px; color:var(--muted); margin:0 0 10px; }
.syndication a{ color:var(--accent); text-decoration:none; }
.syndication a:hover{ text-decoration:underline; }

/* footer */
footer{ margin-top:46px; border-top:6px solid var(--ink); padding-top:12px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:11px; text-transform:uppercase; letter-spacing:1px; color:var(--muted); }
footer a{ color:var(--muted); text-decoration:none; transition:color .15s ease; }
footer a:hover{ color:var(--accent); }

/* responsive */
@media (max-width:640px){
  .wrap{ padding:24px 22px 56px; }
  .name{ font-size:40px; }
  .mono{ width:60px;height:60px;font-size:26px; }
  .post{ grid-template-columns:1fr; gap:6px; }
  .post .tags{ justify-content:flex-start; }
  .pmeta{ align-items:flex-start; }
  .featured h2{ font-size:24px; }
  .article-title{ font-size:30px; }
  nav a{ padding:10px 14px; }
  .xrow{ grid-template-columns:1fr; gap:4px; }
}
