/* ==========================================================================
   Jeff Glaum — site styles
   Breakpoints: 576 / 768 / 992 / 1200px. The navbar collapses below 992px.
   ========================================================================== */

:root {
  --ink: #232323;
  --ink-hover: #000;
  --muted: #5b6057;
  --accent: #4a6b1f;       /* field green, taken from the background photo */
  --accent-dark: #34501a;
  --accent-soft: #eef2e6;
  --tint: #f5f7f1;
  --link: var(--accent);
  --rule: #e6e6e6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font: 400 1rem/1.6 var(--font);
  color: var(--ink);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.6s;
}

/* Visible focus ring for keyboard users only. */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

img {
  max-width: 100%;
}

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

/* ---------- Layout container ---------- */

.container {
  position: relative;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; padding-right: 16px; padding-left: 16px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

/* ==========================================================================
   Header / navbar
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  min-height: 64px;
  background-color: #fff;
}

.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  transition: all 0.3s;
}

/* Set by js/main.js once the page is scrolled. */
.navbar.is-short {
  min-height: 56px;
  border-bottom-color: transparent;
}

.navbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-right: 0;
  padding-left: 0;
}

/* Hamburger toggle (mobile) */

.nav-toggle {
  position: relative;
  align-self: center;
  margin: 14px 0 14px auto;   /* right-aligned; fixed row height so it doesn't jump when the menu opens */
  width: 31px;
  height: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  color: #000;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.hamburger span {
  position: absolute;
  right: 0;
  width: 30px;
  height: 2px;
  background-color: currentColor;
}

.hamburger span:nth-child(1) { top: 0;    transition: all 0.2s; }
.hamburger span:nth-child(2) { top: 8px;  transition: all 0.15s; }
.hamburger span:nth-child(3) { top: 8px;  transition: all 0.15s; }
.hamburger span:nth-child(4) { top: 16px; transition: all 0.2s; }

.navbar.is-open .hamburger span:nth-child(1),
.navbar.is-open .hamburger span:nth-child(4) {
  top: 8px;
  right: 50%;
  width: 0;
  opacity: 0;
  transition: all 0.2s;
}

.navbar.is-open .hamburger span:nth-child(2) {
  transform: rotate(45deg);
  transition: all 0.25s;
}

.navbar.is-open .hamburger span:nth-child(3) {
  transform: rotate(-45deg);
  transition: all 0.25s;
}

/* Menu */

.nav-menu {
  z-index: 1;
  display: none;
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
  justify-content: flex-end;
}

.nav-menu.is-shown {
  display: block;
  overflow: auto;
}

/* Height animation while opening/closing (driven by js/main.js). */
.nav-menu.is-animating {
  display: block;
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu.is-animating {
    transition: none;
  }
}

.nav-list {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.nav-list li {
  margin: auto;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.667em 1em;
  padding: 0 0.3em;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
  transition: color 0.2s ease-in-out;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--ink-hover);
}

