/* The Complete Engineer — shared styles
   Brand kit: Fraunces (headings) + Inter (body)
   Palette: #256D9B engineer blue · #132A3E deep navy · #FAF8F3 warm off-white · #C59A4A muted gold */

:root {
  --primary: #256D9B;
  --primary-dark: #132A3E;
  --primary-light: #DCECF5;
  --surface: #F3F8FB;
  --page: #FAF8F3;
  --muted: #526575;
  --accent: #C59A4A;
  --hairline: rgba(19, 42, 62, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--primary-dark);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; color: var(--primary-dark); }

h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; color: var(--primary-dark); letter-spacing: -0.01em; }
h1 { font-weight: 700; font-size: 52px; line-height: 1.08; font-variation-settings: "opsz" 144; }
h2 { font-weight: 500; font-size: 36px; line-height: 1.18; font-variation-settings: "opsz" 72; }
h3 { font-weight: 500; font-size: 22px; line-height: 1.3; font-variation-settings: "opsz" 48; }
h4 { font-weight: 500; font-size: 18px; line-height: 1.35; font-variation-settings: "opsz" 48; }

p { margin: 0 0 16px; }
em, i { font-style: italic; }

/* NAV */
.nav-wrap {
  background: var(--page);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.nav {
  max-width: 1160px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; gap: 32px;
}
.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-size: 18px;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48;
  white-space: nowrap;
}
.brand:hover { color: var(--primary-dark); text-decoration: none; }
.brand-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--hairline);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 28px; align-items: center; margin-left: auto; list-style: none; }
.nav-links a {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-links a.cta {
  background: var(--primary);
  color: var(--page);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
}
.nav-links a.cta:hover { background: #1A5278; color: var(--page); text-decoration: none; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--primary-dark); margin: 4px 0; transition: all 0.2s; border-radius: 1px; }

.mobile-menu {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--page);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 32px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.mobile-menu ul li a {
  display: block; padding: 14px 0;
  font-size: 15px; font-weight: 500;
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu .cta {
  margin-top: 16px;
  text-align: center;
  background: var(--primary); color: var(--page);
  padding: 12px; border-radius: 8px;
  border-bottom: none !important;
}

/* LAYOUT */
main { display: block; }
.section { padding: 88px 32px; }
.section.hero { padding: 112px 32px 80px; }
.section.surface { background: var(--surface); }
.section.dark { background: var(--primary-dark); color: var(--page); }
.section.dark h1, .section.dark h2, .section.dark h3 { color: var(--page); }
.section.dark .lede, .section.dark p { color: rgba(250, 248, 243, 0.85); }
.section.tight { padding-top: 56px; padding-bottom: 56px; }
.container { max-width: 1100px; margin: 0 auto; }
.text-col { max-width: 720px; }
.text-col-wide { max-width: 820px; }
.text-col-narrow { max-width: 640px; }
.center { text-align: center; }

/* Eyebrow */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 20px;
  display: inline-block;
}

/* Hero */
.hero-rule { width: 48px; height: 3px; background: var(--accent); margin-bottom: 32px; border-radius: 2px; }
.hero h1 { margin-bottom: 24px; }
.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 36px;
}
.lede.dark { color: rgba(250, 248, 243, 0.88); }

/* Pull quote */
.pull-quote {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.45;
  color: var(--primary-dark);
  margin: 0 0 32px;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  max-width: 680px;
}
.pull-quote.large { font-size: 28px; padding-left: 28px; }

/* Self-talk fragments (homepage worldview block) */
.self-talk-list { margin: 32px 0 0; max-width: 680px; }
.self-talk-list p {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 16px;
}
.self-talk-list p:last-child { margin-bottom: 0; }

/* CTA buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; align-items: center; }
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500; font-size: 15px;
  padding: 14px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
  border: 1.5px solid transparent;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--primary); color: var(--page); border-color: var(--primary); }
.btn-primary:hover { background: #1A5278; border-color: #1A5278; color: var(--page); text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.btn-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
  font-size: 16px;
}
.btn-link:hover { color: var(--primary-dark); text-decoration: underline; }
.btn-on-dark.btn-primary { background: var(--page); color: var(--primary-dark); border-color: var(--page); }
.btn-on-dark.btn-primary:hover { background: #fff; color: var(--primary-dark); border-color: #fff; }

/* About block */
.about-section { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 720px; }
.about-section p { font-size: 18px; }

/* Headshot (used on /about) */
.headshot {
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 0 32px;
  border: 1px solid var(--hairline);
  box-shadow: 0 2px 8px rgba(19, 42, 62, 0.06);
}

/* Cards (3-col grid, e.g. anchor cards on homepage) */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.card {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 28px;
  text-decoration: none;
  color: var(--primary-dark);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(19, 42, 62, 0.04);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(19, 42, 62, 0.06);
}
.card h3 { margin-bottom: 10px; color: var(--primary-dark); }
.card p { color: var(--muted); font-size: 16px; margin: 0; line-height: 1.6; }

/* Anchor cards (non-clickable, used in worldview block) */
.anchor-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; max-width: 900px; }
.anchor-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 28px;
}
.anchor-card h3 { margin-bottom: 12px; }
.anchor-card p { color: var(--primary-dark); margin: 0 0 12px; font-size: 16px; line-height: 1.65; }
.anchor-card p:last-child { margin-bottom: 0; }

