/* JetBrains Mono - Regular */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* JetBrains Mono - SemiBold */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

/* Courier New (your file named cour.ttf) */
@font-face {
  font-family: 'Courier New';
  src: url('/assets/fonts/cour.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Sans-Serif Collection (your font file) */
@font-face {
  font-family: 'SansSerif Collection';
  src: url('/assets/fonts/SansSerifCollection.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Basic Reset and Fonts */
body {
  margin: 0;
  font-family: 'SansSerif Collection', sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
  color: #222;
}

/* Header: fixed at top, with site title and author info */
.header {
  position: fixed;
  top: 0;
  width: calc(100% - 14%);
  margin-left: 14%;
  background-color: #222;
  color: #eee;
  padding: 0.5em 1em;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-title h1 {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.8em;
  margin: 0;
  color: #d4d29b;
  text-align: center;
}

.site-title h2 {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.2em;
  margin: 0;
  font-weight: normal;
  text-align: center;
}

/* Top fixed navigation bar (search) */
.top-nav {
  position: fixed;
  top: 3.2em; /* below header */
  width: 100%;
  background: #333;
  padding: 0.3em 1em;
  z-index: 999;
  display: flex;
  justify-content: flex-end;
}

.search-form input {
  padding: 0.4em;
  font-family: 'Open Sans', sans-serif;
  border: none;
  border-radius: 4px;
}

html, body {
  height: 100%;
  margin: 0;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  display: flex;
  flex: 1; /* allows main content to fill available space */
  flex-direction: column;
}

#main-post {
  flex: 1; /* fills available space, pushes footer down */
}

/* Site Logo Badge */
.logo-badge {
  position: fixed;
  top: 0.1em; /* adjust to align with center of side-nav */
  left: 4%;   /* centers logo over 14% sidebar (approx half) */
  z-index: 1001;
  width: 100px;
  height: 100px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.logo-badge img {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.logo-badge:hover img {
  transform: scale(1.1);
}

.retro-button {
  display: block;
  margin: 0 auto 20px auto;
  padding: 0.6em 1.1em;       /* small padding for a compact button */
  font-size: 1.1em;            /* small font size */
  border: 2px solid #ed9d9d;      /* border color, adjust as needed */
  border-radius: 8px;           /* rounded edges */
  background-color: #222;       /* dark background, retro feel */
  color: #0f0;                  /* bright green text, classic Linux look */
  text-decoration: none;        /* remove underline */
  font-family: monospace, 'JetBrains Mono';       /* monospace font for retro vibe */
  box-shadow: inset 1px 1px 3px rgba(255,255,255,0.2); /* subtle inset shadow */
  transition: background-color 0.2s, color 0.2s;
}

.retro-button:hover {
  background-color: #333;       /* lighter background on hover */
  color: #fff;                  /* change text color on hover */
}

/* Side navigation pane */
.side-nav {
  position: fixed;
  top: 0; /* below header and search bar */
  left: 0;
  width: 14%; /* ~1/7th of screen */
  height: 100%;
  background-color: #111;
  color: #ddd;
  padding: 1em;
  overflow-y: auto;
  box-sizing: border-box;
  border-right: 1px solid #444;
}

.side-nav h3 {
  margin-top: 0;
  font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
  font-size: 1.1em;
}

.side-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
}

.side-nav li {
  margin-bottom: 0.5em;
}
.side-nav a {
  color: #eee;
  text-decoration: none;
}
.side-nav a:hover {
  text-decoration: underline;
}

.sidebar-info h4 {
  margin-top: 1em;
  font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
  font-size: 1em;
}
.sidebar-info p {
  font-size: 0.9em;
  margin: 0.5em 0;
}

.profile-section {
  text-align: center;
  margin-bottom: 1em;
}

.profile-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: calc(1em + 100px) auto 0.5em auto;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.author-sidebar {
  font-size: 0.95em;
  color: #ccc;
}

/* Main content area / container */
.content {
  margin-left: 14%; /* leave space for side nav */
  margin-top: 3em; /* below fixed header and nav */
  padding: 1em;
}

/* Main content area */
.post-content {
  margin: 0 auto; /* center the content */
  margin-top: 4em; /* below fixed header and nav */
  max-width: 800px; /* limit width for readability */
  font-family: 'SansSerif Collection', sans-serif;
  text-align: justify;
  padding: 1em;
}

/* Post styles */
/* Post Title */
h3 {
  font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
  font-size: 1.6em;
  margin-top: 0;
}
/* Post Subtitle */
h4 {
  font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
  font-weight: 600;
  font-size: 1.5em;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #19115a;
  text-indent: 1cm;
  text-align: left;
}
/* In-Post Body Headings */
h5 {
  font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
  font-weight: 600;
  font-size: 1.2em;
  font-style: italic;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #19115a;
  text-indent: 1cm;
  text-align: left;
}
/* For nav-bar */
h6 {
  font-family: 'JetBrains Mono', monospace, 'Courier New', monospace;
  font-weight: 600;
  font-size: 1.2em;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #d4d29b;
}
.post-meta {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 1em;
}

/* Description styling */
.description {
  margin: 1em 0;
  font-style: italic;
}

/* Description styling */
.pre-notes {
  margin: 1em 0;
}

/* Main body text */
.post-body p {
  margin-top: 0.8em;
  margin-bottom: 0;
  margin-left: 10px;
  margin-right: 10px;
}

/* Table of Contents styling */
.contents {
  background: #f8f8f8;
  border: 1px solid #d4d29b;
  border-radius: 6px;
  padding: 1em 1.5em;
  margin: 1.5em 0 1.5em 0;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1em;
  color: #19115a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.contents strong {
  display: block;
  margin-bottom: 0.5em;
  font-size: 1.1em;
  color: #222;
  letter-spacing: 0.5px;
}

.contents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.contents li {
  margin: 0.2em 0;
  padding-left: 0.5em;
}

.contents li a {
  color: #19115a;
  text-decoration: none;
  border-bottom: 1px dotted #d4d29b;
  transition: color 0.2s, border-bottom 0.2s;
}

.contents li a:hover {
  color: #472525;
  border-bottom: 1px solid #472525;
}

/* Indent h5 entries */
.contents li {
  margin-left: 0;
}
.contents li.indent {
  margin-left: 1.5em;
}

/* Steps styling */
.steps {
  font-style: italic;
  font-weight: bold;
}

.bullet-points {
  text-indent: 10px; /* Indents the text after your marker */
  padding-left: 0.5em; /* Remove default left padding if any */
}

/* Code snippet block styling */
.code-block {
  background: #222;
  color: #eee;
  padding: 2em 2em;
  margin: 0;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  text-align: left;
  overflow-x: auto;
  white-space: pre-line; /* preserve line breaks */
  line-height: 1.3;
  width: 100%;
  box-sizing: border-box;
  text-indent: -2em;
  position: relative;
  padding-left: 3em;
}

/* Container for code and button */
.code-container {
  position: relative;
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 10px 50px; /* same as your code block margin if you want consistent spacing */
  box-sizing: border-box;
}

/* Copy button (requires JS) */
.copy-button {
  position: absolute; /* position relative to container */
  bottom: 1em;       /* adjust as needed for spacing from bottom */
  right: 1em;        /* adjust as needed for spacing from right */
  background-color: #472525; /* or your theme color */
  color: #d7c1c1;
  border: 2px solid #8a6666;
  padding: 5px 5px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.copy-button:hover {
  opacity: 1;
}

/* Quote block styling */
.quote {
  margin: 1em 2em;
  padding: 0.5em 1em;
  border-left: 4px solid #555;
  background-color: #f0f0f0;
  font-style: italic;
  line-height: 1.4;
}
.quote p {
  margin: 0;
  line-height: 1.4;
}

/* Style only tables with class 'word-table' */
table.word-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5em;
  background: #232323;
  color: #e6e6e6;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1em;
  border: 2px solid #d4d29b;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-radius: 8px;
  overflow: hidden;
}

table.word-table th,
table.word-table td {
  border: none;
  padding: 0.7em 1.2em 0.7em 1.2em; /* inset text left/right */
  text-align: left;
  background: none;
}

table.word-table th {
  background-color: #2d2d2d;
  color: #d4d29b;
  font-weight: bold;
  border-bottom: 2px solid #d4d29b;
  letter-spacing: 0.5px;
}

table.word-table tr {
  border-bottom: 1px solid #444;
}

table.word-table tr:nth-child(even) td {
  background-color: #282828;
}

table.word-table tr:last-child td {
  border-bottom: none;
}

table.word-table td {
  border-right: 1px solid #444;
}

table.word-table td:last-child {
  border-right: none;
}

/* IMAGES STYLING */
/* Container for image and caption */
.image-wrapper {
  display: inline-block; /* so borders wrap tightly around the image */
  padding: 10px; /* optional: space between image and border for a more "polaroid" look */
  background-color: transparent; /* or your background color if needed */
  border-top: 3px solid #f4ebda; /* creamy white thin border on top */
  border-left: 3px solid #f4ebda; /* left border */
  border-right: 3px solid #f4ebda; /* right border */
  border-bottom: 9px solid #f4ebda; /* thicker bottom border for "polaroid" effect */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* optional: give it a slight shadow for depth */
}

.image-container {
  width: 100%; /* full width of post content */
  margin: 0 auto; /* center if needed */
  text-align: center; /* to ensure caption is centered under image */
  margin-bottom: 20px; /* space below each image block */
}

.full-image {
  display: block; /* Make image a block element to take full width */
  width: 100%; /* Make sure it doesn't overflow container */
  height: auto;    /* Keep proportions */
  margin: 0 auto;  /* Center if needed */
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(66, 46, 69, 0.1);
}

/* Top image style (fits width, above content) */
.top-image img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1em;
}

/* Left aligned image */
.left-image {
  float: left;
  width: 150px;
  margin-right: 1em;
}
.left-image img {
  max-width: 100%;
  height: auto;
}

/* Right aligned image */
.right-image {
  float: right;
  width: 150px;
  margin-left: 1em;
}
.right-image img {
  max-width: 100%;
  height: auto;
}

.caption {
  display: block;
  width: 100%; /* full width of the container (matches image width) */
  background: #222; /* your existing style */
  color: #eee;
  padding: 1em 1.5em; /* your style */
  margin-top: 10px; /* space from image */
  border-radius: 4px; /* your style */
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.4;
  box-sizing: border-box;
  /* optional: keep text centered, or left aligned */
  text-align: center;
}

/* Clear floats */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Footnotes / references styling */
.footnotes {
  margin-top: 1em;
  font-size: 0.9em;
  line-height: 1.4;
}
.footnotes p {
  margin: 0.5em 0;
}

/* Footer styling */
.site-footer {
  width: calc(100% - 14%);
  margin-left: 14%;
  background-color: #2b2b2b;
  color: #ffffff;
  font-size: 0.9em;
  padding: 0.5em 1em;
  text-align: center;
  z-index: 999;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.footer-content {
  text-align: center;
}

/* ---- Responsive Styles ----*/
/* Media styling */
/* Responsive: Tablets and below */
@media (max-width: 1024px) {
  .side-nav {
    width: 22%;
    font-size: 0.98em;
    padding: 0.7em;
  }
    .profile-badge {
    width: 70px;
    height: 70px;
    margin-top: calc(1em + 100px);
  }
  .author-sidebar {
    font-size: 0.9em;
  }
  .content,
  .post-content {
    margin-left: 22%;
    padding: 0.7em;
  }
}

/* Responsive: Small laptops and large tablets */
@media (max-width: 800px) {
  .side-nav {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #444;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.5em 0.5em 0.5em 0.5em;
    box-sizing: border-box;
  }
  .side-nav > * {
    flex: 1 1 45%;
    min-width: 180px;
    margin-bottom: 0.5em;
  }
  .content,
  .post-content {
    margin-left: 0;
    margin-top: 11em;
    padding: 0.5em;
  }
  .header,
  .top-nav {
    position: static;
    width: calc(100% - 14%);
  }
  .site-footer {
    position: static;
    transform: none;
    pointer-events: auto;
    opacity: 1;
    box-shadow: none;
  }
}

/* Responsive: Phones */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5em 0.5em;
    font-size: 0.95em;
  }
  .site-title h1 {
    font-size: 1.2em;
  }
  .site-title h2 {
    font-size: 1em;
  }
  .side-nav {
    flex-direction: column;
    padding: 0.5em 0.2em;
    font-size: 0.95em;
  }
  .side-nav h3,
  .side-nav ul,
  .sidebar-info {
    margin-left: 0;
    margin-right: 0;
  }
  .profile-section {
    text-align: center;
    margin-bottom: 0.8em;
  }

  .profile-badge {
    width: 60px;
    height: 60px;
    margin-bottom: 0.4em;
    margin-top: calc(1em + 100px);
  }

  .site-footer {
    font-size: 0.85em;
    padding: 0.5em;
  }

  .author-sidebar {
    font-size: 0.85em;
  }
  .content,
  .post-content {
    margin: 0;
    padding: 0.5em 0.2em;
    font-size: 1em;
  }
  .contents {
    padding: 0.7em 0.5em;
    font-size: 0.98em;
  }
  .code-container {
    margin: 10px 0;
    max-width: 100%;
  }
  .code-block {
    font-size: 0.95em;
    padding: 1em 0.5em 1em 1.5em;
    text-indent: -1em;
  }
  .copy-button {
    bottom: 0.5em;
    right: 0.5em;
    font-size: 0.8em;
    padding: 4px 4px;
  }
  img,
  .top-image img,
  .left-image img,
  .right-image img {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
  }
  .left-image,
  .right-image {
    float: none;
    width: 100%;
    margin: 0 0 1em 0;
  }
}

/* General: Prevent horizontal scroll on small screens */
body, html {
  max-width: 100vw;
  overflow-x: hidden;
}

/* === ABOUT PAGE LAYOUT STYLES === */

.about-layout {
  padding: 1em;
  font-family: 'JetBrains Mono', monospace;
}

.about-layout h3 {
  font-size: 2em;
  margin-bottom: 1em;
  text-align: center;
  color: #19115a;
}

/* Grid for two-column layout */
.about-grid {
  display: flex;
  justify-content: space-between;
  gap: 2em;
  margin-top: 2em;
  flex-wrap: wrap;
}

/* Left column with badge and links */
.about-left {
  flex: 1;
  max-width: 300px;
  text-align: center;
}

.about-badge {
  width: 160px;
  height: auto;
  border-radius: 50%;
  margin: 0 auto 1em auto;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

/* Links section with icons */
.about-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
}

.about-links a {
  display: flex;            /* make the link a flex container */
  align-items: center;      /* vertically center content */
  justify-content: center;  /* horizontally center if needed */
  gap: 0.5em;               /* space between icon and text, optional */
  text-decoration: none;      /* remove underline from links if desired */
}

.about-links .icon-link {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}

.about-links .icon-link:hover {
  transform: scale(1.1);
}

.about-links p {
  margin: 0.4em 0 0 0;
  font-size: 0.95em;
  font-weight: bold;
  color: #333;
}

/* Right column with terminal and quote box */
.about-right {
  flex: 2;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

/* Retro terminal-style box */
.retro-box {
  background-color: #1e1e1e;
  color: #dbdedc;
  font-family: 'JetBrains Mono', monospace;
  padding: 1.5em;
  border: 2px solid #00ff9c;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.2);
  font-size: 1em;
  line-height: 1.6;
  position: relative;
}

.retro-box::before {
  content: "holyterminal";
  display: block;
  background: #0f0f0f;
  padding: 0.4em 0.6em;
  border-bottom: 1px solid #00ff9c;
  font-size: 0.85em;
  color: #00ff9c;
  font-weight: bold;
  border-radius: 5px 5px 0 0;
  margin: -1.5em -1.5em 1em -1.5em;
}

/* Scripture quote box */
.quote-box {
  background: #f9f9f9;
  border: 4px solid #ccc;
  padding: 1em 1.2em;
  font-style: italic;
  color: #333;
  border-radius: 4px;
}

.quote-box blockquote {
  margin: 0;
}

.quote-box footer {
  font-size: 0.85em;
  text-align: right;
  color: #666;
  margin-top: 0.5em;
}

/* --- NAV PAGE /extra/all-posts.html styling --- */
.nav-page {
  font-family: 'JetBrains Mono', monospace;
  padding: 1em;
}

#all-posts-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* optional: if you want content spaced */
  min-height: 0; /* prevents overflow issues */
}

/* Retro terminal-style box */
.retro-box-nav {
  background-color: #1e1e1e;
  color: #dbdedc;
  font-family: 'JetBrains Mono', monospace;
  padding: 1.5em;
  border: 2px solid #00ff9c;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 255, 156, 0.2);
  font-size: 1em;
  line-height: 1.6;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.retro-box-nav::before {
  content: "holyterminal";
  display: block;
  background: #0f0f0f;
  padding: 0.4em 0.6em;
  border-bottom: 1px solid #00ff9c;
  font-size: 0.85em;
  color: #00ff9c;
  font-weight: bold;
  border-radius: 5px 5px 0 0;
  margin: -1.5em -1.5em 1em -1.5em;
}

.post-sorting-controls {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-bottom: 1em;
}

.post-sorting-controls label {
  font-weight: bold;
  font-size: 1em;
  color: #00ff9c;
}

.sort-button {
  background-color: transparent;
  border: 1px solid #00ff9c;
  color: #00ff9c;
  padding: 0.3em 0.8em;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.sort-button:hover {
  background-color: #00ff9c;
  color: #1e1e1e;
}

.sort-button.active {
  background-color: #00ff9c;
  color: #1e1e1e;
  font-weight: bold;
}

#sorted-posts-list h4 {
  color: #00ff9c;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.post-link {
  display: block;
  color: #c5c8c6;
  text-decoration: none;
  padding: 0.2em 0;
  border-left: 3px solid transparent;
  padding-left: 0.5em;
  transition: border-left 0.2s, color 0.2s;
}

.post-link:hover {
  border-left: 3px solid #00ff9c;
  color: #ffffff;
}

/* === MEDIA QUERIES === */

@media (max-width: 800px) {
  .about-grid {
    flex-direction: column;
    align-items: center;
  }

  .about-left, .about-right {
    max-width: 100%;
    width: 100%;
  }

  .retro-box {
    font-size: 0.95em;
  }

  .quote-box {
    font-size: 0.95em;
  }

  .about-links {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1em;
  }

  .about-links p {
    width: 100%;
    text-align: center;
    margin-top: 0.5em;
  }
}

@media (max-width: 500px) {
  .retro-box::before {
    font-size: 0.75em;
  }

  .retro-box {
    padding: 1em;
  }

  .about-links .icon-link {
    width: 28px;
    height: 28px;
  }

.email-link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 0.95em;
}

.email-link:hover span {
  text-decoration: underline;
}
}