/* =========================================================
   Joshua C. Terrell — site styles
   Flat / material surfaces, blue primary, white background
   ========================================================= */

:root {
  --blue-800: #1D4ED8;
  --blue-700: #2563EB;
  --blue-600: #3B82F6;
  --blue-500: #5B9AF8;
  --blue-100: #DBEAFE;
  --blue-50:  #EFF6FF;

  --ink:       #1B2430;
  --ink-soft:  #545F6E;
  --ink-faint: #7C8794;

  --white:      #FFFFFF;
  --surface-alt:#F6F9FC;
  --border:     #E4E9F0;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-1: 0 1px 2px rgba(20, 30, 50, 0.06), 0 1px 3px rgba(20, 30, 50, 0.08);
  --shadow-2: 0 6px 16px rgba(20, 30, 50, 0.12);

  --nav-h: 68px;
  --max: 1080px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

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

a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--blue-700);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- under-construction banner ---------- */
.notice {
  background: #FFF7E6;
  border-bottom: 1px solid #F3DFAD;
  color: #7A5B12;
  font-size: 0.88rem;
  text-align: center;
  padding: 8px 16px;
}
.notice strong { font-weight: 700; }

/* ---------- top navigation ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--blue-600);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 700;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-link:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }
.nav-link.is-active { color: var(--blue-700); background: var(--blue-50); }

.nav-cta {
  margin-left: 8px;
  background: var(--blue-600);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.nav-cta:hover { background: var(--blue-700); text-decoration: none; }

.hamburger {
  display: none;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.hamburger:hover { background: var(--blue-50); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute; left: 0;
  width: 20px; height: 2px;
  background: var(--ink);
  transition: transform 0.2s var(--ease), top 0.2s var(--ease);
}
.hamburger span::before { top: -6px; }
.hamburger span::after  { top: 6px; }
.hamburger[aria-expanded="true"] span { background: transparent; }
.hamburger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 18px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
    box-shadow: var(--shadow-2);
  }
  .nav-links.is-open { opacity: 1; transform: translateY(0); visibility: visible; }
  .nav-link, .nav-cta { padding: 12px 10px; }
  .nav-cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .hamburger { display: inline-flex; }
}

/* ---------- page shell ---------- */
main { padding-top: var(--nav-h); }

.section { padding: 64px 0; }
.section-alt { background: var(--surface-alt); }
.section-tight { padding: 40px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { margin-bottom: 0; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.12s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--blue-700); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--blue-700); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue-600); background: var(--blue-50); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 60px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow-free {
  color: var(--blue-700);
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 10px;
}
.hero p.lead {
  font-size: 1.1rem;
  max-width: 52ch;
}
.hero-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  aspect-ratio: 4 / 5;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-photo { max-width: 320px; margin: 0 auto; }
}

/* ---------- feature grid (what I do) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.feature {
  background: #fff;
  padding: 28px 26px;
}
.feature .icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { margin-bottom: 0; font-size: 0.95rem; }

@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- cards (courses, resources) ---------- */
.stack { display: flex; flex-direction: column; gap: 20px; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 28px;
  transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

.course-card {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 24px;
  padding: 0;
  overflow: hidden;
}
.course-card .bar { background: var(--blue-600); }
.course-card .body { padding: 26px 26px 26px 0; }
.course-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 10px;
  font-weight: 600;
}
.pill {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- article / list rows ---------- */
.post-row {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.post-row:first-child { padding-top: 0; }
.post-row:last-child { border-bottom: none; }
.post-date {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: block;
}
.post-row h3 { margin-bottom: 8px; }
.post-row .tags { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-row .tags span {
  font-size: 0.78rem;
  color: var(--ink-faint);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- read-more detail blocks ---------- */
details.expand {
  margin-top: 10px;
}
details.expand summary {
  cursor: pointer;
  color: var(--blue-700);
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
}
details.expand summary::-webkit-details-marker { display: none; }
details.expand summary::after {
  content: "Read the full story";
}
details.expand[open] summary::after {
  content: "Show less";
}
details.expand .full { margin-top: 14px; }

/* ---------- two-up external link blocks ---------- */
.external-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.external-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  background: var(--surface-alt);
}
.external-card .url {
  font-size: 0.85rem;
  color: var(--blue-700);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
@media (max-width: 700px) {
  .external-grid { grid-template-columns: 1fr; }
}

/* ---------- book / resource feature block ---------- */
.feature-block {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}
.feature-block img { border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
@media (max-width: 760px) {
  .feature-block { grid-template-columns: 1fr; }
  .feature-block img { max-width: 220px; }
}

/* ---------- table / archive ---------- */
.archive-table { width: 100%; border-collapse: collapse; }
.archive-table th {
  text-align: left;
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-transform: none;
  border-bottom: 2px solid var(--border);
  padding: 10px 12px;
}
.archive-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.archive-table tr:last-child td { border-bottom: none; }
.archive-table .type {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-700);
}
.archive-table td.date { color: var(--ink-faint); font-size: 0.88rem; white-space: nowrap; }

/* ---------- location cards ---------- */
.loc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.loc-grid img { border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
@media (max-width: 800px) {
  .loc-grid { grid-template-columns: 1fr; }
}

/* ---------- office hours slots ---------- */
.slot-list { display: flex; flex-direction: column; gap: 12px; }
.slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.slot .when { font-weight: 700; }
.slot .what { color: var(--ink-faint); font-size: 0.9rem; }

/* ---------- contact / newsletter form (visual only) ---------- */
.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.inline-form input[type="email"] {
  flex: 1 1 240px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
}
.inline-form input[type="email"]:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.form-note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 8px; }

/* ---------- callout / disclaimer box ---------- */
.callout {
  border: 1px solid #F3DFAD;
  background: #FFF9EC;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  color: #7A5B12;
  font-size: 0.92rem;
}
.callout strong { display: block; margin-bottom: 4px; color: #5C4409; }

/* ---------- page header (non-home pages) ---------- */
.page-header { padding: 48px 0 8px; }
.page-header .eyebrow { color: var(--blue-700); font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.page-header p.lead { max-width: 62ch; font-size: 1.05rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  background: var(--surface-alt);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-line {
  font-size: 0.86rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.social-links a:hover { background: var(--blue-600); color: #fff; border-color: var(--blue-600); text-decoration: none; }
.social-links svg { width: 16px; height: 16px; fill: currentColor; }

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 10px;
  line-height: 1.5;
}
