/* ------------------------------------------------------------------
   dew.pt — the blog
   Design language: New York City Transit Authority, 1970 Graphics
   Standards Manual / Massimo Vignelli's 1972 Subway Diagram.
   Sister site to daniilkulchenko.com; shares its vocabulary.
   The index is a subway line; each post is a numbered station.
   Helvetica when you have it, Archivo when you don't.
------------------------------------------------------------------- */

:root{
  --cream:   #F2EDE0;   /* Vignelli map field */
  --paper:   #F8F5EC;
  --ink:     #0F0F10;   /* signage black */
  --ink-2:   #2A2A30;
  --red:     #EE352E;   /* 1·2·3 */
  --orange:  #FF6319;   /* B·D·F·M */
  --yellow:  #FCCC0A;   /* N·Q·R·W */
  --green:   #00933C;   /* 4·5·6 */
  --blue:    #0039A6;   /* A·C·E */
  --purple:  #B933AD;   /* 7 */
  --brown:   #996633;   /* J·Z */
  --amber:   #FFB52E;   /* departure board */
  --font: "Helvetica Neue", Helvetica, "Archivo", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --c: var(--ink);      /* per-page route color; overridden per post */
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%;}
body{
  font-family:var(--font);
  background:var(--cream);
  color:var(--ink);
  font-weight:500;
  line-height:1.45;
  overflow-x:hidden;
}
::selection{background:var(--yellow); color:var(--ink);}
img{display:block; max-width:100%;}
a{color:inherit;}

.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.wrap{max-width:1100px; margin:0 auto;}

/* ---------- top bar: station entrance lintel ---------- */
.topbar{
  position:sticky; top:0; z-index:60;
  background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:12px clamp(16px, 4vw, 32px);
  border-bottom:1px solid rgba(255,255,255,.14);
}
.brand{display:flex; align-items:center; gap:11px; text-decoration:none; font-weight:800; letter-spacing:-.01em; font-size:17px; white-space:nowrap;}
.brand img{width:26px; height:26px; border-radius:6px;}
.topnav{display:flex; gap:clamp(14px,3vw,28px);}
.topnav a{
  color:#fff; text-decoration:none; font-weight:700; font-size:14px; letter-spacing:.02em; opacity:.9;
}
.topnav a:hover{opacity:1; text-decoration:underline; text-decoration-color:var(--yellow); text-decoration-thickness:3px; text-underline-offset:6px;}

/* ---------- route-color band ---------- */
.stripes{
  height:24px;
  background:linear-gradient(
    var(--red)    0 20%,
    var(--orange) 20% 40%,
    var(--yellow) 40% 60%,
    var(--green)  60% 80%,
    var(--blue)   80% 100%);
}

/* ---------- masthead (index) ---------- */
.masthead{padding:clamp(48px,8vh,90px) clamp(20px,4vw,32px) clamp(36px,5vh,56px);}
.masthead h1{
  font-size:clamp(54px,11vw,128px);
  font-weight:800; letter-spacing:-.045em; line-height:.9;
}
.masthead .tag{
  margin-top:clamp(16px,2.5vh,24px);
  font-size:clamp(18px,2.4vw,26px); font-weight:800; letter-spacing:-.02em;
  max-width:680px;
}
.masthead .byline{
  margin-top:14px; font-size:clamp(15px,2vw,18px); color:var(--ink-2); font-weight:600;
}
.masthead .byline a{font-weight:800; text-decoration:underline; text-decoration-color:var(--red); text-decoration-thickness:3px; text-underline-offset:4px;}
.masthead .byline a:hover{text-decoration-color:var(--ink);}

/* ---------- the line (post list) ---------- */
.line{padding:clamp(8px,2vh,16px) clamp(20px,4vw,32px) clamp(72px,9vh,110px);}
.line-inner{max-width:1100px; margin:0 auto;}
.signbar{
  background:var(--ink); color:#fff;
  border-radius:6px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px clamp(16px,2.5vw,24px);
  margin-bottom:52px;
}
.signbar h2{font-size:clamp(19px,3vw,28px); font-weight:800; letter-spacing:-.02em;}
.signbar .svc{font-size:13px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; opacity:.85; white-space:nowrap;}

.stations{position:relative; --railw:84px;}
.station{
  position:relative;
  display:grid;
  grid-template-columns:var(--railw) 132px 1fr;
  grid-template-areas:"rail meta content";
  column-gap:clamp(18px,3vw,34px);
  --pad:clamp(48px,7vh,76px);
  padding-bottom:var(--pad);
}
.rail{grid-area:rail; position:relative;}
/* One unbroken line: each stop's segment is its own route color (--c) and extends a
   full --pad below its cell so it meets the next stop with no gap. */
