/* ashtonwilliamallen.com — minimal typographic */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #16150f;
  --muted: #5f5c52;
  --faint: #8b877a;
  --line: #e3e0d8;
  --accent: #9a4b1f;
  --accent-soft: #f2e6dd;
  --maxw: 40rem;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131210;
    --surface: #1a1917;
    --text: #edeae2;
    --muted: #a5a094;
    --faint: #78736a;
    --line: #2e2c28;
    --accent: #e08b52;
    --accent-soft: #2a1f16;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- header ---- */

.site-header {
  padding: 3rem 0 0;
}

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

.wordmark {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
}

.wordmark:hover { color: var(--accent); }

nav.top {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

nav.top a {
  color: var(--muted);
  text-decoration: none;
}

nav.top a:hover,
nav.top a[aria-current="page"] {
  color: var(--accent);
}

/* ---- main ---- */

main { padding: 3.5rem 0 4rem; }

h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 650;
}

h2 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin: 3.5rem 0 1.25rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.1rem; }

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
}

a { color: var(--accent); text-underline-offset: 2px; }

/* ---- project list ---- */

.projects { list-style: none; margin: 0; padding: 0; }

.projects li { border-top: 1px solid var(--line); }

.projects li:last-child { border-bottom: 1px solid var(--line); }

.projects a.card {
  display: block;
  padding: 1.4rem 0;
  text-decoration: none;
  color: inherit;
}

.projects a.card:hover h3 { color: var(--accent); }

.projects .meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

.projects p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Grouped project grid: one column on phones, two on tablets, three on
   desktop. Each cell keeps the hairline above it; the list closes with one
   line underneath instead of a line under every last item. */
.projects.grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.projects.grid li:last-child { border-bottom: 0; }

@media (min-width: 34rem) {
  .projects.grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 50rem) {
  .projects.grid { grid-template-columns: repeat(3, 1fr); }
}

.projects.grid a.card { padding: 1.25rem 0 1rem; }

.projects.grid p { font-size: 0.92rem; line-height: 1.55; }

/* Each cell is a column, so the link row sits at the bottom and lines up
   across a row of cards whatever their description length. */
.projects.grid li {
  display: flex;
  flex-direction: column;
}

.projects.grid a.card { flex: 1; }

/* Scoped under .projects so it outranks the ".projects p { margin: 0 }" rule. */
.projects .card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.15rem 0 1.4rem;
}

.card-links a {
  min-width: 5.75rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  color: var(--accent);
}

.card-links a:hover { background: var(--accent-soft); }



/* ---- simulator link ---- */

.demo {
  display: inline-block;
  margin: -0.35rem 0 1.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
}

.demo:hover { border-color: var(--accent); background: var(--accent-soft); }

.projects .demo { margin-right: 0.4rem; }

.prose .demo { margin: 0.4rem 0 0.6rem; font-size: 0.85rem; }

/* ---- OSINT: a blinking cursor on the heading, in the heading's own color ---- */

.osint-head::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.35em;
  vertical-align: -0.15em;
  background: currentColor;
  animation: cursor-blink 1.1s steps(1) infinite;
}

@keyframes cursor-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .osint-head::after { animation: none; }
}

/* ---- links row ---- */

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  font-size: 0.95rem;
}

/* ---- prose (legal pages) ---- */

.prose h1 { font-size: clamp(1.7rem, 5vw, 2.1rem); margin-bottom: 0.4rem; }

.prose .updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.prose h2 {
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
}

.prose h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
}

.prose ul { padding-left: 1.15rem; margin: 0 0 1.1rem; }

.prose li { margin-bottom: 0.4rem; }

.prose p, .prose li { color: var(--muted); }

.callout {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  border-radius: 0 4px 4px 0;
}

.callout p { margin: 0; color: var(--text); font-size: 0.95rem; }

/* ---- figures (project screenshots) ---- */

.prose figure {
  margin: 2rem 0 2.25rem;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--faint);
  line-height: 1.5;
}

/* Long unbroken URLs must not push the page sideways on a phone. */
.prose a { overflow-wrap: anywhere; }

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Screenshots carry fine detail, so let them run wider than the reading column. */
@media (min-width: 56rem) {
  .prose figure {
    width: 52rem;
    margin-left: calc((40rem - 52rem) / 2);
  }
}

/* ---- services feature (homepage; card is commented out in index.html) ---- */

.feature {
  display: block;
  margin: 2.5rem 0 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--accent);
  border-left-width: 3px;
  border-radius: 0 6px 6px 0;
  background: var(--accent-soft);
  text-decoration: none;
  color: inherit;
}

.feature:hover { border-left-width: 6px; padding-left: 1.2rem; }

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature .meta {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-weight: 600;
}

/* ---- services ---- */

