/* jasonmclachlan.com - shared styles. Bump ASSET_VERSION in build_pages.py on change. */
:root {
  --bg: #0b0c0b;
  --text: #f4f4f0;
  --muted: #bdbdb6;
  --lime: #8cff1a;
  --line: rgba(244, 244, 240, 0.12);
  --gold: #c9a45c;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(140, 255, 26, 0.45);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--lime); text-decoration-color: var(--lime); }
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* Top nav */
.site-nav-bar {
  border-bottom: 1px solid var(--line);
}
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}
.site-nav-brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  flex: 0 0 auto;
}
.site-nav-brand:hover { color: var(--lime); }
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.15rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.site-nav a[aria-current="page"] { color: var(--lime); }

header.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.25rem 0 2.75rem;
  gap: 2rem;
  overflow: hidden;
}

header.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12%;
  width: 28rem;
  height: 14rem;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(140, 255, 26, 0.09), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-text, .hero-photo { position: relative; z-index: 1; }

.hero h1, h1.hero-name {
  margin: 0;
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-size: clamp(2.7rem, 12vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 0.85rem 0 0;
  font-family: "Permanent Marker", cursive;
  font-size: clamp(1.35rem, 4.4vw, 2.15rem);
  color: var(--lime);
  line-height: 1.15;
}

.subline {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c8c8c3;
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  margin: 1.55rem auto 0;
  width: 100%;
  max-width: 22.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.15rem;
  min-height: 3rem;
  border-radius: 999px;
  border: 2px solid var(--lime);
  line-height: 1.2;
  text-align: center;
}

.btn-primary {
  background: var(--lime);
  color: var(--bg);
}
.btn-primary:hover {
  color: var(--bg);
  background: #a6ff4d;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--lime);
}
.btn-ghost:hover {
  background: rgba(140, 255, 26, 0.12);
  color: var(--lime);
  text-decoration: none;
}

.hero-photo img {
  width: 14.5rem;
  height: 14.5rem;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--lime);
  box-shadow: 0 0 0 8px rgba(140, 255, 26, 0.08);
}

main { padding-bottom: 3.5rem; }

section {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}

h2, .section-label {
  margin: 0 0 1.15rem;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
}

.about p {
  margin: 0 0 1rem;
  max-width: 42rem;
  font-size: 1.08rem;
}
.about p:last-child { margin-bottom: 0; }

.company {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  vertical-align: middle;
}
.company img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(201, 164, 92, 0.35);
}

.profiles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.profiles li { border-bottom: 1px solid var(--line); }

.profiles a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.95rem 0.1rem;
  text-decoration: none;
  font-weight: 600;
}
.profiles a:hover { color: var(--lime); }
.profiles .handle {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profiles a:hover .handle { color: var(--lime); }

footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

footer p { margin: 0; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
}

footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
footer nav a:hover { color: var(--lime); }

/* Blog index on the homepage and /blog/ */
.blog-grid {
  display: grid;
  gap: 18px;
  margin-top: 4px;
}

.blog-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(140, 255, 26, 0.18);
  border-radius: 14px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-card h2, .blog-card h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  font-weight: 700;
}

.blog-card h2 a, .blog-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--lime); }

.blog-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
  flex: 1;
}

.blog-meta, .blog-byline {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-byline a { color: var(--lime); }

.blog-card-link {
  color: var(--lime);
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
}
.blog-card-link:hover { text-decoration: underline; }

.blog-index-head {
  max-width: 42rem;
  padding-top: 2.6rem;
  padding-bottom: 0.5rem;
  border-top: none;
}

.blog-index-head h1 {
  margin: 0 0 0.7rem;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.blog-index-head p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.blog-index {
  padding-top: 1.5rem;
  border-top: none;
}

/* Blog post typography: override the small uppercase homepage h2 */
.blog-post {
  border-top: none;
  padding-top: 2rem;
}

.blog-post-wrap { max-width: 48rem; }

.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--muted);
}
.blog-breadcrumb a {
  color: var(--lime);
  text-decoration: none;
}
.blog-breadcrumb span:last-child { color: var(--muted); }

.blog-post-header { margin-bottom: 22px; }

.blog-post-header .eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
}

.blog-post-header h1 {
  margin: 0 0 10px;
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.blog-prose, .prose {
  max-width: 42rem;
}

.blog-prose p, .prose p {
  margin: 0 0 1em;
}

.blog-prose a, .prose a { color: var(--lime); }

.blog-prose h2, .prose.blog-prose h2 {
  margin: 1.6em 0 0.55em;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.blog-prose ul, .blog-prose ol, .prose ul, .prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
  color: var(--muted);
}

.blog-prose li, .prose li {
  margin: 0 0 0.4em;
  line-height: 1.55;
}

.blog-cta, .blog-author-bio, .related-guides {
  margin: 36px 0 8px;
  padding: 22px;
  border-radius: 14px;
  max-width: 42rem;
}

.blog-cta {
  border: 1px solid rgba(140, 255, 26, 0.22);
  background: rgba(140, 255, 26, 0.05);
}

.blog-author-bio, .related-guides {
  border: 1px solid rgba(140, 255, 26, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.blog-cta-kicker, .blog-author-bio-kicker {
  margin: 0 0 6px;
  color: var(--lime);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.blog-cta h2, .blog-author-bio h2, .related-guides h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  font-weight: 700;
}

.blog-cta p, .blog-author-bio p, .related-guides p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.blog-cta .btn-row, .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-author-bio-links {
  margin: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.95rem;
}
.blog-author-bio-links a {
  color: var(--lime);
  font-weight: 600;
  text-decoration: none;
}
.blog-author-bio-links a:hover { text-decoration: underline; }

.related-guides ul {
  margin: 0 0 0.85em;
  padding-left: 1.2em;
}
.related-guides ul:last-child { margin-bottom: 0; }
.related-guides li { margin: 0 0 0.4em; }
.related-guides a { color: var(--lime); }
.related-htb-label {
  margin: 0.8rem 0 0.4rem !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

@media (min-width: 800px) {
  .wrap { width: min(1080px, calc(100% - 4rem)); }

  header.hero {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 5.5rem 0 4.25rem;
    gap: 3rem;
  }

  header.hero::before {
    left: 22%;
    top: 18%;
    width: 36rem;
    height: 16rem;
    transform: none;
  }

  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .btn { flex: 0 1 auto; }

  .hero-photo img {
    width: 18rem;
    height: 18rem;
  }

  .about p { font-size: 1.125rem; }

  section { padding: 3rem 0; }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
