/* ETHAN WEST — design system
   A navigational archive for purposeful exploration into the unknown.
   Aesthetic: observatory / telemetry. Dark, cinematic, restrained, westward.
   Geometry: orbital arcs, trajectories, vector plotting. Negative space is the point. */

:root {
  /* --- surface: cinematic darkness, deep navy / charcoal --- */
  --bg:        #090c12;
  --bg-raised: #0f141d;
  --bg-panel:  #0c1118;

  /* --- ink: off-white through soft graphite --- */
  --ink:       #e9e7e0;
  --ink-soft:  #969cab;
  --ink-mute:  #5b6373;

  /* --- structure: twilight-blue hairlines --- */
  --line:        #1b2230;
  --line-bright: #2a3344;
  --twilight:    #33425f;
  --grid:        rgba(233, 231, 224, 0.022);

  /* --- accent: pale gold, the only signal colour --- */
  --accent:      #ecca8c;
  --accent-dim:  #c2a578;
  --accent-deep: #6f6044;

  /* --- restrained coral, reserved for deadlines / warnings --- */
  --warn: #cf8064;

  --max-w: 880px;
  --ease:  cubic-bezier(0.32, 0.06, 0.18, 1);

  /* literary serif for prose, titles, and ledes — EB Garamond (EN) + Gowun
     Batang (KR). Monospace below is reserved for HUD / telemetry labels so
     the typographic contrast reads "ancient log scored with instrument
     readouts," not "blog with code blocks." */
  --font-sans: "EB Garamond", "Gowun Batang", "Pretendard", "Apple SD Gothic Neo", Georgia, "Times New Roman", serif;
  /* Korean inside mono labels (tabs, kickers, HUD) needs an explicit font —
     mono families have no CJK glyphs, so without this Korean falls through to
     Malgun Gothic / Apple SD Gothic Neo, which reads as "system default."
     IBM Plex Sans KR was designed for technical / instrument contexts and
     matches the readout register the mono is establishing in English. */
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, "IBM Plex Sans KR", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;             /* EB Garamond has a low x-height — nudge up 1px */
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* old-style figures for prose; tabular-nums elements override locally */
body { font-variant-numeric: oldstyle-nums proportional-nums; }
.font-variant-numeric, [class*="-mono"], [class*="dl"], dt, dd, time,
.itin-date, .crew-pct, .sb-readout dd, .dates td:first-child {
  font-variant-numeric: tabular-nums;
}

/* Faint plotting grid — a vector field at rest. */
body {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 76px 76px;
  background-position: 50% -1px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* A distant signal — directional light from the upper west. */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(96% 64% at 76% -14%, rgba(236, 202, 140, 0.052), transparent 62%),
    radial-gradient(80% 60% at 8% 108%, rgba(51, 66, 95, 0.16), transparent 70%);
}

/* A large open orbit — interrupted, off-canvas, biased east so its arc
   pulls the eye westward. Fixed: a stable horizon the page travels past. */
body::after {
  content: "";
  position: fixed;
  width: 132vh; height: 132vh;
  right: -56vh; top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--twilight);
  border-radius: 50%;
  opacity: 0.42;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 36%, transparent 64%);
          mask-image: linear-gradient(90deg, #000 0, #000 36%, transparent 64%);
}

.site-header, main, .site-footer, .admin-banner { position: relative; z-index: 1; }

::selection { background: rgba(236, 202, 140, 0.22); color: var(--ink); }

a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent-deep), var(--accent-deep));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 1.18em;
  transition: color 0.35s var(--ease), background-size 0.35s var(--ease);
}
a:hover {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
}

/* ---------- header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 40px;
  max-width: 1440px; margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
}
.brand:hover { color: var(--accent); }
.brand::before {
  content: "";
  width: 26px; height: 26px;
  flex: 0 0 26px;
  background: url(/assets/symbols/symbol-01.svg) no-repeat center / contain;
  opacity: 0.92;
  transition: transform 0.6s var(--ease);
}
.brand:hover::before { transform: translateX(-2px) rotate(-3deg); }

.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent-deep); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent-deep); }

.site-nav a.lang-toggle {
  font-size: 11px;
  padding: 4px 11px 3px;
  border: 1px solid var(--line-bright);
  color: var(--ink-mute);
  letter-spacing: 0.14em;
}
.site-nav a.lang-toggle:hover { color: var(--ink); border-color: var(--accent-deep); }

/* ---------- layout ---------- */
main.landing { max-width: var(--max-w); margin: 0 auto; padding: 116px 40px 96px; }
main.prose   { max-width: var(--max-w); margin: 0 auto; padding: 84px 40px 96px; }

