/* Reset default styles */
html, body, div, p, ul, li {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
}

/* Navbar styling */
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center; /* center links */
  gap: 20px; /* spacing between links */
  background-color: #333;
  margin: 0;
  padding: 10px;
}

nav ul li {
  display: inline;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

nav ul li a:hover {
  background-color: #555;
}

/* Optional: Add some spacing for header */
header {
  padding: 10px 20px;
  background-color: #f5f5f5;
}

/* Optional: footer styling */
footer {
  text-align: center;
  padding: 10px;
  font-size: 0.9em;
  color: #666;
}

/* Optional: article spacing on blog page */
article {
  margin-bottom: 40px;
}

/* Main content */
main {
  max-width: 900px; /* limits content width for readability */
  margin: 30px auto;
  padding: 0 15px;
  line-height: 1.6;
  font-family: 'Roboto', sans-serif;
  color: #333;
}

/* Blog post title */
article h2 {
  color: #1e1e2f;
  margin-bottom: 5px;
  font-weight: 700;
}

/* Blog post date */
article em {
  font-size: 0.9em;
  color: #555;
  display: block;
  margin-bottom: 10px;
}

/* Blog post content spacing */
article p, article pre, article code {
  margin-bottom: 15px;
}

/* Horizontal rule between posts */
article hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 30px 0;
}

/* Ensure main content is responsive */
@media (max-width: 768px) {
  main {
    padding: 0 10px;
    margin: 20px auto;
  }
  
  nav ul {
    flex-direction: column; /* stack navbar links on mobile */
    gap: 10px;
  }

  nav ul li a {
    display: block;
    text-align: center;
  }
}

@media (max-width: 480px) {
  article h2 {
    font-size: 1.4em;
  }
  
  article p, article code, article pre {
    font-size: 0.95em;
  }
}

/* Navbar links */
nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Hover effect */
nav ul li a:hover {
  background-color: #6c63ff; /* accent color */
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Active page styling */
nav ul li a.active {
  background-color: #4b4b7d;
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Buttons in blog or call-to-action */
button, .btn {
  background-color: #6c63ff;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  background-color: #5752d4;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Links inside content */
a {
  color: #6c63ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #4b4b7d;
  text-decoration: underline;
}

/* Blog post card styling */
article {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: auto;
  padding: 0 15px;
}

.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
}

/* Mobile view */
@media (max-width: 768px) {
  #nav-links {
    display: none;
    flex-direction: column;
    background-color: #1e1e2f;
    width: 100%;
  }
  
  #nav-links li {
    text-align: center;
    padding: 12px 0;
  }

  .hamburger {
    display: block;
  }
}

html {
  scroll-behavior: smooth;
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #6c63ff;
  color: #fff;
  padding: 10px 15px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 16px;
  display: none; /* hidden by default */
  z-index: 1000;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#back-to-top:hover {
  background-color: #5752d4;
  transform: translateY(-2px);
}

/* Hero / Profile animation */
.profile-img, .hero-text {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
}

.hero-text {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav ul li a.active {
  background-color: #4b4b7d; /* active highlight */
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Blog index card layout */
.blog-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.blog-card {
  background-color: #f8f8f8;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  flex: 1 1 300px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.blog-card h2 a {
  color: #2c3e50;
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: #4b4b7d;
}

.blog-date {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 10px;
}

.blog-excerpt {
  margin-bottom: 10px;
}

.read-more {
  color: #4b4b7d;
  font-weight: bold;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* Consistent styling for all lab screenshots */
.post-content img {
  display: block;
  margin: 20px auto;        /* centers the image */
  max-width: 800px;         /* prevents stretching too wide */
  width: 100%;              /* responsive scaling */
  height: auto;             /* keep proportions */
  border-radius: 8px;       /* nice rounded corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* subtle shadow */
}
