/* whisper devlog — minimal, sharp, monospace.
   The one ornament is the device bar: black slab, one purple button.
   To restyle, the knobs are --purple, --bar-h, --dot and --dot-x below. */

:root {
  --purple: #7C3AED;
  --ink:    #111111;
  --muted:  #6B6B6B;
  --hair:   #E2E2E2;
  --bar-h:  20px;   /* separator height */
  --dot:    32px;   /* the button — deliberately larger than --bar-h, so it
                       overflows the slab top and bottom */
  --dot-x:  30px;   /* button inset from the left edge */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco,
          Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html { color-scheme: light; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 68ch; margin: 0 auto; padding: 0 30px; }

/* ---- masthead ---- */

.masthead { padding: 56px 0 28px; }
.masthead a { text-decoration: none; color: inherit; border: 0; }
.masthead h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.masthead h1 .tag { color: var(--purple); font-weight: 400; }
.masthead p { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 60ch; }

/* ---- the device bar: the only separator on the page ---- */

.device-bar {
  position: relative;
  z-index: 1;            /* keep the overflowing button above the content below */
  height: var(--bar-h);
  background: #000000;
}

.device-bar::after {
  content: "";
  position: absolute;
  left: var(--dot-x);
  top: 50%;
  transform: translateY(-50%);
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;          /* the button — the only curve on the page */
  background: var(--purple);
}

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

main { padding: 44px 0 40px; }

article { margin: 0 0 88px; scroll-margin-top: 24px; }
article:last-of-type { margin-bottom: 40px; }

article h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.35; }

article h2 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
article h2 a:hover { background: none; color: var(--purple); border-bottom-color: var(--purple); }

.meta {
  margin: 0 0 1.8em;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.meta .d { color: var(--purple); }
.meta .k { color: var(--ink); }

/* ---- prose ---- */

p { margin: 0 0 1.1em; }
strong { font-weight: 700; }
em { font-style: italic; }

a { color: var(--purple); text-decoration: none; border-bottom: 1px solid var(--purple); }
a:hover { background: var(--purple); color: #FFFFFF; border-bottom-color: transparent; }

img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.6em 0;
  border: 1px solid var(--hair);
  background: #FAFAFA;
}

/* ---- photos: each links through to a larger copy in devlog/assets/full/.
   Cancels the global link styling, which would otherwise underline the photo
   and invert it to purple on hover. ---- */

a.shot { display: block; border: 0; cursor: zoom-in; }
a.shot:hover { background: none; }
a.shot:hover img { border-color: var(--purple); }

code { background: #F5F5F5; padding: 1px 4px; font-size: 0.92em; }
pre { background: #F5F5F5; padding: 14px 16px; overflow-x: auto; border-left: 2px solid var(--purple); }
pre code { background: none; padding: 0; }

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

footer { padding: 8px 0 60px; font-size: 12px; color: var(--muted); }

@media (max-width: 620px) {
  body { font-size: 14px; }
  .wrap { padding: 0 20px; }
  .masthead { padding: 36px 0 22px; }
  article { margin-bottom: 64px; }
  :root { --dot-x: 20px; }
}
