
/* ----------------------------------------------- General stuff ----------------------------------------------- */
:root{
  /* Palette (dark, not black) */
  --bg: rgb(26, 14, 38);            /* darker purple */
  --panel: rgba(255,255,255,0.05);  /* subtle lift */
  --border: rgba(255,255,255,0.10);

  /* Text (not blinding) */
  --text: rgb(205, 205, 205);
  --muted: rgb(165, 165, 165);

  /* Accents (your palette) */
  --link: rgb(139, 212, 80);        /* NEON_GREEN */
  --link-hover: rgb(150, 95, 212);  /* BRIGHT_PURPLE */

  /* Layout / polish */
  --radius: 6px;
  --radius-sm: 4px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Prevent width:100% + padding from overflowing */
*, *::before, *::after{
  box-sizing: border-box;
}
/* Put the gradient on html so it’s consistent and never tiles weirdly */
html{
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(150,95,212,0.20), transparent 55%),
    radial-gradient(900px 600px at 95% 0%, rgba(139,212,80,0.12), transparent 55%),
    radial-gradient(800px 500px at 50% 110%, rgba(255,255,255,0.06), transparent 60%),
    var(--bg);

  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed;
}

html, body{ height: 100%; }

body{
  margin: 0;

  /* sticky-footer foundation */
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  background: transparent; /* IMPORTANT: don’t re-define the background here */
}

a{ color: var(--link); }

a:hover, a:focus{ color: var(--link-hover); }

/* Make keyboard navigation obvious */
:focus-visible{
  outline: 2px solid rgba(150,95,212,0.65);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ----------------------------------------------- MAIN LAYOUT ----------------------------------------------- */
main{
  flex: 1;                 /* pushes footer to bottom on short pages */
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;

  padding: 1.1rem 1.1rem;
  padding-top: 1.4rem;
  padding-bottom: 1.1rem;
}

main > h1{
  text-align: center;
  margin-top: 0;
}

/* ----------------------------------------------- HOME GRID ----------------------------------------------- */
.home-grid{
  display: grid;
  grid-template-columns: 512px 1fr; /* desktop: avatar column + content */
  gap: 1.2rem;
  align-items: start;
  margin-top: 1rem;
}

/* Ensure the left column can shrink on small screens */
.home-left{ min-width: 0; }
.home-right{ min-width: 0; }

/* Your <picture> has class="avatar-wrap"; keep it from adding odd spacing */
.avatar-wrap{
  display: block;
  margin: 1rem 0;
}

/* Size the actual image (works for homepage <img class="avatar"> and shortcode output) */
img.avatar,
.avatar img{
  width: 512px;       /* desktop requested */
  height: auto;
  max-width: 100%;
  display: block;

  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
}

/* Phone */
@media (max-width: 900px){
  /* stack */
  .home-grid{
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  /* tighten page padding a bit */
  main{
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  /* smaller avatar on phones */
  img.avatar,
  .avatar img{
    width: 256px;
  }

  /* center avatar + nav on phones */
  .home-left{
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home-nav{
    width: 100%;
    max-width: 22rem;
  }
}

/* ----------------------------------------------- CODE ----------------------------------------------- */
code, pre{
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.95em;
}
code{ padding: 0.12rem 0.35rem; }

pre{
  padding: 1rem 1.05rem;
  overflow: auto;
}

pre code{
  padding: 0;
  border: 0;
  background: transparent;
}

/* ----------------------------------------------- IMAGES ----------------------------------------------- */
img{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

main img{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
}

/* ----------------------------------------------- HOME NAV CARD ----------------------------------------------- */
.home-nav{
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
}

.home-nav a{
  display: block;          /* one per line */
  padding: 0.45rem 0.6rem; /* clickable area */
  border-radius: calc(var(--radius) * 0.7);
  text-decoration: none;
  color: inherit;
}

.home-nav a:hover{
  background: rgba(255,255,255,0.06);
}

/* IMPORTANT: remove these old rules that were fighting everything
   - .home-left { width: 512px; }
   - .avatar { width: 512px; }
   They are intentionally gone in this version.
*/

/* ----------------------------------------------- POSTS LIST ----------------------------------------------- */
.post-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.post-item + .post-item{
  border-top: 1px solid var(--text);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.post-title{
  font-weight: 600;
  color: var(--link);
}

.post-meta{
  color: var(--text);
}

.post-link{
  display: block;
  color: inherit;
  padding: 0.4rem 1.05rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 0.05rem solid transparent;
}

.post-excerpt{
  color: inherit;
  opacity: 0.85;
}

/* ----------------------------------------------- FOOTER ----------------------------------------------- */
footer{ width: 100%; }

.post-pager,
.page-links{
  width: 100%;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: grid;
  gap: 0.5rem;
}

/* Site links */
.page-links{
  grid-template-columns: repeat(6, 1fr);
}

.page-links .pager-link{
  text-align: center;
}

/* Blog pager: 3 slots (prev | home | next) */
.post-pager{
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.post-pager .pager-link:first-child{ justify-self: start; }
.post-pager .pager-home{ justify-self: center; }
.post-pager .pager-link:last-child{ justify-self: end; }

.pager-link{
  color: inherit;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
}

@media (max-width: 900px){
  .page-links{
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px){
  .page-links{
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Optional hover if you want it back */
/*
.pager-link:hover{
  background: rgba(255,255,255,0.06);
}
*/
