/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
  /* Refined Color Palette */
  --primary-color: #2C3E50;    /* Deep navy for headings & major elements */
  --secondary-color: #34495E;  /* Muted navy for secondary elements */
  --accent-color: #16A085;     /* Teal accent for buttons, links, etc. */
  --background-color: #f0f4f8;  /* Light, inviting background */
  --card-background: #ffffff;  /* Clean white for cards */
  --text-color: #333333;       /* Dark gray for body text */
  --muted-text: #777777;       /* Lighter gray for metadata and muted text */
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   Base Styles & Layout
   ========================================================================== */
body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: 40px 0;
  text-align: center;
  border-bottom: 3px solid var(--accent-color);
}

header h1 {
  font-size: 2.8em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.2em;
  font-weight: 300;
}
.photo-banner {
  background-image: url('images/header.jpg'); /* Replace with your banner image path */
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 450px; /* Adjust height as needed */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;      /* Ensure no margin is added */
  padding: 5px;     /* Ensure no padding is added */
  overflow: hidden; /* Hide any overflow instead of auto */
}


.banner-overlay {
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
  padding: 20px;
  text-align: center;
  color: #fff;
  border-radius: 4px;
}

.banner-overlay h1 {
  font-size: 3em;
  margin-bottom: 0px;
  margin: 0;
}

.banner-overlay p {
  font-size: 1.2em;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
  background: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  font-size: 1.1em;
  color: #fff;
  border-radius: 4px;
  transition: background 0.3s ease, transform 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  background: #fff;
  color: var(--accent-color);
  transform: translateY(-2px);
}


/* ==========================================================================
   Main Content & Sections
   ========================================================================== */
main {
  background: #fff;
  padding: 40px 0;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

main .container {
  padding: 20px;
}

section {
  margin-bottom: 40px;
  /* Fade-in animation for sections */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.3s;
}

section h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 2em;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
  padding-bottom: 5px;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9em;
  margin-top: 20px;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #fff;
}

/* ==========================================================================
   Call-to-Action Buttons & Utility Classes
   ========================================================================== */
.cta-container {
  text-align: center;
  margin: 20px 0;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1.1em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background-color: #138d75;
  transform: translateY(-2px);
}

/* ==========================================================================
   About Me Section
   ========================================================================== */
#about {
  padding: 40px 20px;
  background: #fff;
  margin: 20px auto;
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

#about h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.profile {
  flex: 0 0 150px;
  text-align: center;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bio {
  flex: 1;
}

.bio p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: var(--text-color);
}

.bio h3 {
  margin-top: 25px;
  color: var(--primary-color);
}

.bio ul {
  list-style: disc inside;
  margin-left: 20px;
  line-height: 1.6;
}

.bio ul li {
  margin-bottom: 10px;
}

/* ==========================================================================
   Portfolio / Card Design
   ========================================================================== */
#portfolio {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.portfolio-item {
  background: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  flex: 1 1 calc(50% - 20px);
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* <<< THIS FIXES YOUR ISSUE */
}

.portfolio-img {
    max-width: 150px;
    width: 100%;
    height: auto;
}


.portfolio-info {
  padding: 20px;
}

.portfolio-info h3 {
  margin-bottom: 10px;
}

.portfolio-info p {
  margin-bottom: 15px;
}

/* Generic Card */
.card {
  background: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 20px;
  margin: 20px 0;
}

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

/* ==========================================================================
   Blog Page Styling
   ========================================================================== */
#blog {
  margin: 40px 0;
}

.blog-post {
  background: var(--card-background);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.blog-post h3 {
  margin-bottom: 10px;
}

.blog-post p {
  margin-bottom: 15px;
}

/* Featured Section in Blog */
#featured {
  margin-bottom: 40px;
  padding: 20px;
  background: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.featured-post {
  display: flex;
  gap: 20px;
}

.featured-post img {
  width: 40%;
  border-radius: 8px;
  object-fit: cover;
}

.featured-info {
  flex: 1;
}

.featured-info h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.featured-info .meta {
  font-size: 0.9em;
  color: var(--muted-text);
  margin: 10px 0;
}

/* Blog List Section */
#blog-list .search-bar {
  margin-bottom: 20px;
  text-align: center;
}

#blog-list .search-bar input {
  width: 70%;
  max-width: 400px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#blog-list .search-bar button {
  padding: 10px 20px;
  margin-left: 10px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#blog-list .search-bar button:hover {
  background: #138d75;
}

/* Post Cards Grid */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--card-background);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-content {
  padding: 20px;
  flex: 1;
}

.post-content h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.post-content .meta {
  font-size: 0.9em;
  color: var(--muted-text);
  margin: 10px 0;
}

.post-content p {
  margin-bottom: 15px;
}

.post-content .btn {
  align-self: flex-start;
  padding: 8px 16px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.post-content .btn:hover {
  background: #138d75;
}

/* ==========================================================================
   Social Media Icons
   ========================================================================== */
.social-media {
  margin-top: 10px;
}

.social-media a {
  margin: 0 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.social-media a:hover {
  transform: scale(1.1);
}

.social-media img {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }
  
  nav ul li {
    margin: 10px 0;
  }
  
  header h1 {
    font-size: 2em;
  }
  
  section h2 {
    font-size: 1.8em;
  }
  
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  #portfolio {
    flex-direction: column;
  }
}

