/* mvonebers.com: one stylesheet for the homepage, the blog and the neuron browser header. */
:root {
  --ink: #1b1b1a;
  --dim: #5c5c58;
  --faint: #8a8a85;
  --line: #e4e4de;
  --card: rgba(255, 255, 255, 0.95);
  --link: #1d4fa3;
  --link-hover: #0f2f6b;
  --accent: #2f5d1e;  /* the dark green of the background contours */
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: #f6f6f2;
  background-attachment: fixed !important;
  background-position: center top !important;
  font: 18px/1.65 var(--serif);
  display: flex;
  flex-direction: column;
}
#perlin-noise-canvas { position: fixed; left: 0; top: 0; display: none; }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }

/* site header: name on the left, a few links on the right */
.site-header {
  width: 100%;
  max-width: 760px;
  margin: 28px auto 0;
  padding: 14px 28px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 22px;
  background: var(--card);
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
}
.site-header .name { font-size: 20px; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -0.3px; }
.site-header nav { margin-left: auto; display: flex; gap: 18px; font-size: 15px; }
.site-header nav a { color: var(--dim); text-decoration: none; }
.site-header nav a:hover, .site-header nav a.on { color: var(--ink); }

/* the card everything sits on */
.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 28px;
  padding: 30px 28px 34px;
  background: var(--card);
  border-radius: 0 0 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-top: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
/* homepage: no site header, a narrower card with more of the background around it */
.page.home { max-width: 680px; margin: 12vh auto 10vh; border-radius: 10px; border-top: 1px solid rgba(0, 0, 0, 0.07); }
.site-footer {
  font: 13px/1.5 var(--mono);
  color: var(--faint);
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 14px;
}
.site-footer a { color: var(--faint); }

/* type */
h1, h2, h3, h4 { font-family: var(--mono); font-weight: 500; line-height: 1.3; letter-spacing: -0.3px; }
h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 22px; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 30px 0 10px; }
h4 { font-size: 16px; margin: 24px 0 8px; }
p, ul, ol, blockquote, pre, table, figure { margin: 0 0 18px; }
ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--dim); }
code { font: 0.85em var(--mono); background: #f1f1ec; padding: 1px 5px; border-radius: 4px; }
pre { background: #f1f1ec; padding: 12px 14px; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.meta { font: 14px/1.5 var(--mono); color: var(--faint); margin: 0 0 26px; }

/* homepage: the original Abel text with the Roboto Mono name */
.home { font-family: "Abel", sans-serif; font-size: 19px; line-height: 1.55; }
.home h1 { font-size: 36px; margin-bottom: 6px; }
.home .links { margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.home .links a { color: #011c8a; text-decoration: none; }
.home h3 { font-family: "Abel", sans-serif; font-size: 21px; font-weight: 400; letter-spacing: 0; margin: 26px 0 8px; }
.home p { margin: 0 0 12px; }
.home footer.resume { text-align: center; font-size: 16px; margin-top: 30px; }
.home footer.resume p { margin: 0; padding-top: 12px; color: var(--dim); }
.home footer.resume hr { width: 80px; margin: 16px auto 0; border: 0; border-top: 1px solid var(--line); }

/* blog list */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin: 0 0 26px; }
.post-list .date { display: block; font: 13px/1.5 var(--mono); color: var(--faint); }
.post-list .title { font: 500 19px/1.35 var(--mono); letter-spacing: -0.3px; text-decoration: none; }
.post-list .title:hover { text-decoration: underline; }
.post-list .excerpt { margin: 4px 0 0; color: var(--dim); font-size: 16px; }

/* posts */
.post-title { font-size: 30px; }
.post-body img { display: block; margin: 8px auto 6px; border-radius: 4px; }
.post-body p > em:only-child { display: block; font-size: 15px; color: var(--dim); }
.post-body .twitter-tweet { font-size: 15px; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; font: 14px/1.5 var(--mono); margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; }
.post-nav .next { text-align: right; margin-left: auto; }
.post-nav small { display: block; color: var(--faint); }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .site-header, .page, .page.home { border-radius: 0; margin: 0; max-width: none; }
  .page.home { margin: 40px 0 0; }
  .site-header { padding: 14px 18px; }
  .page { padding: 24px 18px 30px; }
  h1, .post-title { font-size: 26px; }
  .home h1 { font-size: 28px; }
  h2 { font-size: 20px; }
}

/* click-to-enlarge figures (posts with zoom_figures: true) */
.zoomable .post-body img { cursor: zoom-in; }
.zoom-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 3vw; background: rgba(20, 20, 18, 0.72); cursor: zoom-out; animation: zoom-fade 0.15s ease-out; }
.zoom-overlay img { max-width: 94vw; max-height: 92vh; width: auto; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35); animation: zoom-pop 0.18s ease-out; }
@keyframes zoom-fade { from { opacity: 0; } }
@keyframes zoom-pop { from { transform: scale(0.92); } }
