/* lugor.net · washi minimal */

:root {
  --paper: #f5f1e7;
  --paper-2: #eee8da;
  --ink: #221e19;
  --ink-2: #7c7365;
  --line: #d9d1c0;
  --shu: #b0452c;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
}

/* paper grain over everything, under nothing interactive */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.51 0 0 0 0 0.44 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--shu); }

main { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* header / footer ------------------------------------------------------- */

.top {
  max-width: 1060px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.mark {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hanko {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--shu);
  color: var(--paper);
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}

.top nav { display: flex; gap: 22px; }
.top nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink-2);
}
.top nav a:hover { color: var(--shu); }

.bottom {
  max-width: 1060px;
  margin: 80px auto 0;
  padding: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.bottom a { color: var(--ink-2); }

/* hero ------------------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  padding: 56px 0 72px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shu);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.lede { max-width: 46ch; color: var(--ink); margin: 0 0 26px; }

.hero-links { display: flex; gap: 24px; font-family: var(--mono); font-size: 13px; }

.hero-geom {
  position: relative;
  margin: 0;
}
.hero-geom canvas { display: block; width: 100%; height: auto; }
.hero-geom figcaption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 4px;
  text-align: center;
}
.vert {
  position: absolute;
  top: 12px;
  right: -34px;
  writing-mode: vertical-rl;
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--ink-2);
}
@media (max-width: 1180px) { .vert { display: none; } }

/* lattice of blocks ------------------------------------------------------ */

.lattice {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cell { background: var(--paper); padding: 28px; }
.cell-work { grid-column: 1 / -1; }

.cell h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.cell h2 .more { font-size: 11px; text-decoration: none; color: var(--shu); }

/* notes list */
.notelist { list-style: none; margin: 0; padding: 0; }
.notelist li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.notelist li:last-child { border-bottom: 0; }
.notelist time { font-family: var(--mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }

/* takes */
.take { margin-bottom: 28px; }
.take:last-child { margin-bottom: 0; }

.tweet {
  margin: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--shu);
  background: var(--paper-2);
  padding: 14px 18px;
}
.tweet p { margin: 0 0 10px; font-size: 16px; }
.tweet footer {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  display: flex;
  gap: 12px;
}
.tweet footer a { color: var(--ink-2); }

.commentary { padding: 14px 4px 0; }
.commentary p { margin: 0 0 12px; }
.tlink { font-family: var(--mono); font-size: 12px; color: var(--shu); }

/* repos */
.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.repo { border: 1px solid var(--line); padding: 18px; background: var(--paper); }
.repo h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.repo h3 a { text-decoration: none; }
.repo h3 a:hover { color: var(--shu); }
.repo p { margin: 0 0 14px; font-size: 15px; color: var(--ink-2); min-height: 2.6em; }
.repo footer {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
}
.repo .lang::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--shu);
  margin-right: 6px;
}

/* inner pages ------------------------------------------------------------ */

.prose { max-width: 66ch; margin: 40px auto 0; }
.prose.wide { max-width: 100%; }

.prose h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.prose .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin: 0 0 28px; }
.prose h2 { font-size: 22px; font-weight: 600; margin: 36px 0 12px; }
.prose blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--line); color: var(--ink-2); }

.prose code, .commentary code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 1px 5px;
  border: 1px solid var(--line);
}
.prose pre { background: var(--paper-2); border: 1px solid var(--line); padding: 16px; overflow-x: auto; }
.prose pre code { border: 0; padding: 0; background: none; }

/* images in notes ---------------------------------------------------------
   write them in markdown; the quoted "title" becomes the caption and
   {: .class } picks the layout:

     ![alt text](/img/photo.jpg "caption under the photo")
     ![alt](/img/photo.jpg "caption"){: .wide }     breaks out of the column
     ![alt](/img/photo.jpg){: .left }               floats left, text wraps
     ![alt](/img/photo.jpg){: .right }              floats right

   two side by side: both images in one paragraph, then a line with
   {: .row } directly under them. */

.prose img { max-width: 100%; height: auto; display: block; }
.prose figure { margin: 28px auto; }
.prose figure img,
.prose .row img {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 6px;
}
.prose figcaption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 8px;
  text-align: center;
}
.prose figure.cut img { border: 0; background: none; padding: 0; }
.prose figure.wide { width: min(880px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
.prose figure.left  { float: left;  width: 48%; margin: 6px 24px 12px 0; }
.prose figure.right { float: right; width: 48%; margin: 6px 0 12px 24px; }
.prose .row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.prose .row img { flex: 1 1 200px; min-width: 0; }
.prose::after { content: ""; display: block; clear: both; }

.takelist { max-width: 66ch; margin-top: 32px; }
.takelist .take { margin-bottom: 48px; }

.empty { color: var(--ink-2); font-style: italic; }

/* small screens ----------------------------------------------------------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .prose figure.left, .prose figure.right { float: none; width: 100%; margin: 28px 0; }
  .hero-geom { max-width: 420px; }
  .lattice { grid-template-columns: 1fr; }
  .top { flex-direction: column; gap: 14px; }
}