/* Current page: a short green underline. */
.nav-link[aria-current="page"] {
  color: var(--ink-hover);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Desktop: inline menu, no hamburger */
@media (min-width: 992px) {
  .navbar {
    flex-flow: row nowrap;
    justify-content: flex-start;
  }

  .navbar-inner {
    flex-wrap: nowrap;
    padding-right: 16px;
    padding-left: 16px;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu,
  .nav-menu.is-shown,
  .nav-menu.is-animating {
    display: flex;
    justify-content: center;
    flex-basis: auto;
    height: auto;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
  }

  .nav-list li {
    margin: 0;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: 3rem;
  padding-bottom: 3rem;
  background: #fff url("../images/fields.jpg") 50% 50% / cover no-repeat;
}

/* When js/main.js takes over the background for the parallax layer. */
.hero.has-parallax {
  background-image: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  min-height: 100vh;
  background-color: #fff;
  opacity: 0.6;
  pointer-events: none;
}

.hero-content {
  text-align: center;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-right: -15px;
  margin-left: -15px;
}

.hero-col {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 992px) {
  .hero-row {
    margin-right: -16px;
    margin-left: -16px;
  }

  .hero-col {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 16px;
    padding-left: 16px;
  }
}

.hero h1 {
  margin-bottom: 1rem;
  font-weight: 400;
  font-size: 4.6rem;
  line-height: 1.1;
  text-align: center;
  word-break: break-word;
}

.parallax {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -100;
  overflow: hidden;
  pointer-events: none;
}

.parallax-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/fields.jpg") 50% 50% / cover no-repeat;
  backface-visibility: hidden;
  will-change: transform;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  padding-top: 2rem;
  padding-bottom: 2rem;
  background: #fff url("../images/fields.jpg") 50% 50% / cover no-repeat;
}

.footer-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background-color: var(--ink);
  opacity: 0.8;
  pointer-events: none;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-right: -15px;
  margin-left: -15px;
  word-break: break-word;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
}

.social-list li {
  height: 29px;
  margin: 0 0.5rem;
  padding-top: 0;
}

.social-list a {
  display: block;
  color: #fff;
  opacity: 0.5;
  transition: 0.2s linear;
}

.social-list a:hover {
  opacity: 1;
}

.social-list svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.copyright {
  width: 100%;
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #bbb;
}

@media (min-width: 768px) {
  .social-list {
    justify-content: flex-end;
  }
}

@media (min-width: 992px) {
  .footer-inner {
    flex-wrap: nowrap;
  }

  .footer-row {
    margin-right: -16px;
    margin-left: -16px;
  }
}

/* ==========================================================================
   Fluid type on small screens (scales between 320px and 768px wide)
   ========================================================================== */

@media (max-width: 992px) {
  .hero h1 {
    font-size: 3.68rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: calc(2.26rem + (4.6 - 2.26) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.1 * (2.26rem + (4.6 - 2.26) * ((100vw - 20rem) / (48 - 20))));
  }

  .nav-link {
    font-size: calc(1.035rem + (1.1 - 1.035) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.035rem + (1.1 - 1.035) * ((100vw - 20rem) / (48 - 20))));
  }


  .copyright {
    font-size: calc(1.07rem + (1.2 - 1.07) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.07rem + (1.2 - 1.07) * ((100vw - 20rem) / (48 - 20))));
  }
}

/* ==========================================================================
   Home hero additions (photo, tagline, buttons)
   ========================================================================== */

.hero-photo {
  display: block;
  width: 280px;
  height: 210px;
  margin: 0 auto 1.75rem;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 576px) {
  .hero-photo {
    width: 240px;
    height: 180px;
  }
}

.hero--home h1 {
  margin-bottom: 0.5rem;
}

.hero-tagline {
  margin-bottom: 1.25rem;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.4;
}

.hero-lede {
  max-width: 36rem;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid var(--ink);
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  color: #fff;
  background: var(--ink);
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Little bouncing arrow at the bottom of the home hero. */
.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -1.25rem;
  color: var(--ink);
  opacity: 0.6;
  animation: cue 2.4s ease-in-out infinite;
}

.scroll-cue:hover {
  color: var(--ink);
  opacity: 1;
}

.scroll-cue svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}

/* ==========================================================================
   Sub-page banner: the same parallax field photo, shorter
   ========================================================================== */

.hero--page {
  min-height: 46vh;
  padding-top: 6.5rem;
}

.hero--page .hero-overlay {
  min-height: 0;
}

.hero--page h1 {
  margin-bottom: 0.75rem;
  font-size: 3.6rem;
}

