/* Site — the whole page, home and articles.
   One identity: black water, one light, one accent. Mono throughout, because
   the background is a glyph grid, so the text and the fish are cut from the
   same stock.

   Home: a living ocean behind a single column, readability carried by
   line-measured text pockets (static/js/veil.js).
   Article: a frozen frame of the same ocean as the cover, then flat black for
   reading. */

*{ box-sizing:border-box; }

:root{
  color-scheme:dark;
  --water:  #000000;
  --bg:     #000000;   /* article figures fill badges with this */
  --ink:    #ededed;
  --dim:    #9a9a9a;
  --muted:  #9a9a9a;   /* article figures are drawn with this name */
  --faint:  #5e5e5e;
  --rule:   rgba(255,255,255,.1);
  /* classic Google link blue, hover only. The search-result ink is #1a0dab,
     which is 1.6:1 on black; this is the brand blue, which reads. */
  --link:      #4285f4;
  --accent:    #4285f4;   /* icons, arrows, focus, selection */
  --veil-blur: 6px;    /* text pockets: focus loss under the words */
  --veil-dim: .3;      /* …and how far they knock the water back */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body{
  margin:0;
  background:var(--water);
  color:var(--ink);
  font:400 14px/1.6 var(--mono);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

::selection{ background:var(--link); color:#000; }

/* ---------- links ---------- */

a{
  color:var(--ink);
  text-decoration:none;
  transition:color .15s ease;
}
/* google convention: ink until you touch it, then the blue */
a:hover, a:focus-visible{
  color:var(--link);
  text-decoration:underline;
  text-underline-offset:.25em;
}
a:focus-visible{ outline:1px solid var(--accent); outline-offset:3px; }

/* ---------- shared text shapes ---------- */

.eyebrow{
  margin:0 0 6px;
  color:var(--dim);
  font-size:10.5px;
  letter-spacing:.22em;
  text-transform:uppercase;
}

.meta{
  margin:0;
  color:var(--dim);
  font-size:12px;
}

/* ================= home ================= */

/* the ocean: fixed, under everything, and never intercepts a click */
.ocean-bg{
  position:fixed;
  inset:0;
  z-index:-2;
  display:block;
  width:100%;
  height:100%;
  pointer-events:none;
}

.page{
  position:relative;
  z-index:0;
  min-height:100dvh;
  max-width:760px;
  margin-inline:auto;
  padding:clamp(24px, 4vh, 44px) 28px 20px;
  display:flex;
  flex-direction:column;
}

/* Text pockets — the only readability device on the page.
   No panel, no shaded column. static/js/veil.js measures every line box and
   drops one soft blurred pill behind it, so the frost follows the ragged edge
   of the words and dies out a few pixels outside them: the water simply gets
   calmer where you are reading. Pills sit in one layer below the text, so they
   blur the canvas and nothing else. */
.veil-layer{
  position:absolute;
  top:0;
  left:0;
  z-index:-1;
  pointer-events:none;
}
.veil-pill{
  position:absolute;
  background:rgba(0,0,0,calc(var(--veil-dim) * .8));
  -webkit-backdrop-filter:blur(var(--veil-blur)) brightness(.68) saturate(.85);
  backdrop-filter:blur(var(--veil-blur)) brightness(.68) saturate(.85);
  /* a pill, not a rectangle: the mask is the only edge it has */
  -webkit-mask-image:radial-gradient(closest-side, #000 42%, rgba(0,0,0,.6) 72%, transparent 100%);
  mask-image:radial-gradient(closest-side, #000 42%, rgba(0,0,0,.6) 72%, transparent 100%);
}

/* content hangs from the top like a document; the footer keeps the floor */
.page main{ padding:44px 0 0; }

.page h1{
  margin:0;
  font-size:clamp(20px, 2.6vw, 24px);
  font-weight:500;
  letter-spacing:-.01em;
  line-height:1.2;
}

.page section + section{ margin-top:36px; }

.page h2{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 12px;
  color:var(--dim);
  font-size:11px;
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
}
.page h2::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--rule);
}

.page p{
  margin:0 0 12px;
  max-width:56ch;
}

/* contact: icon + label, wrapped as one row set */
.contact{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:10px 26px;
  margin:16px 0 0;
  padding:0;
  font-size:13px;
}
.contact li{
  display:flex;
  align-items:center;
  gap:8px;
}
.contact svg{
  flex:none;
  color:var(--faint);
  transition:color .15s ease;
}
.contact li:hover svg{ color:var(--accent); }
.contact a{ text-decoration:none; }

/* live work: an arrow carries the list */
.items{
  list-style:none;
  margin:0;
  padding:0;
}
.items li + li{ margin-top:6px; }
.items a{ text-decoration:none; }
.items a::before{
  content:"\2192";
  display:inline-block;
  margin-right:.7em;
  color:var(--faint);
  transition:color .15s ease, transform .15s ease;
}
.items a:hover::before{
  color:var(--accent);
  transform:translateX(2px);
}

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

footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:8px 16px;
  padding-top:14px;
  border-top:1px solid var(--rule);
  color:var(--dim);
  font-size:11.5px;
}
footer p{
  margin:0;
  max-width:none;
}
/* the home footer sits on raw water, outside the veil */
.page footer{
  margin-top:auto;
  text-shadow:0 0 8px #000;
}

/* ================= article ================= */

/* The cover: one frozen frame of the water, drawn once by the same engine that
   animates the home page (options {seed, still}), then left alone. The title
   sits on the lower edge of it, over a gradient — a shadow, never a panel. */
.cover{
  position:relative;
  height:clamp(280px, 40vh, 440px);
  overflow:hidden;
}
.cover-water{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  font:400 13px/1 var(--mono);   /* glyph size of the water */
}
.cover::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,
    rgba(0,0,0,.62) 0%,
    rgba(0,0,0,.22) 18%,
    transparent 40%,
    var(--water) 92%);
}
.cover-inner{
  position:absolute;
  inset:0;
  z-index:1;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  width:100%;
  max-width:760px;
  margin-inline:auto;
  padding:18px 28px 24px;
}

