:root{
  --font-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-reading: "Source Serif Pro", Georgia, "Times New Roman", serif;
  --maxw: 1100px;

  /* brand accent — pick one */
  /* --accent: #3a5a40;   */   /* earthy green */
  --accent: #5b4636;           /* earthy brown (default) */

  /* EARTHY BACKGROUND PALETTES
     Option A: Green Mist
       start: #eef3ef  | mid: #dfe8e2 | end: #cddfd3
     Option B: Warm Clay (default below)
       start: #f3efe9  | mid: #e9e3db | end: #e0d6cc
  */
  /* Green Mist */
  /* --bg-start: #eef3ef; --bg-mid: #dfe8e2; --bg-end: #cddfd3; */

  /* Warm Clay (default) */
  --bg-start: #f3efe9;
  --bg-mid:   #e9e3db;
  --bg-end:   #e0d6cc;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:var(--font-ui);line-height:1.6}
img{max-width:100%;height:auto;display:block}

/* Links: subtle by default, accent on hover */
a{
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0,0,0,.25);
  transition: color .15s ease, text-decoration-color .15s ease, background .15s ease;
}

a:hover,
a:focus-visible{
  color: var(--accent);
  text-decoration-color: var(--accent);
}

a.button {
  display: inline-block;
  padding: 0.6em 1.2em;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}

a.button:hover {
  background: #4a3a2c; /* darker shade of your accent */
}



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

.site-header{position:sticky;top:0;backdrop-filter:saturate(120%) blur(6px)}
.site-header .brand{font-weight:800;margin-right:auto}
.site-header .wrap{display:flex;align-items:center;gap:16px}

/* --- Nav styling --- */
.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;     /* remove if too strong */
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a:focus {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}


main{min-height:60vh}

/* Long-form reading */
.prose{
  font-family: var(--font-reading);
  max-width: 72ch;          /* ideal line length */
  margin-inline: auto;      /* center when needed */
}
.prose p    { font-size: 1.03rem; }
/* Let section headings pick up your brand color */
.prose h2 {
  color: var(--accent);
  margin-bottom: 0.5em;   /* add breathing room under H2 */
}


