/* sean.keener.org - "a life, plotted as a route"
   Aeronautical-chart palette: chart paper, ink, VOR magenta, chart blue. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ground: #f4f3eb;
  --ground-2: #ecebe0;
  --card: #f9f8f2;
  --ink: #1a2420;
  --muted: #59645d;
  --accent: #b01e58;
  --accent-ink: #ffffff;
  --line: #8fa3b3;
  --rule: #d8d6c8;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #101715;
    --ground-2: #17201d;
    --card: #141d1a;
    --ink: #e9ede8;
    --muted: #9aa69e;
    --accent: #ef6d97;
    --accent-ink: #1a0a10;
    --line: #4f6878;
    --rule: #26312c;
  }
}
:root[data-theme="light"] {
  --ground: #f4f3eb;
  --ground-2: #ecebe0;
  --card: #f9f8f2;
  --ink: #1a2420;
  --muted: #59645d;
  --accent: #b01e58;
  --accent-ink: #ffffff;
  --line: #8fa3b3;
  --rule: #d8d6c8;
}
:root[data-theme="dark"] {
  --ground: #101715;
  --ground-2: #17201d;
  --card: #141d1a;
  --ink: #e9ede8;
  --muted: #9aa69e;
  --accent: #ef6d97;
  --accent-ink: #1a0a10;
  --line: #4f6878;
  --rule: #26312c;
}

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

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

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.4rem 0 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.nav .mark {
  font-family: var(--mono); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.nav .mark span { color: var(--accent); }
.nav ul { display: flex; gap: 1.6rem; list-style: none; flex-wrap: wrap; }
.nav ul a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.nav ul a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero .routes {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.5rem; align-items: center;
  padding: 4.5rem 0 4rem;
}
.eyebrow {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow b { color: var(--accent); font-weight: 500; }
.hero h1 {
  font-family: var(--display);
  font-weight: 780;
  font-stretch: 122%;
  font-size: clamp(3rem, 8.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0.9rem 0 1.4rem;
}
.hero h1 .accent { color: var(--accent); }
.hero .thesis {
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  max-width: 34ch;
  text-wrap: balance;
}
.hero .sub {
  margin-top: 1.1rem; color: var(--muted); max-width: 52ch;
}
.cta-row { display: flex; gap: 0.9rem; margin-top: 2rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.85rem 1.3rem; border-radius: 3px;
  text-decoration: none; border: 1px solid var(--ink);
  color: var(--ink); background: transparent;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }

.portrait { justify-self: end; width: 100%; max-width: 300px; }
.portrait .frame { position: relative; }
.portrait img {
  display: block; width: 100%; height: auto; border-radius: 4px;
  border: 1px solid var(--rule);
}
.portrait .tick {
  position: absolute; width: 14px; height: 14px; border-color: var(--accent);
  border-style: solid; border-width: 0;
}
.portrait .tick.tl { top: -7px; left: -7px; border-top-width: 2px; border-left-width: 2px; }
.portrait .tick.tr { top: -7px; right: -7px; border-top-width: 2px; border-right-width: 2px; }
.portrait .tick.bl { bottom: -7px; left: -7px; border-bottom-width: 2px; border-left-width: 2px; }
.portrait .tick.br { bottom: -7px; right: -7px; border-bottom-width: 2px; border-right-width: 2px; }
.portrait figcaption {
  margin-top: 0.8rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); text-align: left;
}

/* ---------- sections ---------- */
section { padding: 4.2rem 0 0; }
.section-head {
  display: flex; align-items: baseline; gap: 1rem;
  border-top: 2px solid var(--ink);
  padding-top: 1rem; margin-bottom: 2.2rem;
}
.section-head .no {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--accent);
  letter-spacing: 0.1em;
}
.section-head h2 {
  font-family: var(--display); font-weight: 740; font-stretch: 118%;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  text-transform: uppercase; letter-spacing: 0.005em;
}
.section-head .note {
  margin-left: auto; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}