.eyebrow {
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.page-lede {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero--page h1 {
    font-size: 2.6rem;
  }

  .hero-tagline {
    font-size: 1.2rem;
  }

  .hero-lede,
  .page-lede {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Content sections
   ========================================================================== */

.section {
  padding: 4.5rem 0;
}

.section + .section {
  padding-top: 0;
}

.section--tint,
.section--tint + .section,
.section + .section--tint {
  padding-top: 4.5rem;
}

.section--tint {
  background: var(--tint);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 2rem;
}

.section-title {
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.2;
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
}

.link-more {
  font-weight: 500;
  white-space: nowrap;
}

.link-more::after {
  content: " \2192";
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.cards--2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* Stacked card grids */
.cards + .cards {
  margin-top: 1.5rem;
}

/* Four cards: 4 across on wide screens, 2 x 2 on medium, 1 on phones. */
.cards--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1199.98px) {
  .cards--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cards--4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .cards,
  .cards--2 {
    grid-template-columns: 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.card-img {
  margin: -1.5rem -1.5rem 1.25rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 12px 12px 0 0;
}

.card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  margin-bottom: 0.2rem;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.3;
}

.card .meta {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.card p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.card .link-more {
  margin-top: auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.1rem 0.65rem;
  font-size: 0.85rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
}

/* Long-form text */

.prose {
  max-width: 44rem;
  font-size: 1.15rem;
  line-height: 1.75;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.25;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose ul {
  margin: 0 0 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose a,
.card p a,
.timeline a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover,
.card p a:hover,
.timeline a:hover {
  color: var(--accent-dark);
}

/* Two-column layout: prose plus a sidebar */

.split {
  display: grid;
  gap: 3rem;
}

@media (min-width: 992px) {
  .split {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.aside-box {
  align-self: start;
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--tint);
  border-radius: 12px;
}

.aside-box h3 {
  margin-bottom: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
}

.aside-box dl {
  margin: 0;
}

.aside-box dt {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
}

.aside-box dd {
  margin: 0 0 0.85rem;
}

/* Timeline */

.timeline {
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--rule);
}

.timeline li {
  position: relative;
  padding: 0 0 2rem 1.75rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: -8px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline .when {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
}

.timeline h3 {
  margin: 0.15rem 0 0.35rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.timeline p {
  margin: 0;
  line-height: 1.6;
}

/* "Now" list */

.now-updated {
  font-size: 1rem;
  color: var(--muted);
}

/* Contact band */

.contact {
  text-align: center;
}

.contact .section-intro {
  margin: 0 auto 1.75rem;
}

/* ==========================================================================
   Typography: Inter for text and headings (heavy weight, tight tracking),
   JetBrains Mono for small labels. Matches the J2S Foundation site.
   ========================================================================== */


.nav-link {
  font-weight: 500;
  font-size: 1rem;
}

.hero h1 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 strong {
  font-weight: inherit;
}

.hero-tagline {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn {
  font-weight: 600;
  font-size: 0.98rem;
}

.section-title {
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.card h3,
.timeline h3,
.aside-box h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose h2 {
  font-weight: 800;
  letter-spacing: -0.025em;
}

.prose {
  font-size: 1.08rem;
}

.eyebrow,
.card .meta,
.timeline .when,
.tags li,
.aside-box dt,
.now-updated {
  font-family: var(--mono);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.card .meta,
.timeline .when {
  font-size: 0.85rem;
}

.tags li {
  font-size: 0.78rem;
}

.aside-box dt {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.copyright {
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .nav-link {
    font-size: 1rem;
    line-height: 1.5;
  }

  .copyright {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* Home hero name: lighter and smaller than the page-banner titles. */
.hero--home h1 {
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #3a4036;
}

/* ==========================================================================
   Photo galleries. Each thumbnail links to the full-size photo.
   ========================================================================== */

.subsection-title {
  margin: 3rem 0 0.35rem;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.subsection-intro {
  max-width: 40rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 576px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.gallery figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
}

.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery a:hover img {
  transform: scale(1.03);
}

.gallery figcaption {
  padding: 0.75rem 1rem 0.9rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

/* A featured photo gets its own full-width row, shown uncropped. */
.gallery .is-featured {
  grid-column: 1 / -1;
}

.gallery .is-featured a {
  aspect-ratio: 1250 / 735;
}

.gallery + .cards {
  margin-top: 3rem;
}

/* Photo inside long-form text */
.prose figure {
  margin: 0 0 1.5rem;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .gallery img { transition: none; }
}

/* In-page links (#anchors) stop below the fixed navbar. */
[id] {
  scroll-margin-top: 5rem;
}

/* Five-photo galleries: 5 across on wide screens. */
@media (min-width: 1200px) {
  .gallery--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .gallery--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Home page action links: quiet underlined text with an arrow (replaces the pill buttons). */
.hero-actions {
  gap: 0.75rem 2.25rem;
}

.hero-actions .btn,
.hero-actions .btn-primary {
  padding: 0 0 3px;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 var(--accent);
  transition: color 0.2s, box-shadow 0.2s;
}

.hero-actions .btn::after {
  content: " \2192";
  color: var(--accent);
}

.hero-actions .btn:hover {
  color: var(--accent-dark);
  background: none;
  box-shadow: inset 0 -3px 0 var(--accent-dark);
}

/* ==========================================================================
   Home intro: left-aligned text with the photo beside it (stacked on phones)
   ========================================================================== */

.hero--home .hero-content {
  text-align: left;
}

.home-intro {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.home-intro .hero-photo {
  order: -1;            /* photo first when stacked */
  margin: 0;
}

.hero--home h1 {
  text-align: left;
}

.hero--home .hero-lede {
  max-width: 34rem;
  margin: 0 0 2rem;
}

.hero--home .hero-actions {
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .home-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4rem;
  }

  .home-intro .hero-photo {
    order: 0;           /* photo on the right */
    width: 360px;
    height: 270px;
  }
}


/* Desktop navbar: links on the right. */
@media (min-width: 992px) {
  .nav-menu,
  .nav-menu.is-shown,
  .nav-menu.is-animating {
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Navbar colour: dark gray, to pair with the dark footer.
   To try another shade, change --nav-bg (and --nav-ink for light shades).
   ========================================================================== */

:root {
  --nav-bg: #3a3d38;
  --nav-ink: #e8e8e4;
  --nav-ink-active: #fff;
  --nav-accent: #9bbd5c;
}

.site-header,
.navbar {
  background: var(--nav-bg);
}

.navbar,
.navbar.is-short {
  border-bottom-color: transparent;
}

.nav-link,
.nav-toggle {
  color: var(--nav-ink);
}

.nav-link:hover,
.nav-link:focus,
.nav-link[aria-current="page"] {
  color: var(--nav-ink-active);
}

.nav-link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--nav-accent);
}

.navbar :focus-visible {
  outline-color: var(--nav-accent);
}

/* ==========================================================================
   Page background: very light gray (cards stay white)
   ========================================================================== */

:root {
  --page-bg: #f2f3f0;
  --tint: #e8eae4;
}

body {
  background-color: var(--page-bg);
}

/* ==========================================================================
   Resume PDF download icon (shown in the navbar on the resume page)
   ========================================================================== */

.nav-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  order: 1;
  margin-left: auto;          /* phones: sits left of the hamburger */
  padding: 0.35rem 0.7rem;
  font: 600 0.9rem/1 var(--font);
  letter-spacing: 0.02em;
  color: var(--nav-ink);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.nav-download:hover {
  color: var(--nav-ink-active);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

.nav-download svg {
  width: 18px;
  height: 18px;
}

.nav-download ~ .nav-toggle,
.navbar-inner:has(.nav-download) .nav-toggle {
  order: 2;
  margin-left: 1rem;
}

.navbar-inner:has(.nav-download) .nav-menu {
  order: 3;
}

@media (min-width: 992px) {
  .navbar-inner:has(.nav-download) .nav-menu {
    order: 1;
    flex-grow: 1;
  }

  .nav-download {
    order: 2;
    margin-left: 1rem;
  }
}

/* The navbar never prints (keeps the resume PDF clean). */
@media print {
  .site-header {
    display: none !important;
  }
}

/* The resume (.page) keeps the browser's default text rendering, as designed. */
.page {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

/* Links inside the resume keep their original (browser default) look on screen. */
@media screen {
  .page a {
    color: revert;
    text-decoration: revert;
    transition: none;
  }
}

/* Resume decorations (timeline dots, bullets) keep their original box sizing. */
.page *::before,
.page *::after {
  box-sizing: content-box;
}

/* ...and keep their underline in print too (the resume sets print link colour itself). */
.page a {
  text-decoration: revert;
}

/* Card image area holding two pictures side by side. */
.card-img--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
