:root {
  --bg: #0f1a14;
  --ink: #f5f0dd;
  --text: #e9e4d3;
  --muted: #9ba38e;
  --label: #b8825d;
  --dim: #7f8a6f;
  --accent: #c9834c;
  --rule: #3d4a3b;
  --rule-soft: #29352a;
  --crest-border: #a5714f;
  --row-hover: #13221a;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.mast,
main,
footer {
  max-width: 640px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---- masthead ---- */

.mast {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

.crest {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--crest-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--accent);
}

.mast-name {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--label);
}

/* ---- intro / hero ---- */

.intro {
  padding-top: 3.6rem;
  padding-bottom: 2.8rem;
}

.intro h1 {
  font-weight: 500;
  font-size: 3.1rem;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.descriptor {
  font-variant-caps: small-caps;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--label);
  margin: 0 0 2.4rem;
}

.statement {
  font-size: 2.5rem;
  line-height: 1.22;
  font-style: normal;
  margin: 0 0 1.4rem;
  color: var(--ink);
  text-wrap: balance;
}

.statement .accent {
  color: var(--accent);
}

.quotable {
  font-variant-caps: small-caps;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
  color: var(--accent);
}

.bio {
  color: var(--muted);
  max-width: 54ch;
  margin: 0;
}

/* ---- section labels ---- */

.seclabel {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 2.8rem 0 0.3rem;
}

.seclabel span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  white-space: nowrap;
}

.seclabel i {
  height: 1px;
  flex: 1;
  background: var(--rule);
}

/* ---- entries (full-row links) ---- */

.entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.4rem 0.9rem;
  margin: 0 -0.9rem;
  border-top: 1px solid var(--rule-soft);
  border-left: 2px solid transparent;
  text-decoration: none;
  color: inherit;
}

.entry:hover,
.entry:focus-visible {
  background: var(--row-hover);
  border-left-color: var(--accent);
}

.entry:focus-visible {
  outline: none;
}

.entry-main h3 {
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink);
}

.entry-main p {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.meta {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  font-size: 0.7rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
}

.meta.dim {
  color: var(--dim);
}

/* ---- elsewhere ---- */

#elsewhere .bio {
  margin: 1rem 0 1.4rem;
}

.contact {
  font-size: 1.1rem;
  margin: 0 0 0.8rem;
}

.links {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.links a {
  color: var(--muted);
  text-decoration-color: var(--rule-soft);
}

.links a:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

/* ---- end mark & footer ---- */

.endmark {
  text-align: center;
  margin: 2.8rem auto 0;
  max-width: 640px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.endmark::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 0.6rem;
  padding-bottom: 3rem;
  margin-top: 2.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--dim);
}

@media (max-width: 480px) {
  body { font-size: 18px; }
  .intro { padding-top: 2.6rem; }
  .intro h1 { font-size: 2.3rem; }
  .statement { font-size: 1.9rem; }
}

/* ---- essay / article pages ---- */

.article {
  padding-top: 3.2rem;
  padding-bottom: 1rem;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 1rem;
}

.article-title {
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 1.1rem;
  color: var(--ink);
  text-wrap: balance;
}

.dek {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 2.6rem;
}

.article-body {
  max-width: 66ch;
}

.article-body p {
  margin: 0 0 1.3rem;
}

.draft-note {
  margin-top: 2.2rem;
  padding: 0.8rem 1rem;
  border: 1px dashed var(--rule);
  color: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.back-link {
  margin-top: 2.8rem;
  padding-bottom: 1rem;
}

.back-link a {
  font-size: 0.85rem;
}