@media (prefers-reduced-motion: no-preference) {
  main { animation: drift-in 0.95s var(--ease) both; }
  @keyframes drift-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- telemetry tag (kicker) ---------- */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 20px;
}
.kicker::before {
  content: "";
  width: 30px; height: 1px;
  flex: 0 0 30px;
  background: linear-gradient(90deg, transparent, var(--accent-dim));
}

/* ---------- type ---------- */
h1 {
  font-size: clamp(33px, 5.4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 300;
  margin: 0 0 26px;
}
h2 {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.005em;
  margin: 64px 0 14px;
}
h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 34px 0 8px;
}

/* Numbered sections — the page reads as a mission log. */
main.prose { counter-reset: section; }
main.prose > h2 { counter-increment: section; }
main.prose > h2::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent-dim);
  margin-bottom: 9px;
}

.lede {
  font-size: 19px;
  line-height: 1.58;
  font-weight: 300;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: 60ch;
}
.lede.subtle { color: var(--ink-soft); font-size: 16.5px; }

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

p { margin: 0 0 16px; }
strong { font-weight: 600; color: var(--ink); }

ul, ol { padding-left: 22px; margin: 14px 0; }
li { margin-bottom: 9px; }
li::marker { color: var(--accent-deep); }

/* ---------- vectors (CTA) ---------- */
.cta-row { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.cta {
  position: relative;
  display: inline-block;
  padding: 13px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(236, 202, 140, 0.05);
  border: 1px solid var(--accent-deep);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.cta:hover { border-color: var(--accent); background: rgba(236, 202, 140, 0.1); color: var(--accent); }
/* the vector continues past the button on hover */
.cta::after {
  content: "";
  position: absolute; left: 22px; right: 100%; bottom: -1px;
  height: 1px; background: var(--accent);
  transition: right 0.5s var(--ease);
}
.cta:hover::after { right: 22px; }

.cta-secondary {
  background: transparent;
  border-color: var(--line-bright);
  color: var(--ink-soft);
}
.cta-secondary:hover { border-color: var(--accent-deep); color: var(--ink); background: transparent; }

/* ---------- field-criteria block ---------- */
.filter-list { padding-left: 0; list-style: none; }
.filter-list li {
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.filter-list li::before {
  content: "";
  position: absolute; left: 0; top: 22px;
  width: 11px; height: 1px;
  background: var(--accent-deep);
}

/* ---------- subnav ---------- */
.subnav {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin: 28px 0 56px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.subnav a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  padding: 5px 14px;
}
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--accent); }

/* ---------- data table ---------- */
table.dates {
  border-collapse: collapse;
  margin: 18px 0;
  width: 100%;
}
table.dates td {
  padding: 11px 18px 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: top;
}
table.dates td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
table.dates tr:hover td { background: rgba(233, 231, 224, 0.015); }

code {
  font-family: var(--font-mono);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--accent-dim);
}

/* ---------- log entry ---------- */
.entry {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.entry h2 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-dim);
}

/* ---------- footer ---------- */
.site-footer {
  max-width: 1440px; margin: 0 auto;
  padding: 36px 40px 48px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.site-footer a { color: var(--ink-mute); background: none; }
.site-footer a:hover { color: var(--accent-dim); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  body::after { right: -84vh; opacity: 0.3; }
  .site-header { padding: 16px 22px; flex-wrap: wrap; gap: 12px; }
  .site-nav { gap: 16px; }
  main.landing { padding: 68px 22px 72px; }
  main.prose { padding: 56px 22px 72px; }
  h2 { margin-top: 52px; }
  .site-footer { padding: 28px 22px 36px; }
}
