/* === Full safe CSS (paste to replace existing stylesheet) === */

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: #333;            /* restored original text color */
  padding: 0;
  scroll-behavior: smooth;
  background-color: #ffffff; /* fallback */
}

img {
  display: block;
  max-width: 100%;
}

/* --- Global Links --- */
a {
  color: #2e7d32;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.25s ease, text-decoration-color 0.25s ease, transform 0.2s ease;
}

a:hover {
  color: #1b5e20;
  text-decoration-color: #1b5e20;
  transform: translateY(-1px);
}

/* --- Header --- */
header {
  background-color: rgba(34, 85, 34, 0.95); /* solid deep green */
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 80px;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.25s ease, transform 0.2s ease;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-right: auto;
  letter-spacing: 0.5px;
}

/* Nav */
nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.3px;
  transition: color 0.25s, transform 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #b8f2b8;
  transform: scale(1.05);
}

/* Push page content below fixed header */
body {
  padding-top: 80px;
}

/* --- Footer Links --- */
footer a {
  color: #c8e6c9;
  text-decoration: underline;
}

footer a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

/* --- Home Intro Section --- */
.home-intro {
  max-width: 800px;
  margin: 50px auto;
  text-align: center;
  padding: 30px 25px;
  border-radius: 15px;
  background-color: rgba(244, 244, 244, 0.85);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-intro:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.home-intro h2 {
  color: #2e7d32;
  font-size: 2rem;
  margin-bottom: 20px;
  border-bottom: 2px solid #c8e6c9;
  padding-bottom: 10px;
  transition: color 0.3s, border-color 0.3s;
}

.home-intro h2:hover {
  color: #1b5e20;
  border-color: #a5d6a7;
}

/* --- Highlights Section --- */
.home-highlights {
  max-width: 1000px;
  margin: 60px auto;
  padding: 30px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 25px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
}

.home-highlights h2 {
  width: 100%;
  text-align: center;
  color: #2e7d32;
  font-size: 2rem;
  margin-bottom: 25px;
  border-bottom: 2px solid #c8e6c9;
  padding-bottom: 10px;
}

.highlights-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 25px;
  width: 100%;
}

.highlight-card {
  flex: 1 1 200px;
  max-width: 240px;
  background-color: #e8f5e9;
  border-left: 5px solid #2e7d32;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.highlight-card i {
  color: #2e7d32;
  margin-right: 12px;
  font-size: 1.3rem;
}

.highlight-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 10px 22px rgba(0,0,0,0.15);
  background: #dcedc8;
}

/* --- About Section --- */
.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: block;
  margin: 30px auto;
  object-fit: cover;
  border: 4px solid #2e7d32;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.about-text {
  max-width: 800px;
  margin: 0 auto 50px auto;
  padding: 0 20px;
  line-height: 1.8;
  font-size: 1rem;
  text-align: justify;
}

.about-text h2,
.about-text h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #2e7d32;
}

/* --- Graduation Photo --- */
.graduation-photo {
  text-align: center;
  margin: 40px auto;
}

.graduation-photo img {
  display: block;
  margin: 0 auto;
  width: 55%;
  max-width: 450px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  border: 3px solid #2e7d32;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.graduation-photo img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}

.graduation-photo figcaption {
  margin-top: 10px;
  font-style: italic;
  color: #555;
}

/* --- Featured Sections --- */
.fao-feature {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 20px;
  background-color: #f9f9f9;
}

.image-card {
  max-width: 700px;
  text-align: center;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  background: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.image-card img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  padding: 10px;
  background-color: #f2f2f2;
  border-radius: 10px;
}

.image-card .caption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #555;
}

/* --- Gallery Sections --- */
.experience-photos,
.other-photos .experience-photos,
.certificates-gallery {
  margin: 60px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.experience-photos h3,
.other-photos .experience-photos h3,
.certificates-gallery h3 {
  text-align: center;
  font-size: 1.9rem;
  margin-bottom: 30px;
  color: #2e7d32;
  position: relative;
}

.experience-photos h3::after,
.other-photos .experience-photos h3::after,
.certificates-gallery h3::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #a5d6a7;
  margin: 8px auto 0 auto;
  border-radius: 2px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.experience-photo,
.other-photos .experience-photo,
.certificates-gallery .certificate-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.experience-photo:hover,
.other-photos .experience-photo:hover,
.certificates-gallery .certificate-thumb:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  filter: brightness(1.05);
}

/* --- Degree / Certificate Photos --- */
.degree-photo {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  display: block;
  margin: 0 auto 30px auto;
}

/* --- Footer --- */
footer {
  text-align: center;
  margin-top: 60px;
  padding: 15px 0;
  background-color: #2e7d32;
  color: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .highlight-card {
    flex: 1 1 45%;
  }
  .experience-photo,
  .other-photos .experience-photo,
  .certificates-gallery .certificate-thumb {
    height: 180px;
  }
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 12px;
  }
  .highlight-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .profile-img {
    width: 140px;
    height: 140px;
  }
  .experience-photo,
  .other-photos .experience-photo,
  .certificates-gallery .certificate-thumb {
    height: 160px;
  }
  .home-intro {
    padding: 25px 15px;
  }
}