.rail::before{
  content:""; position:absolute;
  left:calc(50% - 8px); top:-10px; bottom:calc(-1 * var(--pad)); width:16px;
  background:var(--c);
}
.station:first-child .rail::before{top:-40px; border-radius:8px 8px 0 0;}
.station:last-child .rail::before{bottom:-44px; border-radius:0 0 8px 8px;}
.station:last-child .rail::after{ /* terminal tick */
  content:""; position:absolute;
  left:calc(50% - 18px); bottom:-53px;
  width:36px; height:9px; border-radius:5px;
  background:var(--ink);
}
.dot{
  position:absolute; left:50%; top:8px;
  width:27px; height:27px; border-radius:50%;
  background:var(--ink);
  box-shadow:0 0 0 5px var(--cream);
  transform:translateX(-50%);
  z-index:2;
}

.meta{grid-area:meta; padding-top:2px;}
.bullet{
  width:48px; height:48px; border-radius:50%; background:var(--c);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:24px; font-weight:800; flex:none;
}
.years{display:block; margin-top:14px; font-size:17px; font-weight:800; letter-spacing:-.02em; white-space:nowrap;}
.role{display:block; margin-top:6px; font-size:12px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:#6B6B72;}

.content{grid-area:content;}
.content h3{font-size:clamp(28px,4.2vw,44px); font-weight:800; letter-spacing:-.03em; line-height:1.02;}
.content h3 a{text-decoration:none;}
.content h3 a:hover{text-decoration:underline; text-decoration-color:var(--c); text-decoration-thickness:6px; text-underline-offset:8px;}
.content .body{margin-top:14px; font-size:17px; line-height:1.6; color:#1C1C22; max-width:640px;}
.content .more{
  margin-top:16px; display:inline-flex; align-items:center; gap:9px;
  text-decoration:none; font-weight:800; font-size:14px;
  background:var(--ink); color:#fff; padding:9px 16px; border-radius:999px;
  transition:background .2s ease, transform .2s ease;
}
.content .more:hover{background:var(--c); transform:translateY(-2px);}

/* ---------- post page ---------- */
.post-head{padding:clamp(40px,6vh,72px) clamp(20px,4vw,32px) clamp(20px,3vh,30px);}
.post-head .crumb{
  display:inline-flex; align-items:center; gap:8px; text-decoration:none;
  font-weight:800; font-size:13.5px; letter-spacing:.02em; color:var(--ink-2);
  margin-bottom:30px;
}
.post-head .crumb .arr{
  width:28px; height:28px; border-radius:50%; background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:15px;
  transition:transform .25s ease;
}
.post-head .crumb:hover .arr{transform:translateX(-4px);}
.post-head .hgroup{display:flex; align-items:flex-start; gap:18px;}
.post-head .bullet{margin-top:6px;}
.post-head h1{font-size:clamp(34px,6vw,66px); font-weight:800; letter-spacing:-.035em; line-height:1.0;}
.post-head .kicker{margin-top:14px; font-size:13px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:#5A5A60;}

/* ---------- prose (rendered markdown) ---------- */
.prose{
  max-width:680px; margin:0 auto;
  padding:clamp(8px,2vh,20px) clamp(20px,4vw,32px) clamp(56px,8vh,88px);
  font-size:18px; line-height:1.66; color:#15151A;
}
.prose > * + *{margin-top:1.25em;}
.prose h2{font-size:clamp(26px,4vw,34px); font-weight:800; letter-spacing:-.025em; line-height:1.1; margin-top:1.7em;}
.prose h3{font-size:clamp(21px,3vw,26px); font-weight:800; letter-spacing:-.02em; margin-top:1.5em;}
.prose a{color:inherit; text-decoration:underline; text-decoration-color:var(--c); text-decoration-thickness:3px; text-underline-offset:3px; font-weight:600;}
.prose a:hover{text-decoration-color:var(--ink); background:rgba(0,0,0,.04);}
.prose strong{font-weight:800;}
.prose ul,.prose ol{padding-left:1.4em;}
.prose li + li{margin-top:.4em;}
.prose blockquote{
  border-left:10px solid var(--c);
  background:var(--paper);
  padding:14px 20px; border-radius:0 8px 8px 0;
  font-weight:600; color:var(--ink-2);
}
.prose code{
  font-family:var(--mono); font-size:.86em;
  background:#E7E1D2; padding:.12em .4em; border-radius:4px;
}
/* fenced code blocks read like a departure board */
.prose pre{
  background:var(--ink); color:var(--amber);
  padding:18px 20px; border-radius:8px; overflow-x:auto;
  font-size:14.5px; line-height:1.5;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.prose pre code{background:none; padding:0; color:inherit; font-size:1em;}
.prose img{border-radius:8px; margin:1.5em auto;}
.prose hr{border:none; height:8px; margin:2em 0;
  background:linear-gradient(90deg,
    var(--red) 0 20%, var(--orange) 20% 40%, var(--yellow) 40% 60%,
    var(--green) 60% 80%, var(--blue) 80% 100%);
  border-radius:4px;}
.prose table{width:100%; border-collapse:collapse; font-size:15.5px;}
.prose th,.prose td{text-align:left; padding:9px 12px; border-bottom:2px solid #E0DACB;}
.prose th{font-weight:800; letter-spacing:.02em;}

/* ---------- byline notice (bottom of post) ---------- */
.colophon{padding:0 clamp(20px,4vw,32px) clamp(64px,9vh,100px);}
.notice{
  max-width:680px; margin:0 auto;
  background:var(--paper); color:var(--ink);
  border-radius:10px; padding:24px clamp(20px,3vw,28px);
  border-left:14px solid var(--c);
}
.notice .label{display:flex; align-items:center; gap:10px; font-size:11.5px; font-weight:800; letter-spacing:.2em; text-transform:uppercase;}
.notice .label::before{content:"D"; width:22px; height:22px; border-radius:50%; background:var(--c); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; letter-spacing:0;}
.notice h3{margin-top:14px; font-size:clamp(21px,3vw,27px); font-weight:800; letter-spacing:-.025em; line-height:1.1;}
.notice p{margin-top:10px; font-size:15.5px; line-height:1.6; color:var(--ink-2);}
.notice .links{margin-top:18px; display:flex; flex-wrap:wrap; gap:10px;}
.chip{
  text-decoration:none; background:var(--ink); color:#fff;
  font-size:13.5px; font-weight:700; padding:9px 16px; border-radius:999px;
  transition:background .2s ease, transform .2s ease;
}
.chip:hover{background:var(--c); transform:translateY(-2px);}

/* ---------- footer ---------- */
footer{background:var(--ink); color:#C9C5B8;}
footer .band{height:10px; background:linear-gradient(90deg,
  var(--red) 0 20%, var(--orange) 20% 40%, var(--yellow) 40% 60%,
  var(--green) 60% 80%, var(--blue) 80% 100%);}
.foot-inner{
  max-width:1100px; margin:0 auto;
  display:flex; flex-wrap:wrap; gap:14px 32px; justify-content:space-between;
  padding:28px clamp(20px,4vw,32px) 40px;
  font-size:13.5px; line-height:1.6;
}
.foot-inner a{color:#fff; font-weight:700; text-decoration:none;}
.foot-inner a:hover{text-decoration:underline; text-decoration-color:var(--yellow); text-decoration-thickness:3px; text-underline-offset:5px;}

/* ---------- motion ---------- */
.fx{animation:fadeUp .7s cubic-bezier(.2,.7,.2,1) both; animation-delay:var(--d,0s);}
@keyframes fadeUp{from{opacity:0; transform:translateY(22px);} to{opacity:1; transform:none;}}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation:none !important; transition:none !important;}
}

/* ---------- responsive ---------- */
@media (max-width: 859px){
  .stations{--railw:48px;}
  .station{
    grid-template-columns:var(--railw) 1fr;
    grid-template-areas:"rail meta" "rail content";
    column-gap:18px;
  }
  .rail::before{left:calc(50% - 7px); width:14px;}
  .dot{width:23px; height:23px;}
  .meta{display:flex; align-items:center; gap:14px; padding-top:0; margin-bottom:12px; flex-wrap:wrap;}
  .bullet{width:40px; height:40px; font-size:20px;}
  .years{margin-top:0; font-size:16px;}
  .role{margin-top:0; width:100%;}
  .station:last-child .rail::after{left:calc(50% - 15px); width:30px;}
  .post-head .hgroup{gap:14px;}
}
@media (max-width: 540px){
  .topnav a{font-size:13px;}
  .brand{font-size:15px;}
  .signbar .svc{display:none;}
}
