/* =================================================================
   snapshot — styles
   Edit the tokens in :root to re-skin the whole page from one place.
   ================================================================= */

:root {
  /* ── palette ────────────────────────────────────────────────── */
  --paper:      #e9e9e3;   /* page ground — quiet greige           */
  --surface:    #f1f1ea;   /* faint lift on hover                  */
  --ink:        #191c22;   /* primary text                        */
  --slate:      #5a6470;   /* labels, captions, secondary         */
  --hair:       #d2d2c9;   /* hairlines                           */
  --gold:       #b07515;   /* the one signal colour — "live"      */
  --gold-soft:  rgba(176, 117, 21, 0.14);

  /* ── type ───────────────────────────────────────────────────── */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ── measure & rhythm ───────────────────────────────────────── */
  --measure: 38rem;
  --step:    clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 5rem) clamp(1.4rem, 5vw, 2rem) 3rem;
}

/* =================================================================
   home button (used on archived pages to get back to the live one)
   ================================================================= */

.home {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-bottom: 2.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home:hover {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--surface);
}

.home .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.home:hover .arrow { transform: translateX(-0.2rem); }

/* =================================================================
   masthead + the live stamp (the signature)
   ================================================================= */

.masthead { margin-bottom: calc(var(--step) * 1.4); }

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin: 0 0 1.6rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--gold-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--slate);
  text-transform: uppercase;
}

.stamp time,
#snapshot-age { color: var(--ink); }

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 var(--gold);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(176, 117, 21, 0.5); }
  70%  { box-shadow: 0 0 0 0.5rem rgba(176, 117, 21, 0); }
  100% { box-shadow: 0 0 0 0 rgba(176, 117, 21, 0); }
}

/* a frozen past snapshot: no pulse, no signal colour */
.stamp--archived {
  background: transparent;
}

.stamp--archived .dot {
  background: var(--slate);
  box-shadow: none;
  animation: none;
}

.name {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 2rem + 6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.sub {
  margin: 0;
  max-width: 26rem;
  color: var(--slate);
  font-size: 1.05rem;
}

/* =================================================================
   section labels
   ================================================================= */

.section-label {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 1px;
  margin-right: 0.7rem;
  vertical-align: middle;
  background: var(--gold);
}

/* =================================================================
   now — the fields (a real definition list)
   ================================================================= */

.now { margin-bottom: calc(var(--step) * 1.5); }

.fields { margin: 0; }

.field {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.4rem 1.4rem;
  padding: 0.95rem 0.7rem;
  margin: 0 -0.7rem;
  border-top: 1px solid var(--hair);
  border-radius: 2px;
  transition: background 0.25s ease;
}

.field:last-child { border-bottom: 1px solid var(--hair); }
.field:hover { background: var(--surface); }

.field dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--slate);
  padding-top: 0.15rem;
}

.field dd {
  margin: 0;
  font-family: var(--display);
  font-size: 1.18rem;
  line-height: 1.45;
}

/* =================================================================
   notes — the micro-blog (dated prose, newest first)
   ================================================================= */

.notes { margin-bottom: calc(var(--step) * 1.5); }

.entries { margin: 0; }

.entry {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.4rem 1.4rem;
  padding: 1.2rem 0.7rem;
  margin: 0 -0.7rem;
  border-top: 1px solid var(--hair);
  border-radius: 2px;
  transition: background 0.25s ease;
}

.entry:last-child { border-bottom: 1px solid var(--hair); }
.entry:hover { background: var(--surface); }

.entry-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--slate);
  padding-top: 0.3rem;
}

.entry-body {
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 1.55;
}

.entry-body p { margin: 0 0 0.8rem; }
.entry-body p:last-child { margin-bottom: 0; }

/* =================================================================
   archive
   ================================================================= */

.archive { margin-bottom: calc(var(--step) * 1.2); }

.archive-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.archive-list a {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.archive-list a:hover {
  color: var(--ink);
  border-color: var(--gold);
}

/* =================================================================
   colophon
   ================================================================= */

.colophon {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--slate);
  border-top: 1px solid var(--hair);
  padding-top: 1.4rem;
}

/* =================================================================
   quality floor — focus, motion, small screens
   ================================================================= */

a:focus-visible,
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

@media (max-width: 30rem) {
  .field,
  .entry {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .field dt { padding-top: 0; }
  .entry-date { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  * { transition: none !important; }
}
