/* ===========================
   Global Styles
=========================== */

html {
  box-sizing: border-box;
}

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

/* Override for sidebar if needed */
.sidebar {
  box-sizing: content-box;
}

/* Body Styling */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #494E52;          /* matches your requested text color */
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  color: #494E52;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Paragraphs */
p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: #007acc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #005a99;
  text-decoration: underline;
}

/* Code Blocks */
pre, code {
  font-family: 'Courier New', monospace;
  background-color: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

/* Inline Code */
code {
  background-color: #e0e0e0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

/* ===========================
   Layout Wrapper
=========================== */
.layout {
  display: flex;
  flex-direction: row;      /* sidebar left, main content right */
  align-items: flex-start;  /* align top edges */
  gap: 1rem;                /* slightly larger gap for clarity */
  flex: 1;
  padding: 1rem;
}

/* ===========================
   Main Content
=========================== */
.main {
  flex: 1;
  padding: 1rem;
  max-width: 1000px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Page title flush at the top */
h1 {
  margin: 0 0 0.5rem 0;
  padding: 0;
}

/* ===========================
   Recent Posts Title
=========================== */
.main > h1 {
  font-size: 1.2rem;          /* slightly bigger for visibility */
  color: #6b7280;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 0.3rem;
}

/* ===========================
   Cards
=========================== */
.card-grid {
  display: flex;
  flex-direction: column;    /* stack posts vertically */
  gap: 1.rem;               /* slightly more spacing between cards */
  margin: 0;
  padding: 0;
  width: 100%;
}

.card {
  padding: -1%;      /* more breathing room inside card */
  border-radius: 10px;       /* smoother corners */
  background-color: #ffffff;
  color: #1c0902;            /* consistent with body text */
  font-size: 0.9rem;           /* more readable */
  line-height: 0.3;          /* better spacing */
  /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);  subtle shadow like modern cards */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: scale(0.9) translateX(10px);
  transform-origin: left center;
}



.card a {
  color: #007acc;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
}

.card a:hover {
  text-decoration: underline;
}

/* ===========================
   Buttons
=========================== */
.cta {
  padding: 0.5rem 1rem;
  background: #007acc;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.cta:hover {
  background: #005a99;
}

/* ===========================
   Category Menu
=========================== */
.category-menu {
  margin-bottom: 1rem;
}

.category-menu a {
  margin-right: 1rem;
  text-decoration: none;
  font-weight: 500;
  color: #007acc;
  transition: color 0.3s ease;
}

.category-menu a:hover {
  color: #005a99;
  text-decoration: underline;
}
/* ###################### */


.content {
  max-width: 750px;
  margin: 0;              /* remove auto-centering */
  padding: 2rem;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  color: #333;
}


.content h1, 
.content h2, 
.content h3 {
  font-weight: 600;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
}

.content p {
  margin-bottom: 1rem;
}

.content ul, 
.content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content code {
  background: #f6f8fa;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.content pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
}



/* ===========================
   Responsive (Mobile)
=========================== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    gap: 1rem;
  }

  .main {
    padding: 1rem;
    max-width: 100%;
  }

  .card-grid {
    gap: 0rem; /* consistent spacing */
  }

  .card {
    padding: 0.3rem;          /* proper spacing inside */
    line-height: 0.8rem;       /* readable text */
    font-size: 0.8rem;        /* slightly bigger for mobile */
    transform: none;        /* remove shrinking on mobile */
    /* box-shadow: 0 1px 4px rgba(0,0,0,0.1); subtle card look */
  }

  .card a {
    font-size: 1.1rem;        /* keep links clean */
  }
}











