/* hendzel.is — shared styles
   ----------------------------
   Design tokens, type, chrome, layout primitives.
   See uploads/design.md for the source of truth.
*/

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  font-feature-settings: "ss01", "kern";
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Tokens --- */
:root {
  --bg:       #FAFAF7;
  --ink:      #0E0E0E;
  --muted:    #6E6E6A;
  --accent:   #E10600;
  --paused:   #B8B5AA;
  --rule:     #E5E2D8;

  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* --- Type --- */
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness 50ms ease; }
a:hover { text-decoration-thickness: 2px; }
.accent-hover:hover { text-decoration-color: var(--accent); }

.mono { font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* --- Layout shell --- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page > main { flex: 1 0 auto; }

/* --- Header --- */
.site-header {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}
.site-header a { text-decoration: none; }
.site-header a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-header .kh { letter-spacing: 0.02em; }
.site-header .everything[aria-current="page"] { color: var(--muted); pointer-events: none; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  display: flex;
  justify-content: center;
}
.site-footer .inner {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  align-items: baseline;
}
.site-footer .inner > * + *::before {
  content: " · ";
  color: var(--muted);
  padding: 0 4px;
}

/* --- Columns --- */
.col { max-width: 720px; margin: 0 auto; padding: 0 32px; }
.col-wide { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* --- Display type --- */
.display {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.display-xl {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.h2 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.h2-muted {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--muted);
}
.body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}
.body-lg {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* --- Hero (homepage) --- */
.hero {
  padding-top: 120px;
}
.hero .stanza {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero .line {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.hero .line.lead { font-weight: 500; }
.hero .arrow {
  display: inline-block;
  width: 1.4em;
  color: var(--muted);
}
.hero .line a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--ink);
}
.hero .line a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
}

/* --- Latest strip / Ship log --- */
.section-eyebrow {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--ink);
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.list > li {
  border-bottom: 1px solid var(--rule);
}

/* Latest row (homepage) */
.latest-row {
  display: grid;
  grid-template-columns: 16px 90px 1fr auto 16px;
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  font-family: var(--serif);
}
.latest-row .dot {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}
.latest-row .verb {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.latest-row .title {
  font-size: 18px;
  color: var(--ink);
}
.latest-row .when {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.latest-row .arr {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.latest-row a.row-link {
  text-decoration: none;
  color: inherit;
  display: contents;
}
.latest-row:hover .title { text-decoration: underline; text-underline-offset: 3px; }

/* Status dot colors */
.dot-live    { color: var(--accent); }
.dot-wip     { color: var(--ink); }
.dot-paused  { color: var(--muted); }
.dot-sunset  { color: var(--paused); }
.dot-muted   { color: var(--muted); }

/* Ship log row (building / wrong / writing) */
.ship-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  column-gap: 20px;
  row-gap: 6px;
  padding: 24px 0;
  align-items: baseline;
}
.ship-row .dot { grid-column: 1; grid-row: 1 / span 3; font-family: var(--mono); font-size: 12px; line-height: 1; padding-top: 4px; }
.ship-row .title { grid-column: 2; font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink); }
.ship-row .year { grid-column: 3; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ship-row .desc { grid-column: 2; font-family: var(--serif); font-size: 18px; color: var(--muted); }
.ship-row .tag { grid-column: 3; font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: none; }
.ship-row .url { grid-column: 2 / span 2; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ship-row .url a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.ship-row .url a:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* --- Filter row --- */
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}
.filter-row .filters {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.filter-row .filters > * + *::before {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
  opacity: 0.5;
}
.filter-row a {
  color: var(--muted);
  text-decoration: none;
}
.filter-row a:hover { color: var(--ink); }
.filter-row a.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* --- Article --- */
.article {
  padding-top: 64px;
  padding-bottom: 96px;
}
.article h1.title {
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  text-wrap: pretty;
}
.article .meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 64px;
}
.article p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.article p + p { margin-top: 0; }
.article h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  margin-top: 48px;
  margin-bottom: 24px;
  letter-spacing: -0.005em;
}
.article .article-footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.article .article-footer .label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.article .article-footer .lnk {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  text-underline-offset: 4px;
}

/* --- Wrong entries --- */
.wrong-entry .date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.wrong-entry h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.wrong-entry p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
}
.wrong-stack {
  display: flex;
  flex-direction: column;
}
.wrong-stack .wrong-entry {
  padding: 32px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.wrong-stack .wrong-entry:last-child { border-bottom: none; padding-bottom: 0; }
.wrong-stack .wrong-entry:first-child { padding-top: 0; }

/* --- /me sections --- */
.bio-section { margin-top: 48px; }
.bio-section .h2 { margin-bottom: 16px; }
.bio-section ul { list-style: none; margin: 0; padding: 0; }
.bio-section ul li {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.8;
  display: grid;
  grid-template-columns: 1em 1fr;
}
.bio-section ul li::before { content: "–"; color: var(--muted); }
.bio-section ul.contact li { grid-template-columns: 90px 1fr; gap: 12px; }
.bio-section ul.contact li::before { content: none; }
.bio-section ul.contact li .label { color: var(--muted); }
.bio-section ul.contact li a { color: var(--ink); text-underline-offset: 4px; }
.bio-section .stack-item .tool { font-family: var(--mono); font-size: 16px; color: var(--ink); }

/* --- /here form --- */
.here-form {
  display: flex;
  gap: 0;
  margin-top: 24px;
  max-width: 480px;
}
.here-form input[type="email"] {
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-right: none;
  background: transparent;
  color: var(--ink);
  flex: 1;
  border-radius: 0;
  outline: none;
}
.here-form input[type="email"]:focus { border-color: var(--ink); }
.here-form input[type="email"]::placeholder { color: var(--muted); }
.here-form button {
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 18px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 0;
}
.here-form button:hover { border-color: var(--ink); }

/* --- /everything sitemap --- */
.sitemap section { margin-bottom: 48px; }
.sitemap h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}
.sitemap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.9;
}
.sitemap ul a {
  color: var(--ink);
  text-underline-offset: 4px;
}

/* --- 404 --- */
.fourohfour {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: calc(100vh - 80px - 80px); /* viewport - header - footer */
  padding: 64px 32px;
}
.fourohfour .inner { max-width: 760px; margin: 0 auto; width: 100%; }
.fourohfour .main {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
}
.fourohfour .main .path { color: var(--accent); }
.fourohfour .suggest {
  margin-top: 64px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.fourohfour .suggest a {
  color: var(--ink);
  text-underline-offset: 5px;
}
.fourohfour .suggest a:hover { text-decoration-color: var(--accent); }

/* --- /building footer-of-list line --- */
.show-more {
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 24px;
}
.show-more a { color: var(--muted); }
.show-more a:hover { color: var(--ink); }

/* --- Hairline rule helper --- */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* --- Spacing helpers --- */
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mt-96 { margin-top: 96px; }

/* --- Mobile --- */
@media (max-width: 720px) {
  .site-header { height: 64px; padding: 0 20px; }
  .site-footer { padding: 24px 20px; font-size: 12px; }
  .site-footer .inner { justify-content: center; text-align: center; }

  .col, .col-wide { padding: 0 20px; }

  .hero { padding-top: 48px; }
  .hero .line { font-size: 32px; line-height: 1.3; }
  .hero .arrow { width: 1.2em; }

  .display { font-size: 32px; }
  .display-xl { font-size: 36px; }
  .h2, .section-eyebrow, .article h2, .bio-section .h2, .sitemap h2 { font-size: 22px; }
  .body, .article p, .wrong-entry p, .bio-section ul li { font-size: 17px; }
  .body-lg { font-size: 20px; }

  .article h1.title { font-size: 32px; }
  .article { padding-top: 32px; padding-bottom: 48px; }
  .article .meta { margin-bottom: 32px; }
  .article .article-footer { margin-top: 48px; }

  .mt-96 { margin-top: 48px; }
  .mt-64 { margin-top: 32px; }

  /* Latest row collapses */
  .latest-row {
    grid-template-columns: 14px auto 1fr;
    grid-template-areas:
      "dot verb when"
      ".   title title";
    row-gap: 4px;
    column-gap: 12px;
  }
  .latest-row .dot { grid-area: dot; }
  .latest-row .verb { grid-area: verb; }
  .latest-row .when { grid-area: when; text-align: right; }
  .latest-row .title { grid-area: title; font-size: 17px; }
  .latest-row .arr { display: none; }

  /* Ship row collapses */
  .ship-row { column-gap: 14px; }
  .ship-row .title { font-size: 17px; }
  .ship-row .desc { font-size: 17px; }

  .fourohfour { padding: 48px 20px; min-height: calc(100vh - 64px - 80px); }
  .fourohfour .main { font-size: 36px; }
  .fourohfour .suggest { font-size: 18px; margin-top: 40px; }

  .here-form { flex-direction: column; max-width: 100%; }
  .here-form input[type="email"] { border-right: 1px solid var(--rule); border-bottom: none; }
  .here-form button { border-top: none; border: 1px solid var(--rule); border-top: none; }

  .bio-section ul.contact li { grid-template-columns: 80px 1fr; }
}

