/* Brad Doleman — braddoleman.com
   Restrained editorial. No external requests, no web fonts, no tracking. */

:root {
  --bg: #faf9f7;
  --ink: #1c1b19;
  --muted: #6b6862;
  --rule: #ddd8ce;
  --accent: #7a4a1f;
  --card: #ffffff;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --ink: #f0eee9;
    --muted: #a09a90;
    --rule: #34322e;
    --accent: #c99a63;
    --card: #1e1d1a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { padding-bottom: 5rem; }

section { margin: 3.5rem 0; }

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.wordmark {
  font-family: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"] { border-bottom: 1px solid var(--accent); }


/* ---------- Masthead mark ---------- */

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }

.brand-mark {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: contain;
  flex: none;
}

@media (prefers-color-scheme: dark) {
  .brand-mark { filter: invert(1) brightness(1.08); }
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.4rem;
  margin: 0 0 1rem;
  padding-top: 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 2rem 0 0.4rem;
}

p { margin: 0 0 1.1rem; max-width: var(--measure); }

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
}

.muted { color: var(--muted); }

.small { font-size: 0.9rem; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

/* ---------- Portrait ---------- */

.intro {
  display: grid;
  grid-template-columns: 1fr 12.5rem;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

.intro h1 { margin-top: -0.35rem; }
.intro p:last-child { margin-bottom: 0; }

.portrait {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

@media (max-width: 42rem) {
  .intro { grid-template-columns: 1fr; gap: 1.75rem; }
  .intro .portrait-col { order: -1; }
  .portrait { max-width: 10.5rem; }
}

.scanrow {
  margin: 1.75rem 0 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: none;
  line-height: 1.9;
}

/* ---------- Featured work ---------- */

.featured {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.4rem;
  margin: 2rem 0 2.5rem;
}

.featured .kicker {
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.featured h2 {
  margin: 0 0 0.6rem;
  padding-top: 0;
  font-size: 1.35rem;
  line-height: 1.25;
}

/* ---------- Figures ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.75rem 1.5rem;
  margin: 2.5rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.figure .n {
  font-family: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.85rem;
  line-height: 1.1;
  display: block;
}

.figure .l {
  font-size: 0.83rem;
  color: var(--muted);
  display: block;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ---------- Cards ---------- */

.cards { display: grid; gap: 1.25rem; margin: 2rem 0; }

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--accent); color: inherit; }

.card h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: none; }
.card .kicker {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.5rem;
}

/* ---------- Roles list ---------- */

.roles { border-top: 1px solid var(--rule); margin-top: 1.5rem; }

.role {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.role .when {
  color: var(--muted);
  font-size: 0.85rem;
  padding-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.role .what strong { display: block; font-weight: 600; }
.role .what span { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 34rem) {
  .role { grid-template-columns: 1fr; gap: 0.25rem; }
  .role .when { padding-top: 0; order: 2; }
}

/* ---------- Works list ---------- */

.works { border-top: 1px solid var(--rule); margin: 1.25rem 0 0; }

.work-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.work-item .t {
  display: block;
  font-family: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
}

.work-item .d {
  display: block;
  color: var(--muted);
  font-size: 0.93rem;
  margin-top: 0.15rem;
}

.work-item .tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.5rem;
  vertical-align: 0.12rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Link row ---------- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  max-width: none;
}

.links a {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

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

@media (max-width: 30rem) {
  nav { gap: 1rem; }
}

/* ---------- Case study blocks ---------- */

.block { margin: 2.25rem 0; }

.block h2 {
  margin: 0 0 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

ul { padding-left: 1.15rem; max-width: var(--measure); margin: 0 0 1.1rem; }
li { margin-bottom: 0.5rem; }

blockquote {
  margin: 2.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  font-family: Iowan Old Style, "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.5;
  max-width: var(--measure);
}

blockquote p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.6rem 1.15rem;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: var(--ink); color: var(--bg); }

.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: transparent; color: var(--ink); }

.btn .meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-left: 0.35rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: none;
  margin-top: 1.4rem;
}


/* ---------- Skip link & screen-reader utility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 3px 0;
}

.skip-link:focus {
  left: 0;
  color: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h2.eyebrow { font-weight: 600; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */

@media print {
  :root {
    --bg: #fff; --ink: #000; --muted: #444;
    --rule: #bbb; --accent: #000; --card: #fff;
  }
  body { font-size: 11pt; line-height: 1.45; }
  .masthead nav, .skip-link, .backlink, .btn, .cards { display: none; }
  .wrap { max-width: none; padding: 0; }
  main { padding-bottom: 0; }
  .portrait { max-width: 1.6in; }
  .figures { break-inside: avoid; }
  .block, .role, .work-item { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  a { text-decoration: none; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  footer { border-top: 1px solid #bbb; }
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

.backlink {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.backlink:hover { color: var(--ink); }