/* Cluster cards (used on /writing and at the bottom of each cluster page) */
.cluster-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.cluster-card {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 28px;
  text-decoration: none;
  color: var(--primary-dark);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(19, 42, 62, 0.04);
}
.cluster-card:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(19, 42, 62, 0.06);
}
.cluster-card h3 { margin-bottom: 8px; }
.cluster-card p { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.6; }

/* Essay cards (inside a cluster page) */
.essay-list { display: flex; flex-direction: column; gap: 24px; margin-top: 32px; }
.essay-card {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.essay-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(19, 42, 62, 0.05); }
.essay-card h3 { margin-bottom: 8px; }
.essay-card .essay-subtitle {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 16px;
}
.essay-card .essay-excerpt {
  font-size: 16px;
  line-height: 1.65;
  color: var(--primary-dark);
  margin: 0 0 20px;
}
.essay-card .read-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 109, 155, 0.35);
  padding-bottom: 1px;
}
.essay-card .read-link:hover { border-color: var(--primary); }

/* Recent essays on homepage (single essay summary) */
.recent-essay {
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
}
.recent-essay:last-child { border-bottom: none; }
.recent-essay .cluster-tag {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.recent-essay h3 { margin-bottom: 12px; }
.recent-essay .excerpt {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 16px;
}

/* Topic list (writing/newsletter) */
.topic-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
  max-width: 640px;
}
.topic-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 17px;
  color: var(--primary-dark);
}
.topic-list li:last-child { border-bottom: none; }
.topic-list li::before {
  content: "—";
  color: var(--accent);
  margin-right: 12px;
}

/* Vibe Check session blocks */
.session-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}
.session-block:last-child { border-bottom: none; }
.session-block h3 { font-size: 20px; margin: 0; }
.session-block p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.tag-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 16px;
}
.tag {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--muted);
}

/* Appearance card (used on homepage + /appearances) */
.appearance-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--primary-dark);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(19, 42, 62, 0.04);
}
.appearance-card:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(19, 42, 62, 0.06);
}
.appearance-card .banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  min-height: 160px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.appearance-card .banner img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  display: block;
}
.appearance-card .banner-text {
  color: var(--page);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  text-align: center;
  opacity: 0.92;
  padding: 24px;
}
.appearance-card .content { padding: 24px 28px; }
.appearance-card h3 { margin-bottom: 8px; }
.appearance-card .listen-line { color: var(--muted); font-size: 15px; margin: 0; }
.appearance-card .listen-line a { color: var(--primary); }

/* Subscribe / final CTA block (dark) */
.cta-block {
  background: var(--primary-dark);
  color: var(--page);
  border-radius: 12px;
  padding: 56px 48px;
  text-align: center;
  margin-top: 32px;
}
.cta-block h2 { color: var(--page); margin-bottom: 16px; }
.cta-block p { color: rgba(250, 248, 243, 0.85); margin-bottom: 28px; max-width: 540px; margin-left: auto; margin-right: auto; }

/* Contact form */
.contact-form {
  display: flex; flex-direction: column; gap: 20px;
  max-width: 560px;
  margin-top: 32px;
}
.contact-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.02em;
}
.contact-form .required { color: var(--accent); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--page);
  color: var(--primary-dark);
  width: 100%;
  transition: border-color 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.contact-form textarea {
  min-height: 160px;
  resize: vertical;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}
.contact-form button {
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 500;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--page);
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.15s ease;
  letter-spacing: 0.01em;
}
.contact-form button:hover { background: #1A5278; }
.form-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

/* Back link */
.back-link {
  display: inline-block;
  font-size: 15px;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 109, 155, 0.35);
  padding-bottom: 1px;
  margin-top: 24px;
}
.back-link:hover { border-color: var(--primary); }

/* FOOTER */
footer {
  background: var(--primary-dark);
  color: var(--page);
  padding: 64px 32px 36px;
  margin-top: 32px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 36px;
}
.footer-col h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
  color: rgba(250, 248, 243, 0.6);
  font-variation-settings: "opsz" 48;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  color: rgba(250, 248, 243, 0.92);
  text-decoration: none;
  font-size: 15px;
}
.footer-col a:hover { color: var(--page); text-decoration: underline; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(250, 248, 243, 0.15);
  font-size: 13px;
  color: rgba(250, 248, 243, 0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a { color: rgba(250, 248, 243, 0.7); }

/* RESPONSIVE */
@media (max-width: 980px) {
  .anchor-cards { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .cluster-cards { grid-template-columns: 1fr; }
  .session-block { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 880px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }
  .lede { font-size: 17px; }
  .pull-quote { font-size: 20px; }
  .pull-quote.large { font-size: 22px; padding-left: 20px; }
  .nav { padding: 14px 20px; gap: 16px; }
  .brand-tagline { display: none; }
  .nav-links { display: none; }
  .hamburger { display: block; margin