/* Inertial Navigation LLC — portfolio
   Tokens: cool graphite ground, navy ink, one plotting-red accent.
   Type: Barlow Condensed (display) / Instrument Sans (body) / IBM Plex Mono (data) */

:root {
  --ground: #F2F3F5;
  --surface: #FFFFFF;
  --tint: #E9ECF0;
  --ink: #141A24;
  --ink-2: #2A3342;
  --muted: #5F6877;
  --line: #D5DAE1;
  --line-strong: #B9C1CC;
  --accent: #D6452B;
  --link: #2E5C8A;
  --live: #2F8F5B;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  margin: 0;
}

p { margin: 0; }
p + p { margin-top: 0.75em; }

.arrow { display: inline-block; font-size: 0.75em; transition: transform .2s ease; }
a:hover .arrow { transform: translate(2px, -2px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: #9AA6B6; }

/* ---------- header ---------- */
.site-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.wordmark small { font-weight: 500; font-size: 0.7em; color: var(--muted); letter-spacing: 0.1em; margin-left: 2px; }
.wordmark__mark { width: 26px; height: 26px; flex: none; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
@media (max-width: 720px) {
  .site-head { flex-wrap: wrap; gap: 14px 24px; padding-block: 18px; }
  .site-nav { width: 100%; justify-content: flex-start; gap: 18px; }
  .site-nav a { font-size: 14px; }
}

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--ink); color: var(--surface); }
.btn--primary { background: var(--ink); color: var(--surface); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .arrow, .btn, .card { transition: none !important; }
}

/* ---------- sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter);
}
.section--tint {
  max-width: none;
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--tint > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px 48px;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section__head h2 {
  font-size: clamp(40px, 5vw, 64px);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.section__head p { color: var(--muted); max-width: 560px; font-size: 16px; }
@media (max-width: 720px) {
  .section__head { grid-template-columns: 1fr; gap: 10px; }
}
/* page title: name above, one large display line */
.section__head--title { grid-template-columns: 1fr; gap: 14px; }
.section__head--title .eyebrow { font-size: 13px; color: var(--muted); max-width: none; }
.section__head--title h1 {
  font-size: clamp(52px, 8vw, 116px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
}
#work { padding-top: clamp(40px, 6vw, 80px); }

/* ---------- work cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 1px 0 var(--line), 0 12px 32px -20px rgba(20, 26, 36, .35); }
.card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card__media--diagram { display: grid; place-items: center; padding: 6%; background: var(--ground); }
.card__media--diagram svg { width: 100%; height: auto; max-height: 100%; }
.card__body { padding: 20px 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.card__body h3 { font-size: 30px; font-weight: 600; margin-top: 2px; }
.card__body h3 a { color: var(--ink); text-decoration: none; }
.card__body h3 a:hover { color: var(--accent); }
.card__body p { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.card__body p + p { margin-top: 0; }
.stack {
  margin-top: auto !important;
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted) !important;
  letter-spacing: .01em;
}

/* spec plate: category left, status right */
.plate {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.plate__cat { color: var(--ink); font-weight: 500; }
.plate__status { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.plate__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: none; }
.plate__status.is-live::before { background: var(--live); }
.plate__status.is-oss::before { background: var(--link); }
.plate__status.is-archived::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

/* wide card: media beside text */
.card--wide { grid-column: 1 / -1; flex-direction: row; }
.card--wide .card__media { flex: 0 0 62%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
.card--wide .card__body { padding: 28px 32px 30px; }
.card--wide .card__body h3 { font-size: 38px; }

@media (max-width: 880px) {
  .cards { grid-template-columns: 1fr; gap: 22px; }
  .card--wide { flex-direction: column; }
  .card--wide .card__media { flex: none; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .card--wide .card__body { padding: 20px 24px 26px; }
  .card--wide .card__body h3 { font-size: 30px; }
}

/* diagram styles */
.dg-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; }
.dg-core rect { fill: var(--ink); }
.dg-edge path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.card__media--diagram text { font-family: var(--mono); font-size: 13px; font-weight: 500; fill: var(--ink); text-anchor: middle; }
.card__media--diagram .dg-sub { font-size: 10.5px; font-weight: 400; fill: var(--muted); }
.card__media--diagram .dg-core text { fill: var(--surface); }
.card__media--diagram .dg-core .dg-sub { fill: #B9C1CC; }
.card__media--diagram .dg-label { font-size: 10px; letter-spacing: .12em; fill: var(--muted); }

/* ---------- footer / contact ---------- */
.site-foot {
  background: var(--ink);
  color: #DDE3EA;
  padding: clamp(56px, 7vw, 96px) var(--gutter) 28px;
}
.site-foot__inner {
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: 0 auto;
}
.site-foot__mail {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 700;
  /* sized so the full address fits on one line down to ~560px, then breaks at the @ via <wbr> */
  font-size: clamp(38px, 7.4vw, 88px);
  line-height: 0.98;
  color: #FFFFFF;
  text-decoration: none;
  margin: 14px 0 32px;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere; /* last resort only; the <wbr> at the @ breaks first */
}
.site-foot__mail:hover { color: var(--accent); }
.site-foot__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px 48px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid #2A3342;
}
.site-foot__note { color: #9AA6B6; max-width: 480px; font-size: 16px; margin: 0; }
.site-foot__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; font-size: 16px; white-space: nowrap; }
.site-foot__links a { color: #FFFFFF; text-decoration: none; font-weight: 500; }
.site-foot__links a:hover { color: var(--accent); }
.site-foot__meta { color: #9AA6B6; }
.site-foot__legal {
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: 56px auto 0;
  padding-top: 20px;
  border-top: 1px solid #2A3342;
  font-family: var(--mono);
  font-size: 12px;
  color: #6F7B8C;
}
@media (max-width: 720px) {
  .site-foot__links { gap: 20px; }
}