.chrome{
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-size:10.5px;
  letter-spacing:.22em;
  text-transform:uppercase;
  /* it sits on water: same treatment as the title */
  text-shadow:0 0 12px rgba(0,0,0,.9), 0 1px 2px rgba(0,0,0,.9);
}
.chrome a{ color:var(--dim); }
.chrome a:hover{ color:var(--link); }

.cover-title h1{
  margin:0 0 4px;
  font-size:clamp(24px, 3.4vw, 32px);
  font-weight:500;
  letter-spacing:-.01em;
  line-height:1.15;
  text-shadow:0 0 22px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.9);
}

/* the reading column: same measure as the home page, a touch larger, and
   nothing but text */
.essay{
  max-width:760px;
  margin:0 auto;
  padding:10px 28px 0;
  font-size:15px;
  line-height:1.7;
}

.essay p{
  margin:0 0 16px;
  max-width:64ch;
}
.essay p:first-of-type{ margin-top:0; }

.essay h2{
  display:flex;
  align-items:center;
  gap:14px;
  margin:44px 0 14px;
  color:var(--dim);
  font-size:11px;
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
}
.essay h2::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--rule);
}

.essay h3{
  margin:28px 0 10px;
  font-size:14px;
  font-weight:500;
  letter-spacing:.02em;
}

.essay a{
  text-decoration:underline;
  text-decoration-color:color-mix(in srgb, currentColor 32%, transparent);
  text-underline-offset:.22em;
  text-decoration-thickness:1px;
}
.essay a:hover{ text-decoration-color:currentColor; }

.essay ul,
.essay ol{
  margin:0 0 18px;
  padding-left:1.2em;
  max-width:64ch;
}
.essay li{ margin:0 0 6px; }
.essay li::marker{ color:var(--faint); }

.essay blockquote{
  margin:0 0 18px;
  padding-left:16px;
  border-left:1px solid var(--rule);
  color:var(--dim);
  max-width:64ch;
}

.essay pre{
  margin:0 0 18px;
  padding:14px 16px;
  background:#0d0d0d;
  border:1px solid var(--rule);
  overflow-x:auto;
  font-size:13px;
  line-height:1.6;
}
.essay code{ font-size:.95em; }
.essay p code,
.essay li code{
  background:#0d0d0d;
  border:1px solid var(--rule);
  padding:.06em .3em;
}

.essay figure{ margin:28px 0; }
.essay figure svg,
.essay figure img{
  display:block;
  width:100%;
  max-width:min(100%, 520px);
  height:auto;
  margin:0 auto;
}
.essay figcaption{
  margin-top:10px;
  color:var(--dim);
  font-size:10.5px;
  letter-spacing:.18em;
  text-transform:uppercase;
  text-align:center;
}

.essay hr{
  margin:34px 0;
  border:0;
  border-top:1px solid var(--rule);
}

/* article footer keeps the same footer, aligned to the reading column */
.essay + footer{
  max-width:760px;
  margin:64px auto 0;
  padding:14px 28px 28px;
}

@media (prefers-reduced-motion:reduce){
  a, .contact svg, .items a::before{ transition:none; }
}