/* Give the first big heading more breathing room (hero feel) */
.prose h1:first-child{
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose h3   { font-family: var(--font-ui); }  /* keep UI font for headings */

/* Make emphasis feel intentional */
.prose em, .prose i{
  font-style: italic;
  color: var(--accent);
}


.meta{opacity:.7}

.grid{display:grid;gap:16px}
.grid.cards{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.card{border:1px solid rgba(0,0,0,.08);border-radius:12px;overflow:hidden;background:#fff}
.card__media{height:180px;background:#f3f3f3}
.card__body{padding:14px}
.card__title{margin:0 0 6px 0;font-size:1.1rem}
.card__meta{opacity:.75;font-size:.9rem;margin:0 0 8px 0}

.breadcrumbs{opacity:.8;margin-bottom:12px}
.post-title{margin-bottom:6px}
.post-meta{opacity:.75;margin:0 0 16px 0}
.post-body{font-family:var(--font-reading)}

.site-footer{border-top:1px solid rgba(0,0,0,.08);margin-top:32px}

/* === Option B: Subtle colorful background + readable card layer === */

/* Earthy, fuller background (soft radial + subtle depth) */
body{
  font-family: var(--font-ui);
  line-height: 1.6;

  background:
    radial-gradient(1200px 600px at 20% 5%,  var(--bg-start), transparent 60%),
    radial-gradient(900px  500px at 80% 10%, var(--bg-mid),   transparent 65%),
    radial-gradient(1200px 700px at 50% 90%, var(--bg-end),   transparent 55%),
    #faf8f5; /* canvas base */
}



/* Content wrapper as a card */
.wrap {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(110%) blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Code blocks stand out against the light background */
pre[class*="language-"] {
  background: #171a1f;         /* dark background */
  color: #e6edf3;              /* light text */
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  box-shadow: 0 6px 20px rgba(23, 26, 31, 0.25);
}
code[class*="language-"] {
  font-family: "Fira Code", monospace;
  font-size: 0.95em;
}

/* Sticky header that stays visible & clickable over content */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;                         /* keeps header above scrolling cards */
  backdrop-filter: saturate(120%) blur(6px);
  background: rgba(255,255,255,0.92);    /* solid-enough so nav text never “disappears” */
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
/* "Also Available in Markdown" link formatting. -- May add as a button or color the background. */
.markdown-link {
  font-size: 0.9rem;
  color: var(--link-color);
  text-decoration: underline;
}

/* Headings: bold, crisp, responsive */
h1, h2, h3{
  font-family: var(--font-ui);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0.8em 0 0.4em;
  color: inherit;
}
h1{ font-weight: 800; font-size: clamp(2rem, 2vw + 1.2rem, 2.75rem); }
h2{ font-weight: 700; font-size: clamp(1.5rem, 1.1vw + 1rem, 1.8rem);   }
h3{ font-weight: 700; font-size: clamp(1.25rem, 0.8vw + 0.9rem, 1.5rem); }

/* Paragraph rhythm */
p{
  margin: 0 0 1.1em;
  line-height: 1.7;
}

#home-latest img {
  width: auto !important;
  max-width: 480px !important;   /* or 100% with banner option */
  height: auto;
  display: block;
  margin: 0 auto 1em; /* centers and adds spacing below */
  border-radius: 6px;
}


/* Featured post image on homepage */
.latest-media {
  max-width: 640px;
  margin: 0 auto 1em;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;  /* new */
}
.latest-media img { width:100%; height:100%; object-fit:cover; }


.cta { text-align:center; margin:3rem 0; }
.cta h2 { margin-bottom:.5rem; }
.cta p { margin:0 auto 1rem; max-width:40rem; }

.cta-actions { display:flex; gap:.75rem; justify-content:center; flex-wrap:wrap; }

.btn {
  display:inline-block; padding:.7rem 1rem; border-radius:10px;
  text-decoration:none; font-weight:600; border:1px solid transparent;
}

.btn-primary { background: var(--accent); color:#fff; }
.btn-primary:focus, .btn-primary:hover { filter:brightness(.92); }

.btn-secondary {
  background: transparent; color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:focus, .btn-secondary:hover { background: rgba(91,70,54,.08); }

.skip-link {
  position: absolute;
  top: -40px; /* hides it offscreen */
  left: 0;
  background: var(--accent, #5b4636);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 100;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 10px; /* slides into view when tabbed */
}


.projects-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap:1rem; }
.card { border:1px solid var(--muted); border-radius:12px; padding:1rem; background:#fff; }
.card h3 a { text-decoration:none; }
.card img { width:100%; height:auto; border-radius:8px; }
.chip { display:inline-block; padding:.25rem .5rem; border:1px solid var(--accent); border-radius:999px; text-decoration:none; margin-right:.25rem; }
.milestones li { margin:.25rem 0; }


.quote { border-left:4px solid var(--accent); padding:.75rem 1rem; font-style:italic; margin:1rem 0; }

/* Smooth scrolling for same-page anchors */
html { scroll-behavior: smooth; }

/* Focus-forward hero card */
.hero-intro {
  position: relative;                    /* anchor for absolute button */
  background: rgba(245, 240, 230, 0.6);
  backdrop-filter: blur(2px);
  padding: clamp(1.25rem, 2.5vw + 1rem, 2.5rem);
  padding-bottom: 3.5rem;                /* room for the button */
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
  width: min(92vw, 700px);
  margin-inline: auto;
  text-align: center;
  overflow: visible;                      /* ensure cue is visible */
}

.hero-intro p { margin-bottom: 1.1rem; }
.hero-intro em { color: #5b4f3a; }        /* warm earthy accent */

/* The anchored scroll cue */
/* .scroll-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  text-decoration: none;
  color: #3a3225;
  opacity: 0.85;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 1;
}

.scroll-link:hover { opacity: 1; transform: translate(-50%, -1px); } */

/* Gentle arrow nudge (respects reduced motion) */
/* .scroll-link span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0);} 50% { transform: translateY(3px);} }
@media (prefers-reduced-motion: reduce) { .scroll-link span { animation: none; } } */

/* Optional: subtle divider feel below hero */
.hero-intro::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1.25rem;
  width: 60%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(90,80,60,0.25), transparent);
}

/* Give the next section breathing room */
#featured-post { margin-top: 2.25rem; }

#about h2 {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

/* Shared section container (applies to About, Projects, Blog, Follow) */
.section {
  max-width: 70ch;          /* comfy reading width */
  margin: 2.25rem auto 0;   /* centered block, left-aligned text inside */
  padding-inline: 1rem;     /* side padding on small screens */
  /* text-align:center; */  /* Not sure if I like the text aligned center */
}

.section h2 {
  text-align: center;
  margin: 0 0 1rem 0;
}

/* ===== Responsive Nav (Hamburger) ===== */
.site-header .wrap { position: relative; }

/* Hide the toggle on desktop */
.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: .4rem;
  margin-left: auto;         /* pushes it to the right if needed */
  border-radius: 8px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent); }

/* Mobile layout */
@media (max-width: 768px) {
  /* show the toggle */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  /* turn off desktop nav layout */
  .nav {
    display: none;                 /* hidden until opened */
    position: absolute;
    top: calc(100% + 8px);         /* below header */
    right: 12px;
    left: 12px;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    z-index: 1100;
  }
  .nav.open { display: flex; }

  .nav a {
    padding: .7rem .8rem;
    border-radius: 8px;
  }
  .nav a[aria-current="page"] {
    border-bottom: 0;                 /* avoid the small underline on mobile */
    background: rgba(0,0,0,.05);
    color: var(--accent);
  }

  /* Optional: make header items not wrap weirdly */
  .site-header .brand { margin-right: 0; }
}
