/* LAYOUT */
:root {
  --bg-colour: rgb(32, 34, 30);
  --mid-bg-colour: rgb(68, 30, 44);
  --hot-bg-colour: rgb(104, 55, 3);
  --edge-bg-colour: rgb(153, 86, 0);

  --a-colour: rgb(186, 179, 141);
  --para-colour: var(--a-colour);

  --shadow-colour: rgba(30,8,8,0.54);
  --second-shadow-colour: rgba(30, 8, 8, 0.36);

  --border-colour: var(--a-colour);
}

body {
  font-size: 125%;
  font-family: monospace;
  color: var(--para-colour);
  /*text-shadow: 0 6px 18px var(--shadow-colour), 0 0 8px var(--second-shadow-colour);*/
  display: flex;
  flex-direction: column;
  min-height: 95vh; /* ensures full viewport height */
  background-color: var(--bg-colour);
  line-height: 1.5;
  max-width: 58%;
  padding: 1em;
  margin: 0 auto;
}
 
body p {
  color: var(--para-colour);
}

body a {
  color: var(--a-colour); /* visited color */
  font-weight: 600;
  text-shadow: 0 0px 2px var(--shadow-colour), 0 0 1px var(--second-shadow-colour);
}

h1 {
  padding: 0;
  margin: 0;
}

footer p {
  font-size: 85%;
}

pre {
  text-shadow: 0 3px 5px var(--shadow-colour), 0 0 8px var(--second-shadow-colour);
}

/* So that the footer is always at the bottom */
main {
      flex: 1 0 auto; /* or simply flex: 1; */
      padding: 1rem;
    }

/* left and right gradient bars */
body::before,
body::after {
  content: "";
  position: fixed;        /* fixed keeps them on the viewport edges */
  top: 0;
  bottom: 0;
  width: 20%;            /* thickness of the side border */
  pointer-events: none;   /* don't block clicks */
  z-index: -1;
}

/* left bar */
body::before {
  left: 0;
  background-image:
      radial-gradient(circle at 15% 20%, rgba(0,0,0,0.24) 0.8px, transparent 1.4px),
      radial-gradient(circle at 55% 40%, rgba(0,0,0,0.22) 0.9px, transparent 1.6px),
      radial-gradient(circle at 85% 75%, rgba(0,0,0,0.20) 1.1px, transparent 1.9px),
      radial-gradient(circle at 40% 80%, rgba(255,255,255,0.16) 0.9px, transparent 1.6px),
      linear-gradient(-90deg,
        var(--bg-colour) 20%, 
        var(--mid-bg-colour) 55%,
        var(--hot-bg-colour) 95%,
        var(--edge-bg-colour) 100%);

    background-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px, auto;
    background-repeat: repeat, repeat, repeat, repeat, no-repeat;
}

/* right bar */
body::after {
  right: 0;
  /* noise */
  background-image:
      radial-gradient(circle at 15% 20%, rgba(0,0,0,0.24) 0.8px, transparent 1.4px),
      radial-gradient(circle at 55% 40%, rgba(0,0,0,0.22) 0.9px, transparent 1.6px),
      radial-gradient(circle at 85% 75%, rgba(0,0,0,0.20) 1.1px, transparent 1.9px),
      radial-gradient(circle at 40% 80%, rgba(255,255,255,0.16) 0.9px, transparent 1.6px),
      linear-gradient(90deg, 
        var(--bg-colour) 20%, 
        var(--mid-bg-colour) 55%,
        var(--hot-bg-colour) 95%,
        var(--edge-bg-colour) 100%);

    background-size: 14px 14px, 14px 14px, 14px 14px, 14px 14px, auto;
    background-repeat: repeat, repeat, repeat, repeat, no-repeat;
}

.homemenu {
  list-style-type: none; /* Remove default bullet points */
  display: flex;        /* Use flexbox to arrange items horizontally */
  align-items: center;
  justify-content: center;
}

.homemenu li {
  padding: 1.0rem;
}

/* FOR THE COOL ASCII ON THE header and footer */
.ascii {
  line-height: 0.9;
  font-size: 20px;
  text-align: center;
  font-weight: 999;
  color: var(--para-colour);
}

.section-wrapper {
  padding: 0;
  margin: 0 auto;        /* center the wrapper horizontally */
  padding: 1rem;         /* optional breathing room */
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
  margin: 0 auto;
}

/* This is used for the post/page summary in the section*/
.summary {
  text-align: center;
}

.content {
  margin-bottom: 2rem;
}

figure {
  display: block;
  margin: 0 auto;  
  border: 3px solid var(--border-colour);
  padding: 0.5rem;
  box-shadow: 0 6px 18px var(--shadow-colour), 0 0 8px var(--second-shadow-colour);
  border-radius: 6px;
}
 
figure img {
  display: block;
  width: 100%;               /* fill the container */
  height: auto;              /* preserve aspect ratio */
  max-width: 100%;           /* don't exceed intrinsic size */
  object-fit: contain;       /* useful for replaced elements in constrained boxes */
}

.horizontal-list {
    list-style-type: '+'; 
    padding: 0;
    margin: 0;            
    display: flex;        /* Use flexbox to arrange items horizontally */
}

.horizontal-list li {
    margin-right: 20px;   /* Add space between items */ }

/* NAVIGATION */

.site-nav a {
  display: block;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  transition: background-color 0.05s ease-in-out;
}

.site-nav a:hover {
  background-color: var(--para-colour);
  color: var(--bg-colour);
}

a.title {
  font-weight: bold;
  font-size: 175%;
  color: var(--a-colour); /* visited color */
  text-decoration: none;    /* remove underline */
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 48rem) {
  .site-nav,
  .main-menu {
    flex-direction: column;
  }

  .site-nav a {
    padding: 0.5rem;
    padding-left: 0;
  }

  /* Avoid formatting ascii art at footer */
  footer .ascii pre {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

}

/* LISTS */

.post-snippet {
  margin-bottom: 1rem;
}

.post-snippet h3 {
  margin-bottom: 0.25rem;
}
