/* ========== Root Variables ========== */
:root {
  --primary: #2563eb;        /* strong blue */
  --primary-dark: #1e40af;   /* deep blue */
  --accent: #38bdf8;         /* lighter accent blue */
  --background: #eef4ff;     /* soft blue background */
  --card-bg: #ffffff;
  --text: #08256a;
  --muted: #64748b;
  --border-radius: 12px;
}

/* ========== Global Styles ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html{
    height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  line-height: 1.6;
  padding: 0 1.5rem;
}

main{
    flex: 1;
}

/* ========== Navigation Bar ========== */
nav {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: white;
  margin: 0 -1.5rem;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Make header behave nicely inside flex */
nav header {
  margin: 0;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--primary);
}

/* Nav list */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

/* Logo text */
.logo {
  color: white;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent);
}

/* ========== Hamburger Button ========== */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

/* Footer */

footer{
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: white;
  margin: 0 -1.5rem;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;  /* the ai forgot about this part for making the footer stay at the bottom of the screen, reddit helped though */
}

/* ========== Mobile Styles ========== */
@media (max-width: 768px) {

  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--primary-dark);
    width: 200px;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: none;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

.page-title {
    color: var(--text);
    gap: 1.5rem;
    margin: 1rem auto;
    font-size: 2.5rem;
}

/* ========== Blog Layout Grid ========== */
.container {
  max-width: 800px;
  margin: 3rem auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ========== Post Cards ========== */
.post {
  background: var(--card-bg);
  padding: 1.25rem;
  line-height: 1.6;
  border-radius: var(--border-radius);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  display: flex;
  flex-direction: column;
  /* gap: 0.75rem; */
  justify-content: space-between;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

/* Title */
.post h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

/* Description */
.desc{
    margin-bottom: 15px;
}

/* Meta (author + date) */
.post .meta {
  font-size: 0.85rem;
  color: #777;
  padding: 0;            /* remove left indent */

  display: flex;         /* put items side-by-side */
  gap: 0.15rem; /* small, controlled spacing */

}

/* Description */
.post p {
  font-size: 0.95rem;
  color: #444;
}

.post .meta li {
  margin: 0;             /* remove any default spacing */
}

/* Read more link */
.post .read-more {
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: auto;
  text-decoration: none;
  color: #6366f1;
}

.post .read-more:hover {
  text-decoration: underline;
}

/* Make button align nicely at bottom */
.post a.read-more {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.5rem 0.9rem;
}

/* ======== Contact Page ========= */

/* Page Title */
#contact-page {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Form Container */
#contact-form {
    width: 100%;
    max-width: 475px;
    margin: 0 auto 60px auto;
    padding: 30px 35px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Labels */
#contact-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: #444;
}

/* Inputs & Textarea */
#contact-form input[type="text"],
#contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Textarea resize */
#contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Focus Effect */
#contact-form input[type="text"]:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Submit Button */
#contact-form input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Button Hover */
#contact-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* Validation Messages */
.validation {
    display: block;
    font-size: 0.85rem;
    color: #e11d48;
    margin-top: -12px;
    margin-bottom: 15px;
}