/* ============================================================
   menibrief.com — shared design system
   Used by every page. Page-specific styles live in each page's
   own <style> block (e.g. the resumé print rules, rant prose).
   ============================================================ */

:root {
  --paper: #F3F5F2;
  --card: #FBFCFA;
  --ink: #17251F;
  --mute: #52625A;
  --line: #D5DCD6;
  --pine: #1F6B54;
  --pine-deep: #175E49;
  --pine-tint: #E4EDE7;
  --maxw: 860px;
  --display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --body: "Public Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- top bar ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 26px 0 0;
  font-family: var(--mono);
  font-size: 13px;
}

.top .wordmark {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* easter-egg swap flash when the wordmark cycles languages */
.top .wordmark.swap { animation: wm-pop 0.18s ease; }
@keyframes wm-pop { from { opacity: 0.25; } to { opacity: 1; } }

.top nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top nav a {
  color: var(--mute);
  text-decoration: none;
  transition: color 0.15s ease;
}

.top nav a:hover { color: var(--pine-deep); }

.top nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--pine);
  text-underline-offset: 5px;
}

/* ---------- hero / page header ---------- */
.hero { padding: 92px 0 76px; }

/* slim variant for interior pages (rants, work) */
.hero.slim { padding: 68px 0 44px; }
.hero.slim h1 { font-size: clamp(34px, 5.6vw, 56px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 26px;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(42px, 7.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

h1 .arrow { color: var(--pine); }

.lede {
  margin-top: 30px;
  max-width: 58ch;
  font-size: 18px;
  color: var(--ink);
}

.lede + .lede { margin-top: 18px; }

.lede em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--pine-tint) 62%);
}

.cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta a {
  font-family: var(--mono);
  font-size: 13.5px;
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cta a:hover {
  border-color: var(--pine);
  background: var(--pine-tint);
}

.cta a.primary {
  background: var(--pine-deep);
  border-color: var(--pine-deep);
  color: #F5FAF7;
}

.cta a.primary:hover { background: var(--pine); border-color: var(--pine); }

/* page-load reveal (hero only) */
.hero > * {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.14s; }
.hero > *:nth-child(3) { animation-delay: 0.23s; }
.hero > *:nth-child(4) { animation-delay: 0.32s; }
.hero > *:nth-child(5) { animation-delay: 0.41s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > * { animation: none; }
  .card:hover { transform: none; }
  .top .wordmark.swap { animation: none; }
}

/* ---------- sections ---------- */
section { padding: 54px 0; border-top: 1px solid var(--line); }

.label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 34px;
}

.label::before { content: "// "; color: var(--pine); }

.prose p { max-width: 62ch; }
.prose p + p { margin-top: 16px; }

/* ---------- cards (home hub + work grid) ---------- */
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--pine);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -18px rgba(23, 37, 31, 0.5);
}

.card .k {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--pine-deep);
}

.card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-top: 10px;
}

.card p { margin-top: 8px; color: var(--mute); font-size: 15px; }

.card .go {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--pine-deep);
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 54px 0 72px;
}

footer .big-link {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 4.4vw, 40px);
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(transparent 78%, var(--pine-tint) 78%);
}

footer .big-link:hover { color: var(--pine-deep); }

footer .also {
  margin-top: 26px;
  max-width: 62ch;
  color: var(--mute);
  font-size: 15px;
}

.colophon {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mute);
}

.colophon a { color: var(--mute); }
.colophon a:hover { color: var(--pine-deep); }

/* ---------- rants index list ---------- */
.rlist { list-style: none; }

.rlist li { border-top: 1px solid var(--line); }
.rlist li:last-child { border-bottom: 1px solid var(--line); }

.rlist a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 20px;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
  padding: 22px 4px;
  transition: padding-left 0.15s ease, color 0.15s ease;
}

.rlist a:hover { padding-left: 12px; color: var(--pine-deep); }

.rlist .rtitle {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.rlist .rdate {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mute);
  white-space: nowrap;
}

.rlist .rsum {
  grid-column: 1 / -1;
  color: var(--mute);
  font-size: 15px;
  max-width: 62ch;
}

/* ---------- long-form post (a single rant) ---------- */
.post { padding: 40px 0 8px; max-width: 68ch; }

.post .back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mute);
  text-decoration: none;
  margin-bottom: 30px;
  transition: color 0.15s ease;
}
.post .back:hover { color: var(--pine-deep); }

.post h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 5.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.post .post-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mute);
  margin-top: 16px;
}

.post-body { margin-top: 38px; }

.post-body > * + * { margin-top: 20px; }

.post-body h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.01em;
  margin-top: 40px;
}

.post-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-top: 30px;
}

.post-body p { color: var(--ink); }

.post-body a {
  color: var(--pine-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.15s ease;
}
.post-body a:hover { text-decoration-color: var(--pine); }

.post-body ul,
.post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: 6px; }
.post-body li { padding-left: 4px; }

.post-body blockquote {
  border-left: 2px solid var(--pine);
  padding-left: 18px;
  color: var(--mute);
  font-style: italic;
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--pine-tint);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.post-body pre code { background: none; padding: 0; font-size: inherit; }

.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.post-body img { max-width: 100%; height: auto; border-radius: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 620px) {
  .hero { padding: 64px 0 56px; }
  .hero.slim { padding: 48px 0 36px; }
  .rlist a { grid-template-columns: 1fr; }
  .rlist .rdate { order: -1; }
}
