:root {
  --ground: #14181a;
  --line: #262f2c;
  --ink: #e7ece9;
  --muted: #8a938f;
  --stamp-red: #d6483a;
  --unit: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  background-image:
    linear-gradient(rgba(231, 236, 233, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 236, 233, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.6;
}

.log {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--unit) * 2) var(--unit);
}

.entry {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--unit);
  padding-bottom: var(--unit);
  margin-bottom: var(--unit);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.entry:last-child {
  border-bottom: none;
}

.entry__margin {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.entry__num {
  color: var(--ink);
  font-weight: 600;
}

.entry__title {
  margin: 0 0 8px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.2;
}

.entry--header .entry__title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  display: inline-block;
}

/* Signature moment: the header reads as a live log line, cursor still blinking. */
.entry--header .entry__body::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--stamp-red);
  animation: cursor-blink 1.1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry--header .entry__body::after {
    animation: none;
  }
}

.entry__body {
  margin: 0;
  max-width: 70ch;
}

.entry__link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry__link:hover {
  text-decoration-thickness: 2px;
}

.entry__link:focus-visible {
  outline: 1px solid var(--stamp-red);
  outline-offset: 2px;
}

.tag {
  display: inline-block;
  width: fit-content;
  border: 1px solid var(--stamp-red);
  color: var(--stamp-red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
}

.tag--progress {
  border-style: dashed;
}

.entry--status .tag {
  background: var(--stamp-red);
  color: var(--ground);
}

@media (max-width: 640px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entry__margin {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(var(--unit) / 2);
  }
}
