/* =========================================================================
   Little Earth — "Relief map at night"
   Design tokens shared by the site and (later) the blog.
   ========================================================================= */
:root {
  /* Palette — deep night base, warm paper ink, topographic accents */
  --base:        #0b0f14;
  --base-2:      #0e141b;
  --panel:       #111a23;
  --panel-edge:  #1d2a36;
  --ink:         #f1ece1;   /* warm paper */
  --ink-dim:     #aab3bd;
  --ink-faint:   #6c7884;
  --land:        #e8742a;   /* topo "land" — primary accent (kin to the VI blog) */
  --land-bright: #ff9248;
  --contour:     #3fd1ad;   /* contour lines / spatial accent */
  --ocean:       #2b87c4;

  /* Type */
  --display: "Syne", "Trebuchet MS", sans-serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, monospace;

  /* Space + measure */
  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 72rem;
  --radius: 14px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--base);
  line-height: 1.6;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.075rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--contour); outline-offset: 3px; border-radius: 3px; }

/* =========================================================================
   Atmospheric field — contours, graticule, elevation glow
   ========================================================================= */
.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 15% -10%, #11202b 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 0%, #15110c 0%, transparent 45%),
    linear-gradient(180deg, var(--base) 0%, var(--base-2) 100%);
}

/* Faint lat/long graticule */
.field__grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(120, 150, 165, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 150, 165, .05) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: radial-gradient(120% 90% at 50% 20%, #000 35%, transparent 90%);
}

/* Topographic contour rings */
.field__topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translate3d(calc((var(--mx, .5) - .5) * -26px), calc((var(--my, .5) - .5) * -22px), 0);
  transition: transform .6s var(--ease);
}
.field__ridge {
  fill: none;
  stroke: var(--contour);
  stroke-width: 1.1;
  opacity: .16;
}
.field__ridge--two { stroke: var(--land); opacity: .12; }
.field__ridge use:first-child { stroke-width: 1.6; }

/* Warm elevation glow that tracks the pointer */
.field__glow {
  position: absolute;
  width: 60vmax; height: 60vmax;
  left: calc(var(--mx, .5) * 100%);
  top:  calc(var(--my, .35) * 100%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 116, 42, .14) 0%, transparent 60%);
  transition: left .7s var(--ease), top .7s var(--ease);
}

/* =========================================================================
   Masthead
   ========================================================================= */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  background: linear-gradient(180deg, rgba(11,15,20,.86), rgba(11,15,20,.4) 70%, transparent);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand__mark { color: var(--ink); display: grid; place-items: center; }
.blinky { width: 22px; height: auto; display: block; }
.brand__type { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -.01em;
}
.brand__sub {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .28rem;
}
.masthead__nav { display: flex; gap: clamp(.9rem, 3vw, 2rem); font-size: .82rem; }
.masthead__nav a {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--ink-dim);
  text-decoration: none;
  padding: .3rem 0;
  position: relative;
}
.masthead__nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1.5px; background: var(--land); transition: width .3s var(--ease);
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a:hover::after { width: 100%; }

/* =========================================================================
   Layout primitives
   ========================================================================= */
main { display: block; }
section { padding-inline: var(--pad); }
.section-head { max-width: var(--maxw); margin: 0 auto; padding-block: clamp(3rem, 8vw, 6rem) 2rem; }
.section-head__index {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--land); margin-bottom: .9rem;
}
.section-head__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem);
  letter-spacing: -.02em; line-height: 1.02;
}
.section-head__note { color: var(--ink-dim); margin-top: .9rem; max-width: 46ch; }

/* =========================================================================
   Hero — the title block of a map sheet
   ========================================================================= */
.hero { display: grid; place-items: center; padding-block: clamp(3.5rem, 11vh, 9rem); }
.sheet {
  position: relative;
  width: min(100%, var(--maxw));
  padding: clamp(1.8rem, 5vw, 4rem);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17,26,35,.72), rgba(12,18,24,.66));
  box-shadow: 0 40px 120px -40px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(3px);
}
/* corner survey ticks */
.tick { position: absolute; width: 14px; height: 14px; border: 2px solid var(--contour); opacity: .55; }
.tick--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tick--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.tick--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.tick--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.hero__eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-dim);
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--contour); box-shadow: 0 0 0 4px rgba(63,209,173,.16); }
.hero__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 1rem + 8vw, 6rem);
  line-height: .98; letter-spacing: -.03em;
  margin: 1.1rem 0 1.3rem;
}
.hero__title em {
  font-style: normal;
  color: var(--land);
  -webkit-text-stroke: 0;
  background: linear-gradient(100deg, var(--land), var(--land-bright));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__lede { max-width: 54ch; color: var(--ink-dim); font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); }
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 2rem 0 0; }

.btn {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .04em;
  text-decoration: none; padding: .85rem 1.4rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn--solid { background: var(--land); color: #1a0e06; font-weight: 700; }
.btn--solid:hover { background: var(--land-bright); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--panel-edge); color: var(--ink); }
.btn--ghost:hover { border-color: var(--contour); transform: translateY(-2px); }

.hero__legend {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1px; margin-top: 2.6rem;
  border-top: 1px solid var(--panel-edge); padding-top: 1.4rem;
}
.hero__legend dt { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--land); }
.hero__legend dd { color: var(--ink-dim); font-size: .9rem; margin-top: .3rem; }

/* =========================================================================
   Work — station / legend cards
   ========================================================================= */
