/* johnmcarr.com — shared stylesheet */

:root {
  --navy: #0e2038;
  --navy-2: #16304f;
  --navy-3: #1d3d63;
  --accent: #c9a13b;
  --accent-dark: #a5822b;
  --ink: #22303f;
  --muted: #5b6b7c;
  --line: #e3e8ef;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(14, 32, 56, 0.08);
  --shadow-lg: 0 16px 40px rgba(14, 32, 56, 0.14);
  --max: 1080px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
}

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

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand-text small {
  display: block;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  max-width: 100%;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--navy);
  background: var(--bg);
}

.site-nav a.active {
  background: var(--navy);
  color: #fff;
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  color: #fff;
  padding: 5rem 0 7rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 161, 59, 0.22) 0%, rgba(201, 161, 59, 0) 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -260px;
  left: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero .lede {
  max-width: 34rem;
  margin-top: 1.1rem;
  font-size: 1.08rem;
  color: #c4d0de;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.pills span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #dbe4ee;
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-accent {
  background: var(--accent);
  color: var(--navy);
}

.btn-accent:hover {
  background: #d9b354;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  display: block;
  width: 170px;
  height: auto;
  border-radius: 16px;
  border: 3px solid rgba(201, 161, 59, 0.85);
  box-shadow: var(--shadow-lg);
}

/* ---------- Stats band ---------- */

.stats {
  position: relative;
  z-index: 2;
}

.stats .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: -3.2rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
}

.stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat .label {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Main content ---------- */

main {
  padding: 3.5rem 0 4.5rem;
}

main .wrap > :first-child {
  margin-top: 0;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2,
h2.section-title {
  font-size: 1.6rem;
  font-weight: 750;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--muted);
  margin-top: 0.3rem;
}

main h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.4rem 0 1rem;
}

main .wrap > h3 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 1.9rem 0 0.75rem;
}

main p {
  margin-bottom: 1rem;
  max-width: 46rem;
}

main a {
  color: var(--navy-3);
  font-weight: 500;
}

main a:hover {
  color: var(--accent-dark);
}

/* ---------- Card grid (home) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 161, 59, 0.55);
}

.card .kicker {
  display: inline-block;
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 0.9rem;
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

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

.card .arrow {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  color: var(--accent-dark);
  font-weight: 700;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.card:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-wide {
  grid-column: 1 / -1;
}

/* ---------- Page hero (subpages) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 100%);
  color: #fff;
  padding: 3.2rem 0 3rem;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -240px;
  right: -140px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 161, 59, 0.2) 0%, rgba(201, 161, 59, 0) 65%);
  pointer-events: none;
}

.page-hero h1 {
  position: relative;
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero .sub {
  position: relative;
  margin-top: 0.5rem;
  color: #c4d0de;
  max-width: 40rem;
}

/* ---------- Profile ---------- */

.profile-head {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.profile-head img {
  width: 130px;
  height: auto;
  border-radius: 14px;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

.credentials {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.4rem;
}

.credentials strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.credentials .creds-line {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  position: relative;
  margin: 1.75rem 0 0.5rem 0.5rem;
  padding-left: 1.9rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

.timeline li {
  position: relative;
  margin-bottom: 1.15rem;
  max-width: 46rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 0.42em;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
  border-radius: 50%;
}

.timeline .date {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.05rem;
}

/* ---------- Lists ---------- */

.plain-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.plain-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem 0.75rem 2.1rem;
  position: relative;
  font-size: 0.94rem;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.05em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.plain-list li small {
  color: var(--muted);
}

/* ---------- Definition rows ---------- */

.def-list {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.def-list .row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.def-list .row:hover {
  border-color: rgba(201, 161, 59, 0.55);
  box-shadow: var(--shadow);
}

.def-list .row strong {
  color: var(--navy);
}

.def-list .row .meta {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.7rem;
}

.contact-card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.contact-card h2::after {
  content: "";
  display: block;
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 0.5rem;
}

.contact-card table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
}

.contact-card td {
  padding: 0.34rem 0;
  vertical-align: top;
}

.contact-card td:first-child {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  width: 6.8rem;
  padding-right: 0.75rem;
  padding-top: 0.55rem;
}

.contact-email {
  text-align: center;
  margin: 2.5rem auto 0;
}

.contact-email .btn {
  background: var(--navy);
  color: #fff;
}

.contact-email .btn:hover {
  background: var(--navy-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.site-footer {
  background: var(--navy);
  color: #b7c4d3;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.footer-creds {
  font-size: 0.82rem;
  color: #8fa1b5;
  margin-top: 0.2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
}

.footer-nav a {
  color: #b7c4d3;
  text-decoration: none;
  font-size: 0.86rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: #8fa1b5;
  padding: 1.1rem 1.5rem;
}

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

@media (max-width: 760px) {
  .hero {
    padding: 3.5rem 0 6rem;
  }

  .hero-grid {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .hero .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .pills,
  .cta {
    justify-content: center;
  }

  .hero-photo img {
    width: 130px;
  }

  .header-inner {
    justify-content: center;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }
}