/* now cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 5px;
  padding: 1.7rem 1.7rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.card .tag {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; gap: 1rem;
}
.card .tag em { font-style: normal; color: var(--accent); }
.card h3 {
  font-family: var(--display); font-weight: 730; font-stretch: 115%;
  font-size: 1.45rem; text-transform: uppercase;
}
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { font-size: 1.05rem; color: var(--ink); }
.card .proof {
  margin-top: auto; padding-top: 0.9rem; border-top: 1px dashed var(--rule);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--muted);
}

/* flight log */
.log { list-style: none; border-top: 1px solid var(--rule); }
.log li {
  display: grid; grid-template-columns: 170px minmax(0, 1fr);
  gap: 1.6rem; padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.log .wp {
  font-family: var(--mono); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.08em; color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 0.6rem;
}
.log .wp .code { color: var(--accent); }
.log p { font-size: 1.08rem; max-width: 68ch; }
.log p b { font-weight: 600; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2.4rem; }
.principle { border-left: 2px solid var(--accent); padding-left: 1.2rem; }
.principle h3 {
  font-family: var(--display); font-weight: 720; font-stretch: 112%;
  font-size: 1.12rem; text-transform: uppercase; letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}
.principle p { font-size: 1.05rem; color: var(--muted); }

/* work with me */
.leads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.lead {
  background: var(--ground-2); border: 1px solid var(--rule); border-radius: 5px;
  padding: 1.7rem; display: flex; flex-direction: column; gap: 0.7rem;
}
.lead h3 {
  font-family: var(--display); font-weight: 730; font-stretch: 115%;
  font-size: 1.25rem; text-transform: uppercase;
}
.lead p { font-size: 1.03rem; }
.lead .go {
  margin-top: auto; padding-top: 1rem;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.lead .go a { text-decoration: none; }
.lead .go a::after { content: " ->"; }
.lead .go a:hover { text-decoration: underline; }

/* footer / contact */
.contact { padding: 4.5rem 0 1rem; }
.contact .inner {
  border-top: 2px solid var(--ink); padding-top: 2.2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.contact .email {
  font-family: var(--display); font-weight: 760; font-stretch: 120%;
  font-size: clamp(1.7rem, 5.4vw, 3.1rem);
  text-transform: lowercase; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; width: fit-content;
}
.contact .email:hover { color: var(--accent); }
.contact .meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 2rem;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.footer {
  margin-top: 3.2rem; padding: 1.3rem 0 2rem;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- blog: post pages ---------- */
.post {
  max-width: 760px; margin: 0 auto; padding: 3.2rem 1.5rem 2rem;
}
.post .eyebrow a { color: var(--accent); text-decoration: none; }
.post .eyebrow a:hover { text-decoration: underline; }
.post h1 {
  font-family: var(--display); font-weight: 760; font-stretch: 118%;
  font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.08;
  text-wrap: balance; margin: 0.8rem 0 1.8rem;
}
.post-body { font-size: 1.14rem; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--display); font-weight: 720; font-stretch: 112%;
  margin: 1.6em 0 0.5em; line-height: 1.2;
}
.post-body img {
  max-width: 100%; height: auto; border-radius: 4px;
  border: 1px solid var(--rule); margin: 0.4em 0;
}
.post-body iframe {
  max-width: 100%; border: 0; margin: 0.4em 0;
}
.post-body blockquote {
  border-left: 2px solid var(--accent); padding-left: 1.2rem;
  margin: 1.2em 0; color: var(--muted); font-style: italic;
}
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.post-body li { margin-bottom: 0.35em; }
.post-body code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--ground-2); padding: 0.1em 0.35em; border-radius: 3px;
}
.post-body table { display: block; overflow-x: auto; border-collapse: collapse; }
.post-body td, .post-body th { border: 1px solid var(--rule); padding: 0.4em 0.7em; }

/* ---------- blog: archive index ---------- */
.archive { padding: 3.2rem 1.5rem 2rem; }
.archive-intro { max-width: 60ch; color: var(--muted); margin-bottom: 2.4rem; }
.archive .year {
  font-family: var(--display); font-weight: 740; font-stretch: 118%;
  font-size: 1.3rem; margin: 2.2rem 0 0.4rem; color: var(--accent);
}
.archive .log li { padding: 0.55rem 0; grid-template-columns: 70px minmax(0, 1fr); }
.archive .log p a { color: var(--ink); text-decoration: none; }
.archive .log p a:hover { color: var(--accent); text-decoration: underline; }

/* route dash drift */
.routes .dash { stroke-dasharray: 3 7; animation: drift 26s linear infinite; }
@keyframes drift { to { stroke-dashoffset: -200; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.6rem; padding: 3.2rem 0 3rem; }
  .portrait { justify-self: start; max-width: 260px; }
  .cards, .principles, .leads { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr; gap: 0.3rem; }
  .section-head .note { display: none; }
}
