/* ============================================
   jasonkmillard.com — Global Styles
   ============================================ */

:root {
  --bg: #fafaf8;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #999;
  --accent: #2a5caa;
  --accent-hover: #1e4585;
  --border: #e8e8e4;
  --border-light: #f0f0ec;
  --nav-height: 64px;
  --max-width: 860px;
  --max-width-wide: 1200px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin-bottom: 1em; color: var(--text); }
p:last-child { margin-bottom: 0; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { font-weight: 600; }

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

/* ---- Navigation ---- */
nav {
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .nav-logo {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
nav .nav-logo:hover { text-decoration: none; color: var(--accent); }
nav .nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
nav .nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s;
}
nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--text);
  text-decoration: none;
}
nav .nav-links a.active {
  color: var(--accent);
}

/* ---- Page Header ---- */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-header .eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.page-header h1 { margin-bottom: 12px; }
.page-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
}

/* ---- About / Hero ---- */
.about-hero {
  padding: 72px 0 56px;
}
.about-hero .name {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.about-hero .title-line {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.about-hero .bio {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 620px;
  color: var(--text);
  margin-bottom: 32px;
}
.about-hero .links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}
.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  border-color: #bbb;
  color: var(--text);
  text-decoration: none;
  background: #f5f5f2;
}

/* ---- Sections ---- */
.section { padding: 48px 0; border-top: 1px solid var(--border-light); }
.section:first-of-type { border-top: none; }
.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---- Experience / Timeline ---- */
.experience-list { display: flex; flex-direction: column; gap: 28px; }
.exp-item { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.exp-meta { padding-top: 2px; }
.exp-meta .years {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.exp-meta .company {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.exp-content .role {
  font-weight: 600;
  font-size: 0.97rem;
  margin-bottom: 4px;
}
.exp-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Article Cards ---- */
.articles-list { display: flex; flex-direction: column; gap: 0; }
.article-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: none;
}
.article-card:first-child { border-top: 1px solid var(--border-light); }
.article-card:hover { text-decoration: none; }
.article-card:hover .article-title { color: var(--accent); }
.article-card .article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
}
.article-card .tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(42, 92, 170, 0.07);
  padding: 2px 8px;
  border-radius: 4px;
}
.article-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.15s;
  line-height: 1.35;
}
.article-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.article-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 3px;
}

/* ---- Demo Cards ---- */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
}
.demo-card:hover {
  border-color: #c8c8c0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  text-decoration: none;
}
.demo-card .demo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(42, 92, 170, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.demo-card .demo-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.demo-card .demo-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}
.demo-card .demo-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.demo-tag {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 4px;
}
.demo-card .demo-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}
.demo-card--placeholder {
  border-style: dashed;
  opacity: 0.55;
}
.demo-card--placeholder .demo-title { color: var(--text-secondary); }

/* ---- Article / Reading layout ---- */
.article-body {
  padding: 56px 0 80px;
}
.article-body h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1.2;
}
.article-body .article-body-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.article-content {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.article-content p { margin-bottom: 1.5em; }
.article-content h2 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  margin: 2.5em 0 0.8em;
  padding-top: 0.5em;
  border-top: 1px solid var(--border-light);
}
.article-content h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  margin: 1.8em 0 0.6em;
}
.article-content ul, .article-content ol {
  margin: 0 0 1.5em 1.5em;
}
.article-content li { margin-bottom: 0.4em; }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 1.5em 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 80px;
}
footer .footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
footer .footer-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
footer .footer-links {
  display: flex;
  gap: 20px;
}
footer .footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}
footer .footer-links a:hover { color: var(--text); text-decoration: none; }

/* ---- Utility ---- */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }

/* ---- Beliefs grid — 2 columns on wide screens ---- */
.beliefs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 580px;
}
@media (min-width: 860px) {
  .beliefs-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
    gap: 32px 48px;
  }
}


/* ---- Responsive ---- */
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  .about-hero .name { font-size: 2rem; }
  .exp-item { grid-template-columns: 1fr; gap: 4px; }
  .exp-meta { display: flex; gap: 8px; }
  nav .nav-links { gap: 20px; }
  footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}