.stations {
  max-width: var(--maxw); margin: 0 auto; padding-bottom: clamp(2rem, 6vw, 4rem);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--panel-edge); border: 1px solid var(--panel-edge); border-radius: var(--radius);
  overflow: hidden;
}
.station {
  background: linear-gradient(180deg, rgba(17,26,35,.7), rgba(12,18,24,.7));
  padding: clamp(1.5rem, 3.5vw, 2.6rem);
  display: flex; flex-direction: column; gap: .7rem;
  position: relative; transition: background .3s var(--ease);
}
.station:hover { background: linear-gradient(180deg, rgba(24,36,48,.9), rgba(15,23,30,.9)); }
.station__no { font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; color: var(--contour); }
.station__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); letter-spacing: -.01em; }
.station__desc { color: var(--ink-dim); flex: 1; }
.station__desc strong { color: var(--ink); font-weight: 600; }
.station__link {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  color: var(--land); text-decoration: none; margin-top: .4rem; align-self: start;
  display: inline-flex; gap: .5rem; align-items: center;
}
.station__link span { transition: transform .25s var(--ease); }
.station__link:hover span { transform: translateX(5px); }

/* =========================================================================
   Field Notes — blog teaser
   ========================================================================= */
.note-card {
  max-width: var(--maxw); margin: 0 auto;
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--panel-edge); border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 3rem);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(232,116,42,.14), transparent 55%),
    linear-gradient(180deg, rgba(17,26,35,.72), rgba(12,18,24,.7));
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.note-card:hover { transform: translateY(-3px); border-color: var(--land); }
.note-card__kicker { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--contour); }
.note-card__title { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 1rem + 2.4vw, 2.6rem); letter-spacing: -.02em; margin: .8rem 0 .7rem; }
.note-card__excerpt { color: var(--ink-dim); max-width: 60ch; }
.note-card__more { display: inline-block; margin-top: 1.2rem; font-family: var(--mono); font-size: .8rem; color: var(--land); }
.notes__all { max-width: var(--maxw); margin: 1.4rem auto 0; font-family: var(--mono); font-size: .82rem; }
.notes__all a { color: var(--ink-dim); text-decoration: none; }
.notes__all a:hover { color: var(--ink); }

/* =========================================================================
   Contact — survey benchmark plate
   ========================================================================= */
.contact { padding-block: clamp(3.5rem, 9vw, 7rem); }
.benchmark {
  max-width: 58rem; margin: 0 auto; text-align: center;
  border: 1px solid var(--panel-edge); border-radius: var(--radius);
  padding: clamp(2.2rem, 6vw, 4.5rem);
  background:
    repeating-linear-gradient(45deg, rgba(63,209,173,.04) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, rgba(17,26,35,.78), rgba(12,18,24,.74));
}
.benchmark__stamp { font-family: var(--mono); letter-spacing: .35em; font-size: .7rem; color: var(--contour); }
.benchmark__title { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 1rem + 4vw, 3.4rem); letter-spacing: -.02em; margin: .8rem 0 .6rem; }
.benchmark__lede { color: var(--ink-dim); max-width: 48ch; margin: 0 auto 2.4rem; }
.benchmark__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 1rem; text-align: left;
}
.benchmark__grid dt { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-faint); margin-bottom: .4rem; }
.benchmark__grid dd { font-size: .98rem; }
.benchmark__grid a { color: var(--land); text-decoration: none; }
.benchmark__grid a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   Work / track-record page (/work/)
   Reuses .hero/.sheet, .section-head, .stations/.station, .benchmark.
   These add only the prose, capability-row, and tag-chip pieces.
   ========================================================================= */
.station__stack {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .03em;
  color: var(--ink-faint); margin-top: .5rem;
}
.cv-prose { max-width: 62ch; margin: 0 auto; }
.cv-prose p { color: var(--ink-dim); margin-bottom: 1.1rem; }
.cv-prose p:last-child { margin-bottom: 0; }
.cv-prose strong { color: var(--ink); font-weight: 600; }

.cv-foot {
  max-width: var(--maxw); margin: 1.6rem auto 0;
  font-family: var(--mono); font-size: .8rem; color: var(--ink-faint);
}
.cv-foot a { color: var(--ink-dim); }
.cv-foot a:hover { color: var(--land); }

/* =========================================================================
   Colophon
   ========================================================================= */
.colophon {
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; align-items: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem var(--pad) 3rem;
  border-top: 1px solid var(--panel-edge);
  font-family: var(--mono); font-size: .72rem; color: var(--ink-faint); letter-spacing: .04em;
}
.colophon__coord { display: flex; align-items: center; gap: .5rem; }
.colophon a { color: var(--ink-dim); }

/* =========================================================================
   Motion
   ========================================================================= */
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.08); }
}
.blinky__eye { transform-box: fill-box; transform-origin: center; animation: blink 6.5s var(--ease) infinite; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sheet > *, .section-head > *, .station, .note-card, .benchmark > * {
  animation: rise .8s var(--ease) both;
}
.sheet > *:nth-child(6) { animation-delay: .05s; }
.sheet > *:nth-child(7) { animation-delay: .12s; }
.sheet > *:nth-child(8) { animation-delay: .19s; }
.sheet > *:nth-child(9) { animation-delay: .26s; }
.station:nth-child(1) { animation-delay: .04s; }
.station:nth-child(2) { animation-delay: .12s; }
.station:nth-child(3) { animation-delay: .2s; }
.station:nth-child(4) { animation-delay: .28s; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 720px) {
  .masthead__nav { gap: 1.1rem; }
  .brand__sub { display: none; }
  .stations { grid-template-columns: 1fr; }
  .hero__legend { grid-template-columns: 1fr; gap: 1rem; }
  .benchmark__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .benchmark__grid { grid-template-columns: 1fr; }
}

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