:root {
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --ink: #1d1b18;
  --ink-2: #4a453d;
  --dim: #8c8577;
  --rule: #d6cdbc;
  --ember: #c4572e;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, p, ol, figure { margin: 0; padding: 0; }
ol { list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1.5px solid var(--ember); outline-offset: 4px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font: 400 11.5px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.dim { color: var(--dim); }

/* Top bar */
.bar {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 26px;
}

/* Hero */
.hero { padding-top: clamp(72px, 14vh, 150px); }
.wordmark {
  font: 400 clamp(58px, 11.2vw, 172px)/0.9 var(--serif);
  letter-spacing: -0.025em;
  margin-left: -0.04em;
}
.wordmark em { font-style: italic; color: var(--ember); letter-spacing: -0.01em; }

/* Elevation profile */
.profile { margin-top: clamp(64px, 10vw, 130px); }
.profile-inner { position: relative; }
.profile svg { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; overflow: visible; }
.land { fill: var(--paper); }
.contours use { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.contours use:nth-child(n+4) { stroke-dasharray: 2 5; }
.road {
  fill: none; stroke: var(--ink); stroke-width: 1.6;
  stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: draw 2.6s cubic-bezier(.6,.05,.25,1) both;
}
.wp line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wp-live circle:not(.glow) { fill: var(--ink); }
.wp { animation: rise .8s ease-out both; }
.wp-live { animation-delay: .9s; }
.glow { transform-origin: 260px 118.7px; animation: breathe 5s ease-in-out 2.6s infinite; }

.tag {
  position: absolute; transform: translate(-50%, calc(-100% - 8px));
  white-space: nowrap;
  animation: rise .8s ease-out both;
}
.tag-live {
  font: 400 clamp(20px, 2.1vw, 28px)/1 var(--serif);
  display: inline-flex; align-items: baseline; gap: 10px;
  animation-delay: 1s;
}
.tag-live .mono { color: var(--ember); }
.tag-live:hover { color: var(--ember); }

.profile-inner { border-bottom: 1px solid var(--ink); }

@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes rise { from { opacity: 0; translate: 0 6px; } }
@keyframes breathe { 50% { opacity: .45; transform: scale(.82); } }

.index {
  display: grid; grid-template-columns: minmax(140px, 1fr) 3fr;
  gap: 24px clamp(24px, 4vw, 64px);
  padding-top: clamp(80px, 11vw, 150px);
}
.label h2 { font-weight: 400; position: sticky; top: 24px; }

/* Index */
.rows { border-top: 1px solid var(--ink); }
.row { border-bottom: 1px solid var(--rule); }
.row > a {
  display: grid;
  grid-template-columns: 64px minmax(160px, 1.1fr) 2fr 150px;
  gap: 8px 28px; align-items: baseline;
  padding: 26px 0 28px;
}
.row .name { font: 400 clamp(28px, 3vw, 40px)/1.05 var(--serif); letter-spacing: -0.01em; }
.row .desc { color: var(--ink-2); max-width: 46ch; }
.row .meta { display: grid; justify-items: end; gap: 10px; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px rgb(196 87 46 / .15); }
.url span { display: inline-block; transition: transform .25s ease; }
.row > a { transition: background-color .25s ease, padding .25s ease; }
.row > a:hover { background: var(--paper-2); padding-left: 14px; padding-right: 14px; margin: 0 -14px; }
.row > a:hover .url span { transform: translate(2px, -2px); }
.row > a:hover .name { color: var(--ember); }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  margin-top: clamp(96px, 12vw, 170px);
  padding-top: 18px; padding-bottom: 40px;
  background: linear-gradient(var(--ink), var(--ink)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.foot a:hover { color: var(--ember); }

/* Small screens */
@media (max-width: 760px) {
  .index { grid-template-columns: 1fr; }
  .label h2 { position: static; }
  .row > a { grid-template-columns: 44px 1fr; }
  .row .desc, .row .meta { grid-column: 2; }
  .row .meta { justify-items: start; grid-auto-flow: column; gap: 20px; margin-top: 6px; }
  .profile { overflow: hidden; padding-top: 44px; margin-top: 28px; }
  .profile-inner { width: 160%; margin-left: -14%; }
}

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