/* ==========================================================================
   jamesashields.com — a light, modern design system
   White canvas, clear typography, and room to breathe. No external assets.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-raised: #f7f9f8;
  --ink: #202824;
  --ink-soft: #5e6863;
  --ink-faint: #68736b;
  --accent: #426553;
  --accent-strong: #294937;
  --accent-tint: #f3f7f4;
  --rule: #e5eae6;
  --shadow: 0 12px 36px rgb(32 40 36 / 0.05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

/* ---- Reset & base ---- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 4px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); line-height: 1.07; letter-spacing: -0.055em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.125rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.025em; }

p { margin: 0 0 1.4em; }

::selection { background: #dce9df; color: var(--ink); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

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

.wrap-wide { max-width: 71rem; }

main { padding: 6rem 0 4rem; }

.section { margin: 7rem 0; }
.section:first-child { margin-top: 0; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin: 0 0 1.5rem;
}

.lede {
  font-size: 1.1875rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.8;
  text-wrap: pretty;
}

.lede a { text-decoration: underline; text-decoration-color: #c8d6cc; text-underline-offset: 4px; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 4rem 0; }

/* ---- Header / nav ---- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5.5rem;
}

.brand {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .brand-dot { color: var(--accent); }

.site-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--ink-soft);
  padding: 0.5rem 0;
  transition: color 160ms ease;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #9db3a5;
  text-underline-offset: 0.6rem;
}

.nav-toggle { display: none; }

/* ---- Hero ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: center;
}

.hero h1 { margin-bottom: 0.5em; }
.hero .lede { max-width: 35rem; margin-bottom: 0; }

.portrait {
  width: 10rem;
  aspect-ratio: 0.94;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-raised);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wrap-wide > .hero {
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: clamp(3rem, 7vw, 6rem);
  padding: 1.5rem 0 2rem;
}
.wrap-wide > .hero .portrait { width: 100%; }
.wrap-wide > .hero h1 { max-width: 11em; }
.wrap:not(.wrap-wide) > .hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }

/* ---- Buttons & CTAs ---- */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.85rem 1.4rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.btn-ghost { border-color: var(--rule); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: #b8c7bd; color: var(--ink); background: var(--bg-raised); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* ---- Ventures ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 3rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
}

.card h3 { margin: 0; font-size: 1.375rem; line-height: 1.35; }
.card p { margin: 0; max-width: 29rem; font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.8; }

.card .card-meta {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-faint);
}

.card a.card-link { color: var(--ink); }
.card a.card-link:hover { color: var(--accent); text-decoration: none; }

.card .card-cta { margin-top: auto; padding-top: 0.75rem; font-size: 0.8125rem; font-weight: 500; }

/* ---- Writing list ---- */

.post-list { list-style: none; margin: 2rem 0 0; padding: 0; }

.post-list li {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list li:first-child { border-top: 1px solid var(--rule); }

.post-list h3 { margin: 0.5rem 0; font-size: 1.375rem; }
.post-list h3 a { color: var(--ink); }
.post-list h3 a:hover { color: var(--accent); text-decoration: none; }
.post-list .post-excerpt { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 0.9375rem; }

time, .post-date {
  font-size: 0.75rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---- Article ---- */

.article-header { margin-bottom: 3.5rem; }
.article-header h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
.article-body { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.85; }
.article-body p { margin-bottom: 1.5em; }
.article-body h2 { font-size: 1.625rem; margin: 2em 0 0.75em; }
.article-body blockquote {
  margin: 2em 0;
  padding: 0.25em 0 0.25em 1.5em;
  border-left: 2px solid #b8cbbf;
  color: var(--ink-soft);
  font-style: italic;
}
.article-body ul, .article-body ol { margin: 0 0 1.5em; padding-left: 1.4em; }
.article-body li { margin-bottom: 0.5em; }
.article-footer { margin-top: 4rem; }

/* ---- Subscribe module ---- */

.subscribe {
  background: var(--accent-tint);
  border-radius: 12px;
  padding: 3rem;
}

.subscribe h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.subscribe p { max-width: 38rem; color: var(--ink-soft); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.subscribe-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
  border: 1px solid #dce4de;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
}
.subscribe-form input[type="email"]:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); opacity: 1; }
.form-note { font-size: 0.8125rem; color: var(--ink-faint); margin: 0.75rem 0 0; }

/* ---- Contact form ---- */

.contact-form { display: grid; gap: 1.5rem; margin-top: 2rem; }
.contact-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.85rem 1rem;
  border: 1px solid #dce4de;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 10rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { font-size: 0.9375rem; font-weight: 500; margin-top: 0.75rem; }
.form-status:empty { display: none; }
.form-status.ok { color: #286442; }

/* ---- Affiliations / about ---- */

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  color: var(--ink-faint);
  font-size: 0.875rem;
  font-weight: 500;
}

.highlights { margin: 2rem 0 0; padding: 0; list-style: none; }
.highlights li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.highlights li:first-child { border-top: 1px solid var(--rule); }
.highlights .k {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  padding-top: 0.25rem;
}

/* ---- Contact channels ---- */

.channels { list-style: none; margin: 2rem 0 0; padding: 0; }
.channels li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.channels li:first-child { border-top: 1px solid var(--rule); }
.channels .channel-name { font-weight: 500; min-width: 6rem; }
.channels .channel-note { color: var(--ink-faint); font-size: 0.8125rem; }
.channels a { overflow-wrap: anywhere; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.site-footer .wrap-wide {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }

/* ---- Utilities ---- */

.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }
.mt-0 { margin-top: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 0; }
.section-head .more { font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }

/* ---- Responsive layout ---- */

@media (max-width: 900px) {
  .wrap-wide > .hero { grid-template-columns: minmax(0, 1fr) 13rem; gap: 2.5rem; }
  .card-grid { gap: 1rem 2rem; }
}

@media (max-width: 1100px) {
  .site-header .wrap-wide { min-height: 4.5rem; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    font-size: 0.8125rem;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    max-height: calc(100svh - 4.5rem);
    overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.75rem 1.5rem 1.25rem; }
  .site-nav a { display: block; padding: 0.75rem 0; font-size: 0.9375rem; }
  .site-nav a[aria-current="page"] { text-decoration: none; color: var(--accent); }
}

@media (max-width: 700px) {
  main { padding: 3.5rem 0 2rem; }
  .section { margin: 4.5rem 0; }
  .hero, .wrap-wide > .hero { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: 0; }
  .hero .portrait { order: -1; width: 7rem; aspect-ratio: 1; border-radius: 10px; }
  .wrap-wide > .hero .portrait { width: 7rem; }
  .hero h1 { max-width: 12em; }
  .lede { font-size: 1.0625rem; line-height: 1.8; }
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .card { padding: 1.75rem 0; }
  .post-list li { padding: 1.75rem 0; }
  .subscribe { padding: 2rem 1.5rem; }
  .subscribe-form .btn { flex: 1 1 8rem; }
  .highlights li { grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; }
  .article-header { margin-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .subscribe, .cta-row { display: none; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
}