@media (max-width: 480px) {
  .experience-photo,
  .other-photos .experience-photo,
  .certificates-gallery .certificate-thumb {
    height: 140px;
  }
  .home-intro h2,
  .home-highlights h2 {
    font-size: 1.6rem;
  }
  .experience-photos h3,
  .other-photos .experience-photos h3,
  .certificates-gallery h3 {
    font-size: 1.5rem;
  }
}

/* --- Home Page Background --- */
body.home-page {
  background-image: url('../images/background.jpg'); /* ensure path is correct */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Subtle background gradient for all pages except home */
body:not(.home-page) {
  background: linear-gradient(160deg, #f3fdf4 0%, #ffffff 100%);
  min-height: 100vh;
  background-attachment: fixed;
}

/* --- Subtle Animations (safe, non-destructive) --- */

/* Link and button transitions already set above.
   Additional subtle motion for cards and images below. */

.image-card,
.highlight-card,
.experience-photo,
.certificate-thumb,
.image-card img,
.highlight-card i {
  will-change: transform, box-shadow;
}

/* Smooth hover improvements */
.image-card:hover,
.highlight-card:hover,
.experience-photo:hover,
.certificates-gallery .certificate-thumb:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Scroll-triggered fade-up (apply class="fade-up" to elements you want) */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section-level fallback wrapper for contrast */
.page-wrapper,
.main-content,
.container {
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  padding: 20px;
  max-width: 1200px;
  margin: 30px auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Keep header and page accent colors unchanged. */

/* Blog Page Specific Styles */
.blog-page main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.blog-page .blog-intro {
  margin-bottom: 40px;
}

.blog-page .blog-intro h2 {
  font-size: 2em;
  margin-bottom: 15px;
  color: #1b3a2a;
}

.blog-page .blog-intro p {
  line-height: 1.6;
  font-size: 1rem;
  color: #333;
}

.blog-page .blog-posts h2 {
  font-size: 1.8em;
  margin-bottom: 25px;
  color: #1b3a2a;
}

.blog-page .post-card {
  background: #fefefe;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-page .post-card h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #1b3a2a;
}

.blog-page .post-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 15px;
}

.blog-page .post-card a {
  display: inline-block;
  text-decoration: none;
  color: #0d6b4b;
  font-weight: 600;
  transition: color 0.3s ease;
}

.blog-page .post-card a:hover {
  color: #1b3a2a;
}

.blog-page footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #555;
}

.short-text {
  display: block;
}

.full-text {
  display: none;
  margin-top: 10px;
}

.read-more-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background-color: #2c7a7b;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.read-more-btn:hover {
  background-color: #285e61;
}

/* Blog Cards Hover Lift */
.blog-page .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

/* Smooth transition for Read More toggle */
.full-text {
  display: none;
  margin-top: 10px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* Optional: subtle separator between cards */
.blog-page .post-card:not(:last-child) {
  border-bottom: 1px solid #e0e0e0;
}

/* Improve button spacing */
.read-more-btn {
  margin-top: 12px;
}

/* Slightly increase font size for poem titles */
.blog-page .post-card.poem h3 {
  font-size: 1.5em;
  color: #12432f;
}

/* Blog Page Background */
body.blog-page {
  background: url('../images/writing.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

/* Optional: subtle dark overlay for readability */
body.blog-page::before {
  content: '';
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.25); /* adjust opacity as needed */
  z-index: -1;
}

.blog-page .content-overlay {
  background: transparent;
  border-radius: 12px;
  padding: 30px 25px;
  max-width: 950px;
  margin: 60px auto;
  box-shadow: none; /* remove shadow */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.about-publications {
  margin-top: 3rem;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.about-publications h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #2d3e50;
}

.publication-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
}

.publication-item:last-child {
  border-bottom: none;
}

.pub-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  opacity: 0.85;
}

.pub-text h3 {
  font-size: 1.2rem;
  color: #2e8b57;
  margin-bottom: 0.5rem;
}

.pub-text p {
  margin: 0.3rem 0;
  line-height: 1.6;
}

.pub-text a {
  color: #0066cc;
  text-decoration: none;
}

.pub-text a:hover {
  text-decoration: underline;
}

.pub-text h3 {
  font-size: 1.2rem;
  color: #2e8b57; /* same green as About Me and Focus Areas */
  margin-bottom: 0.5rem;
}

.about-publications h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #1b3a2a; /* same green as Professional Experience */
}

/* --- Anyako Page Container --- */
.content {
  max-width: 1200px;   /* keeps page content centered and not too wide */
  margin: 0 auto;
  padding: 20px;
}

/* --- Photo Grid for Anyako Page --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.photo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item img {
  width: 100%;
  max-width: 220px;   /* prevents images from stretching too wide */
  height: 150px;      /* fixed height for uniformity */
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.photo-item img:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.photo-item .caption {
  padding: 8px 10px;
  font-size: 0.9rem;
  text-align: center;
  color: #333;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .photo-item img {
    max-width: 180px;
    height: 130px;
  }
}

@media (max-width: 480px) {
  .photo-item img {
    max-width: 150px;
    height: 110px;
  }
}

/* --- Dynamic padding for content below fixed header --- */
body {
  padding-top: 80px; /* default for desktop */
}

@media (max-width: 768px) {
  body {
    padding-top: 140px; /* accounts for wrapped nav */
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 180px; /* mobile with stacked links */
  }
}
