/* ============================================================
   brianerickson.co — "basecamp dark"
   Warm near-black, bone text, honey-amber accent.
   Type: Bricolage Grotesque (variable, self-hosted) + system mono.
   No JavaScript anywhere on this site.
   ============================================================ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #14110b;
  --bg-raised: #1c1812;
  --line: rgba(234, 227, 208, 0.14);
  --line-strong: rgba(234, 227, 208, 0.3);
  --bone: #eae3d2;
  --muted: #a79c82;
  --faint: #8a8069;
  --amber: #e8a03c;
  --amber-bright: #f5b963;
  --on-amber: #1a1508;
  --sans: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --wrap: 1440px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* warm glow up top, like a lamp in a dark tent */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(90rem 44rem at 70% -18%, rgba(232, 160, 60, 0.08), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 2;
}

main, .top, footer { position: relative; z-index: 1; }

::selection { background: var(--amber); color: var(--on-amber); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(232, 160, 60, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover { color: var(--amber-bright); text-decoration-color: var(--amber-bright); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--on-amber);
  padding: 0.6rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  z-index: 10;
  text-decoration: none;
}

.skip-link:focus { left: 1rem; top: 1rem; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- mono meta bits ---------- */

.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- header ---------- */

.top { padding: 1.6rem 0 0; }

.top__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 640;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--bone);
}

.brand svg { display: block; }

.top nav {
  display: flex;
  gap: clamp(0.9rem, 2.4vw, 1.7rem);
  flex-wrap: wrap;
}

.top nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
}

.top nav a:hover { color: var(--amber-bright); }

.top nav .n { color: var(--amber); margin-right: 0.3em; }

/* ---------- hero ---------- */

.hero { padding: clamp(4rem, 10vh, 7.5rem) 0 0; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.hero h1 {
  margin-top: 1.4rem;
  font-size: clamp(2.85rem, 8.4vw, 6.1rem);
  font-weight: 720;
  font-stretch: 94%;
  line-height: 1.01;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero h1 .amber { color: var(--amber); }

.hero__lede {
  margin-top: 1.9rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
  font-weight: 420;
}

.hero__lede strong { color: var(--bone); font-weight: 560; }

.hero__aside {
  width: 400px;
  max-width: 100%;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero__photo {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 0.5rem;
}

.hero__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}

.hero__photo figcaption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding: 0.6rem 0.35rem 0.15rem;
}

.hero__photo figcaption::before { content: "▲ "; color: var(--amber); }

.hero__stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  border-left: 2px solid var(--amber);
  padding: 0.1rem 0 0.1rem 0.9rem;
}

.hero__stats .meta { color: var(--muted); white-space: nowrap; }

/* ridgeline divider */

.ridge { margin-top: clamp(2.6rem, 6vh, 4.5rem); }

.ridge svg { display: block; width: 100%; height: auto; }

.ridge__path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 0;
  animation: draw 1.6s cubic-bezier(0.3, 0.6, 0.2, 1) both;
}

.ridge__peak { fill: var(--amber); }

.ridge__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  fill: var(--faint);
}

@keyframes draw {
  from { stroke-dashoffset: 2400; }
  to { stroke-dashoffset: 0; }
}

/* staggered entrance */

.rise {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

section[id] { scroll-margin-top: 2rem; }

.section { padding: clamp(3.6rem, 9vh, 6.2rem) 0 0; }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.8rem, 4vh, 2.8rem);
}

.section__num {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--amber);
  letter-spacing: 0.08em;
}

.section__title {
  font-size: 0.82rem;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__head::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
  transform: translateY(-0.2em);
}

.statement {
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  font-weight: 620;
  font-stretch: 96%;
  line-height: 1.22;
  letter-spacing: -0.018em;
  max-width: 46rem;
  text-wrap: balance;
}

.statement .amber { color: var(--amber); }

.prose {
  margin-top: 1.6rem;
  max-width: 40rem;
  color: var(--muted);
  display: grid;
  gap: 1rem;
}

.prose a { color: var(--bone); }

.prose a:hover { color: var(--amber-bright); }

/* ---------- link ledger rows ---------- */

.links { margin-top: 2.4rem; max-width: 40rem; }

.links a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0.15rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--bone);
  font-weight: 540;
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.links a:last-child { border-bottom: 1px solid var(--line); }

.links a .where {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-left: auto;
  white-space: nowrap;
}

.links a .arr { color: var(--amber); transition: transform 0.2s ease; }

.links a:hover { background: var(--bg-raised); padding-left: 0.6rem; color: var(--amber-bright); }

.links a:hover .arr { transform: translate(3px, -2px); }

/* ---------- path ledger ---------- */

.ledger { max-width: 44rem; }

.ledger__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1.4rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.ledger__row:last-child { border-bottom: 1px solid var(--line); }

.ledger__term {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  padding-top: 0.45em;
}

.ledger__desc { color: var(--muted); }

.ledger__desc strong { color: var(--bone); font-weight: 560; }

/* ---------- experiments ---------- */

.exp { margin-top: 2.6rem; max-width: 44rem; display: grid; gap: 2.4rem; }

.exp__item { border-top: 1px solid var(--line); padding-top: 1.5rem; }

.exp__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.exp__head h3 {
  font-size: 1.45rem;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.exp__head .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.exp__head .visit {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--amber);
  white-space: nowrap;
}

.exp__head .visit:hover { color: var(--amber-bright); }

.exp__item p { margin-top: 0.8rem; color: var(--muted); max-width: 40rem; }

/* ---------- field notes ---------- */

.photos {
  margin-top: 2.6rem;
  max-width: 46rem;
}

.photos figure {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

.photos img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  display: block;
  filter: saturate(0.92);
}

.photos figcaption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding: 0.65rem 0.35rem 0.25rem;
}

.photos figcaption::before { content: "▲ "; color: var(--amber); }

/* ---------- say hi ---------- */

.hi {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  max-width: 44rem;
}

.hi__portrait {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  padding: 3px;
  background: var(--bg-raised);
  margin-top: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--amber);
  border-radius: 2px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover { background: var(--amber); color: var(--on-amber); }

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

footer { margin-top: clamp(4rem, 10vh, 7rem); border-top: 1px solid var(--line); }

.footer__inner {
  padding-top: 1.6rem;
  padding-bottom: 2.4rem;
  display: grid;
  gap: 1.1rem;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__row nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

.footer__row a {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
}

.footer__row a:hover { color: var(--amber-bright); }

.footer__note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.06em;
}

.footer__note .amber { color: var(--amber); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .hero__grid { grid-template-columns: 1fr; }

  .hero__aside { width: auto; }

  .hero__stats {
    flex-direction: row;
    gap: 1.2rem;
    flex-wrap: wrap;
  }

  .ledger__row { grid-template-columns: 1fr; gap: 0.35rem; padding: 1rem 0; }

  .ledger__term { padding-top: 0; }

  .hi { grid-template-columns: 1fr; gap: 1.4rem; }

  .top nav .n { display: none; }

  .ridge__label { font-size: 26px; letter-spacing: 0.1em; }

  .ridge__peak { r: 5; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .rise, .ridge__path { animation: none; }

  * { transition: none !important; }
}
