/* andrewcohilas.com — one stylesheet, no external requests. */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #1b2a41;          /* navy text */
  --ink-soft: #45526a;     /* secondary text */
  --accent: #56698f;       /* muted slate blue */
  --accent-soft: #e9edf4;
  --rule: #e2e2db;
  --ph-bg: #fff8e6;
  --ph-line: #c9a23a;
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --wide: 60rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 1.85rem); margin: 3.5rem 0 1rem; }
h3 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; }
p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.4rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-header .inner {
  max-width: var(--wide); margin: 0 auto; padding: 1.1rem 1.5rem;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.site-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 0.25rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* Layout */
main { padding: 3.5rem 1.5rem 4rem; }
.measure { max-width: var(--measure); margin: 0 auto; }
.wide { max-width: var(--wide); margin: 0 auto; }

.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.75rem;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.55; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* Home */
.intro { max-width: var(--measure); margin: 0 auto 1rem; }
.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } .card.feature { grid-column: 1 / -1; } }
@media (min-width: 900px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.cards.three .card { display: flex; flex-direction: column; }
.cards.three .card .more { margin-top: auto; padding-top: 0.9rem; }
.fictional-note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.5rem; text-decoration: none; color: var(--ink); display: block;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--accent); color: var(--ink); }
.card h3 { margin: 0.25rem 0 0.5rem; }
.card p { color: var(--ink-soft); margin: 0; }
.card .more { display: inline-block; margin-top: 0.9rem; color: var(--accent); font-size: 0.95rem; }
.card.feature { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .card.feature { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.card.feature img { border-radius: 4px; border: 1px solid var(--rule); }
.tag { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* Case study */
.facts {
  display: grid; grid-template-columns: 1fr; gap: 0.75rem 2rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0; margin: 2rem 0; font-size: 0.95rem;
}
@media (min-width: 600px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts dt { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.facts dd { margin: 0.15rem 0 0; color: var(--ink); }

.toc { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.1rem 1.4rem; margin: 2rem 0; font-size: 0.95rem; }
.toc p { margin: 0 0 0.4rem; font-weight: 600; }
.toc ol { margin: 0; }
.toc li { margin-bottom: 0.2rem; }

.principle { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 1rem; color: var(--ink-soft); margin: 0 0 1.1rem; }
.principle strong { color: var(--ink); }

figure { margin: 1.75rem 0 2rem; }
figure img { border-radius: 6px; border: 1px solid var(--rule); background: #111; }
figure.narrow img { max-width: 30rem; margin: 0 auto; }
figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.6rem; line-height: 1.5; }
figure.narrow figcaption { max-width: 30rem; margin-left: auto; margin-right: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1rem 0 1.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
th { font-family: var(--serif); font-weight: 600; white-space: nowrap; padding-right: 1.25rem; }
@media (max-width: 560px) {
  table, tbody, tr, th, td { display: block; }
  th { border-bottom: 0; padding-bottom: 0.1rem; }
  td { padding-top: 0; }
}

/* Résumé */
.role { margin: 0 0 2rem; }
.role h3 { margin: 0 0 0.15rem; }
.role .meta { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.6rem; }

/* Placeholders: easy to spot, easy to search for ("PLACEHOLDER") */
.ph {
  background: var(--ph-bg); border: 1px dashed var(--ph-line); border-radius: 6px;
  padding: 0.9rem 1.1rem; margin: 1rem 0 1.5rem; font-size: 0.95rem; color: #5a4a1a;
}
.ph::before {
  content: "Placeholder"; display: block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #8a6d12; margin-bottom: 0.3rem;
}
.ph p:last-child, .ph ul:last-child { margin-bottom: 0; }
.ph-inline { background: var(--ph-bg); border: 1px dashed var(--ph-line); border-radius: 3px; padding: 0 0.3rem; color: #5a4a1a; font-size: 0.95em; }
.ph-figure {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--ph-bg); border: 1px dashed var(--ph-line); border-radius: 6px; color: #8a6d12;
  padding: 1rem; font-size: 0.95rem;
}

.back { display: inline-block; margin-top: 3rem; font-size: 0.95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2rem 1.5rem; color: var(--ink-soft); font-size: 0.9rem; }
.site-footer .inner { max-width: var(--wide); margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { background: #fff; }
}
