/* =====================================================================
   colemanok.com — shared stylesheet
   One file drives every page. Edit tokens here; all pages update.
   Aesthetic: refined dark "technical-editorial".
   Dependency-free: no external fonts, no CDN, no JS required.
   ===================================================================== */

:root {
  /* ---- color ---- */
  --bg:        #0c0d10;
  --bg-2:      #14161b;
  --ink:       #e7e8ec;
  --ink-dim:   #9b9ea7;
  --ink-faint: #686c75;
  --accent:    #e2a44c;          /* warm amber — the one accent */
  --accent-soft: rgba(226,164,76,.14);
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);

  /* ---- type ---- */
  --serif: "Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --sans:  ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:  ui-monospace,"SF Mono","JetBrains Mono","Cascadia Code",Menlo,Consolas,monospace;

  /* ---- metrics ---- */
  --measure: 68ch;               /* readable prose width */
  --wrap: 940px;                 /* page max width */
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---- reset ---- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* atmosphere: faint top accent glow + hairline dot grid, both very subtle */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(60rem 36rem at 78% -8%, rgba(226,164,76,.07), transparent 60%),
    radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- layout ---- */
.wrap {
  position: relative; z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}
main { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem); }
.prose { max-width: var(--measure); }

/* ---- header / nav ---- */
.site-head {
  position: relative; z-index: 2;
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; padding-block: 1.4rem; flex-wrap: wrap;
}
.brand {
  font-family: var(--mono);
  font-size: .92rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand .dot { color: var(--accent); }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--mono);
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-dim);
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }

/* ---- type ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); }
h1 {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  line-height: 1.04; letter-spacing: -.015em;
  margin: 0 0 1.25rem; max-width: 18ch;
}
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.15; margin: 2.5rem 0 .9rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
.lede {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.6; color: var(--ink-dim);
  max-width: 56ch; margin: 0 0 1.5rem;
}
p { margin: 0 0 1.1rem; }
.prose p, .prose li { color: #cfd1d7; }

/* ---- entry list (projects, writing — the reusable component) ---- */
.entries { list-style: none; margin: 2rem 0 0; padding: 0; }
.entry {
  display: block;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry:hover { text-decoration: none; }
.entry:hover .entry-title { color: var(--accent); }
.entry-meta {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 .5rem;
}
.entry-title {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600;
  line-height: 1.2; color: var(--ink); margin: 0 0 .4rem;
  transition: color .18s ease;
}
.entry-title .ext { font-family: var(--mono); font-size: .7rem; color: var(--ink-faint); vertical-align: middle; margin-left: .5rem; }
.entry-desc { color: var(--ink-dim); margin: 0; max-width: 62ch; }

/* ---- small bits ---- */
.tag {
  display: inline-block;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line-2); border-radius: 2px;
  padding: .2rem .5rem; margin: 0 .35rem .35rem 0;
}
.rule { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---- footer ---- */
.site-foot {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}
.site-foot .wrap {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.6rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
  color: var(--ink-faint);
}
.site-foot a { color: var(--ink-dim); }
.site-foot a:hover { color: var(--accent); text-decoration: none; }

/* ---- page-load reveal (one orchestrated stagger) ---- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal > * { opacity: 0; animation: rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal > *:nth-child(1) { animation-delay: .04s; }
.reveal > *:nth-child(2) { animation-delay: .12s; }
.reveal > *:nth-child(3) { animation-delay: .20s; }
.reveal > *:nth-child(4) { animation-delay: .28s; }
.reveal > *:nth-child(5) { animation-delay: .36s; }
.reveal > *:nth-child(n+6) { animation-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal > * { animation: none; opacity: 1; transform: none; }
}

/* ---- focus visibility (accessibility) ---- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}
