:root{
  --font-display: ui-serif, Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Noto Serif', serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Roboto Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --paper: #ede7d9;
  --paper-deep: #e4ddc9;
  --ink: #1f2a24;
  --ink-soft: #4a5049;
  --brass: #8a6d3b;
  --brass-deep: #6b5228;
  --teal: #3e6259;
  --grid-line: #c9c2ae;
  --red-pen: #a13d2c;
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0/32px 32px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0/32px 32px,
    var(--paper);
  background-blend-mode: multiply, multiply, normal;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.65;
}

body::before{
  content:"";
  position:fixed; inset:0;
  background-image: radial-gradient(circle at 1px 1px, rgba(31,42,36,0.05) 1px, transparent 0);
  background-size: 4px 4px;
  pointer-events:none;
  z-index:0;
}

a{ color: var(--teal); }
a:hover{ color: var(--red-pen); }
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--brass-deep);
  outline-offset: 3px;
}

.wrap{
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 96px;
  position: relative;
  z-index: 1;
}

/* ---------- header / cover ---------- */

header{
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--grid-line);
  position: relative;
}

.stamp{
  position: absolute;
  top: 48px;
  right: 0;
  width: 92px;
  height: 92px;
  border: 2px solid var(--red-pen);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--red-pen);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-9deg);
  opacity: 0.75;
  line-height: 1.3;
  font-weight: 600;
}

.eyebrow{
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 14px;
}

h1{
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(34px, 6vw, 50px);
  line-height: 1.06;
  margin: 0 0 18px;
  max-width: 11ch;
  color: var(--ink);
}

.lede{
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 28px;
}

nav{
  display:flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.03em;
}
nav a{
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
nav a:hover{ border-bottom-color: currentColor; }

/* ---------- log entries ---------- */

.log{ padding-top: 44px; }

.log-heading{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  color: var(--brass-deep);
  margin: 0 0 26px;
  display:flex;
  align-items:center;
  gap: 12px;
}
.log-heading::after{
  content:"";
  flex:1;
  height:1px;
  background: var(--grid-line);
}

article.entry{
  position: relative;
  padding: 22px 0 26px 68px;
  border-bottom: 1px dashed var(--grid-line);
}
article.entry:last-child{ border-bottom: none; }

.entry-date{
  position: absolute;
  left: 0;
  top: 24px;
  width: 52px;
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.entry-date .day{
  display:block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--brass);
}

.entry h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 8px;
}
.entry h2 a{
  color: var(--ink);
  text-decoration: none;
}
.entry h2 a:hover{ color: var(--red-pen); }

.tag{
  display:inline-block;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 3px;
  padding: 2px 7px;
  margin: 0 8px 10px 0;
}

.entry p{
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 58ch;
}

/* ---------- signature: margin ruler ---------- */

.ruler{
  position: fixed;
  left: max(8px, calc(50% - 460px));
  top: 0;
  bottom: 0;
  width: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 0;
  z-index: 0;
  pointer-events: none;
}
.ruler span{
  display:block;
  width: 8px;
  height: 1px;
  background: var(--grid-line);
}
@media (max-width: 900px){ .ruler{ display:none; } }

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

footer{
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--grid-line);
  font-size: 12px;
  color: var(--ink-soft);
  display:flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (prefers-reduced-motion: no-preference){
  article.entry{ transition: transform 160ms ease; }
  article.entry:hover{ transform: translateX(3px); }
}
