/* tylerimanian.com — shared styles */
:root {
  --bg: #ECEAE2;
  --bg-soft: #E2DFD5;
  --ink: #22262B;
  --muted: #5E6368;
  --rule: #CDC9BC;
  --accent: #1F6F8B;
  --signal: #A8681A;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17191C;
    --bg-soft: #1F2226;
    --ink: #E6E3DA;
    --muted: #9A9C9E;
    --rule: #30343A;
    --accent: #66B6D1;
    --signal: #E0A64A;
  }
}
:root[data-theme="dark"] {
  --bg: #17191C;
  --bg-soft: #1F2226;
  --ink: #E6E3DA;
  --muted: #9A9C9E;
  --rule: #30343A;
  --accent: #66B6D1;
  --signal: #E0A64A;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- top nav ---------- */
.site-nav {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.site-name {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.4em; }
.nav-icons { display: flex; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.nav-icons a { display: block; color: var(--muted); line-height: 0; padding: 0.2rem; }
.nav-icons a:hover { color: var(--accent); }
.nav-icons svg { width: 1.05rem; height: 1.05rem; }

/* ---------- content ---------- */
main {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
}
h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 2.75rem 0 0.9rem;
}
p { margin: 0 0 1.15rem; }
ul { margin: 0 0 1.15rem; padding-left: 1.2rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--accent); }
.greeting { font-size: 1.5rem; margin-bottom: 1.5rem; }
.lead { font-size: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.75rem 0; }

.callout {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ideas list */
.ideas { list-style: none; padding: 0; counter-reset: idea; }
.ideas li {
  counter-increment: idea;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 1.1rem;
}
.ideas li::before {
  content: counter(idea, decimal-leading-zero);
  position: absolute; left: 0; top: 0.15rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--signal);
}

/* publications */
.pub { margin-bottom: 1.5rem; }
.pub-title { font-weight: 700; }
.pub-meta { color: var(--muted); font-size: 1rem; }
.status {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--signal);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.35rem;
  white-space: nowrap;
}

/* post list */
.post-list { list-style: none; padding: 0; }
.post-list li { display: flex; gap: 1rem; align-items: baseline; margin-bottom: 0.6rem; }
.post-list time { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); min-width: 6.5rem; }

/* single post */
.post-meta { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin: -0.75rem 0 2rem; }
article blockquote { margin: 1.5rem 0; padding-left: 1.1rem; border-left: 3px solid var(--rule); color: var(--muted); }
article pre { background: var(--bg-soft); padding: 1rem; overflow-x: auto; border-radius: 4px; font-size: 0.9rem; }

/* lifelines figure */
figure { margin: 2rem 0; }
figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; }
.lifelines { width: 100%; max-width: 20rem; height: auto; display: block; }
.lifelines line { stroke: var(--rule); stroke-width: 1.5; }
.lifelines line.cascade {
  stroke: var(--signal); stroke-width: 2.25;
  stroke-dasharray: 130; stroke-dashoffset: 130;
  animation: draw 1.4s 0.4s ease-out forwards;
}
.lifelines circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.lifelines circle.hit { stroke: var(--signal); }
.lifelines text { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .lifelines line.cascade { animation: none; stroke-dashoffset: 0; }
}

/* ---------- footer ---------- */
.site-footer {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.site-footer p { margin: 0.25rem 0; }

@media (max-width: 36rem) {
  body { font-size: 1.08rem; }
  main { padding-top: 2.5rem; }
  .site-name { width: 100%; }
  .post-list li { flex-direction: column; gap: 0; }
}