.cta {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.cta:hover { background: var(--text); border-color: var(--text); }

.cta-row { margin: 1.75rem 0 1.6rem; }

.services .cta-note { font-size: 0.9rem; color: var(--faint); }

.services section { margin-top: 1rem; }

/* The two services, side by side under the headline. */
.services .pillars {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

@media (min-width: 34rem) {
  .services .pillars { grid-template-columns: 1fr 1fr; }
}

.services .pillars li { margin: 0; }

.pillars a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.15rem 1.25rem 1.1rem;
  border: 1px solid var(--accent);
  border-top-width: 3px;
  border-radius: 6px;
  background: var(--accent-soft);
  text-decoration: none;
  color: inherit;
}

.pillars a:hover { background: var(--surface); }

.pillars strong {
  margin: 0.4rem 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.pillars .pillar-text {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.pillars .more {
  margin-top: auto;
  padding-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.services .kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* One section per service: a large heading, a short pitch, then cards. */
.services .pillar { margin-top: 4rem; }

.services .pillar h2 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(1.35rem, 4.5vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 3.5rem;
}

.services .pillar-lede {
  max-width: 35rem;
  margin-bottom: 1.5rem;
  font-size: 1.03rem;
}

.services .cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

@media (min-width: 34rem) {
  .services .cards { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 50rem) {
  .services .cards { grid-template-columns: repeat(3, 1fr); }
}

.services .cards li {
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.services .cards h3 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--text);
}

.services .cards p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 1rem 0 1rem 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.steps li:last-child { border-bottom: 1px solid var(--line); }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.steps strong {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
}

.video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cases { list-style: none; margin: 0 0 1.5rem; padding: 0; }

.cases li {
  margin: 0 0 0.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.cases h3 { margin-bottom: 0.35rem; }

.cases p { margin: 0 0 0.4rem; font-size: 0.93rem; }

.cases p:last-child { margin: 0; color: var(--accent); }

/* ---- wide pages (services) ---- */

/* Header, main and footer all widen together so their edges line up.
   Running text keeps a normal reading width; grids use the extra room. */
.page-wide .wrap { max-width: 56rem; }

.page-wide h1 { max-width: 20em; }

.page-wide .lede { max-width: 38rem; }

.services .pricing-note {
  max-width: 40rem;
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.services .pricing-note strong { color: var(--text); }

.faq-list h3 { margin-top: 1.85rem; font-size: 1rem; }

.faq-list p { font-size: 0.95rem; }

@media (min-width: 50rem) {
  .services .steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 1.5rem;
    border-top: 1px solid var(--line);
  }

  .services .steps li,
  .services .steps li:last-child {
    padding: 2.9rem 0 0;
    border: 0;
  }

  .services .steps li::before { top: 0.9rem; }

  .faq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2.5rem;
  }
}

/* ---- resume ---- */

.resume-head { margin-bottom: 0.5rem; }

.resume-head h1 { margin-bottom: 0.3rem; }

.resume-tag {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.resume-contact .sep { color: var(--faint); }

.resume .nobr { white-space: nowrap; }

/* Too narrow for one row: email on its own line, the two profiles below. */
@media (max-width: 34rem) {
  .resume-contact a:first-child { flex-basis: 100%; }
  .resume-contact .sep:first-of-type { display: none; }
}

.resume-contact a { overflow-wrap: anywhere; }

.resume-contact .on-print { display: none; }

.resume-actions { margin: 0; }

.resume-actions .demo { margin: 0; }

.resume h2 { margin: 2.5rem 0 1rem; }

.resume > section > p { color: var(--muted); font-size: 0.95rem; }

.role { margin: 0 0 1.6rem; }

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
}

.role-head h3 { margin: 0; }

.role-when {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.role-org {
  margin: 0.1rem 0 0.55rem;
  font-size: 0.9rem;
  color: var(--faint);
}

.role-tech {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--faint);
}

.role ul {
  margin: 0;
  padding-left: 1.1rem;
}

.role li {
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.resume section > .role-head { margin-top: 0.4rem; }

/* One letter page when printed or exported to PDF. */
@media print {
  @page { size: letter; margin: 0.4in 0.6in; }

  :root, :root:not([data-theme="light"]) {
    --bg: #fff;
    --surface: #fff;
    --text: #111;
    --muted: #333;
    --faint: #555;
    --line: #ccc;
    --accent: #111;
  }

  body {
    font-family: Calibri, Carlito, Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.34;
    background: #fff;
  }

  /* No monospace on paper: dates and tech lines use the body face. */
  .role-when, .role-tech { font-family: inherit; letter-spacing: 0; }

  .site-header, .site-footer, .resume-actions { display: none; }

  main { padding: 0; }

  .wrap { max-width: none; padding: 0; }

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

  h1 { font-size: 24pt; margin: 0 0 2pt; }

  .resume-head { margin: 0; }

  .resume-tag { font-size: 11pt; margin: 0 0 3pt; }

  .resume-contact { font-size: 10pt; gap: 0 6pt; margin: 0; }

  .resume-contact .on-screen { display: none; }

  .resume-contact .on-print { display: inline; }

  .resume h2 {
    margin: 9pt 0 3.5pt;
    padding-bottom: 1.5pt;
    border-bottom: 0.75pt solid var(--line);
    font-size: 9.5pt;
    color: var(--text);
  }

  .resume > section > p { font-size: 10.2pt; line-height: 1.27; margin: 0; }

  .role { margin: 0 0 5pt; break-inside: avoid; }

  .role-head h3 { font-size: 11.3pt; }

  .role-when { font-size: 10pt; }

  .role-org { font-size: 10pt; margin: 0 0 1.5pt; }

  .role-tech { font-size: 9.5pt; font-style: italic; margin: 0 0 2.5pt; }

  .role ul { padding-left: 12pt; }

  .role li { font-size: 10.2pt; line-height: 1.25; margin-bottom: 0.8pt; }

}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 3rem;
  font-size: 0.85rem;
  color: var(--faint);
}

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

.site-footer a { color: var(--faint); text-decoration: none; }

.site-footer a:hover { color: var(--accent); }

.site-footer nav { display: flex; gap: 1.25rem; }

/* ---- 404 ---- */

.center { text-align: center; padding: 5rem 0; }

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

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