/* Custom CSS to mimic GitHub profile aesthetics */

:root {
  --default-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --heading-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --nav-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --accent-color: #0969da; /* GitHub Blue */
}

body {
  background-color: #ffffff;
  color: #1f2328; /* GitHub Grid Color */
}

/* Header */
/* .header {
  background-color: #f6f8fa;
  border-right: 1px solid #d0d7de;
} */

.navmenu a {
  color: #1f2328;
}

.navmenu a:hover,
.navmenu .active,
.navmenu .active:focus,
.navmenu li:hover > a {
  color: #0969da;
  background-color: #f6f8fa; /* Subtle hover */
}

/* Profile Image - Round */
.about img {
  border-radius: 8px;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 1px #d0d7de;
}

/* Section Titles */
.section-title h2 {
  font-size: 24px;
  border-bottom: none; /* Remove default underline */
}
.section-title h2::after {
  display: none; /* Remove default underline accent */
}

/* Cards (Projects, Posts, Certifications) */
.portfolio-item,
.info-item,
.testimonial-item {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background-color: #ffffff;
  padding: 16px;
  transition: all 0.2s ease-in-out;
}

.portfolio-item:hover,
.service-item:hover,
.info-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #0969da;
}

.portfolio-info {
  background: transparent !important;
  padding: 0 !important;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.portfolio-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: #0969da;
  margin-bottom: 8px;
}

.portfolio-info p {
  font-size: 14px;
  color: #57606a;
}

/* Portfolio/Project Cards */
.portfolio-item {
  /* height: 100%; removed to fix isotope resizing issue */
  display: flex;
  flex-direction: column;
}

.portfolio-card {
  height: 480px !important; /* Fixed height for uniformity and stability */
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.portfolio-card img {
  width: 100%;
  height: 200px !important; /* Force fixed height */
  object-fit: cover !important; /* Ensure image covers the area without distortion */
  border-bottom: 1px solid #d0d7de;
}

.portfolio-info {
  padding: 15px 25px !important; /* Forces padding, solves "No space" */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribute content */
  gap: 10px; /* Reduces vertical spacing */
}

.portfolio-info h4 {
  margin-top: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
  line-height: 1.4em;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0; /* Line after title */
}

.portfolio-info p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0px;
  height: 4.8em;
  line-height: 1.6em;
  flex-grow: 1; /* Allow description to take space */
}

.portfolio-info .mt-auto {
  border-top: 1px solid #f0f0f0; /* Line before tech stack */
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Hide default portfolio hover overlay since we are making them cards */
.portfolio-item:before {
  display: none !important;
}

/* Gallery Section */
.gallery .gallery-item {
  overflow: hidden;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
}

.gallery .gallery-item img {
  transition: all ease-in-out 0.4s;
  width: 100%;
  height: 250px; /* Fixed height for uniformity */
  object-fit: cover;
}

.gallery .gallery-item:hover img {
  transform: scale(1.1);
}

/* Gallery Swiper Specifics */
#gallery .swiper-slide {
  height: 520px !important; /* Full height for 2 rows + gap */
  width: 350px !important; /* Fixed width for uniform columns */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Ensure the swiper container has height for 2 rows + space */
#gallery .swiper {
  height: 560px; /* Slight buffer for pagination/padding */
  padding-bottom: 40px;
}

#gallery .gallery-item {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

#gallery .gallery-item.h-100 {
  height: 100%;
}

#gallery .gallery-item.h-50 {
  height: calc(50% - 10px); /* 50% height minus half the gap */
}

#gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#gallery .gallery-item:hover img {
  transform: scale(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 15px 10px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0)
  ); /* Gradient for visibility */
  color: #fff;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  pointer-events: none; /* Let clicks pass through to the image/lightbox */
}

.gallery-overlay .location,
.gallery-overlay .moment {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.gallery-overlay .moment {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
}

.gallery-overlay i {
  color: #a5c3f6; /* Soft Blue-White instead of Gold */
}

/* Custom GLightbox Skins to remove white background */
.gslide-desc {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0)
  ) !important; /* Transparent gradient */
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  padding: 20px !important;
  border: none !important;
}

.gslide-title {
  color: #fff !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  margin-bottom: 5px !important;
}

.gslide-desc i {
  color: #ffd700 !important; /* Gold icons in lightbox for contrast */
  margin-right: 5px;
}

.glightbox-clean .gslide-description {
  background: transparent !important; /* Remove outer white box */
}

/* Resume Section */
.resume .resume-item {
  border-left: 2px solid #d0d7de;
}
.resume .resume-item::before {
  background: #ffffff;
  border: 2px solid #d0d7de;
}

/* Badge Styling */
.badge {
  font-weight: 500;
  border: 1px solid #d0d7de;
  background-color: #f6f8fa;
  color: #57606a !important;
  border-radius: 2em;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
}

/* Typography tweaks */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #1f2328;
}

p {
  color: #1f2328;
}

.text-muted {
  color: #57606a !important;
}

/* Posts Specifics */
#posts .info-item {
  margin-bottom: 20px;
}
#posts .info-item h3 {
  font-size: 18px;
  color: #1f2328;
  font-weight: 600;
}
#posts .info-item i {
  font-size: 24px;
  color: #0a66c2; /* LinkedIn Blue */
  margin-right: 15px;
}

/* Skills Badges */
.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.skills-badges .badge {
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skills-badges .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.badge-tech {
  background-color: #ddf4ff;
  color: #0969da !important;
  border: 1px solid #0969da;
}

.badge-learning {
  background-color: #dafbe1;
  color: #1a7f37 !important;
  border: 1px solid #1a7f37;
}

.badge-leadership {
  background-color: #f3e6ff;
  color: #8250df !important;
  border: 1px solid #8250df;
}

.badge-hobby {
  background-color: #f6f8fa;
  color: #57606a !important;
  border: 1px solid #d0d7de;
}

/* Experience Logos */
.resume-item {
  clear: both; /* Ensure content doesn't overlap due to floats */
}

.resume-item .experience-logo {
  float: right;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  margin-left: 15px;
  border: 1px solid #d0d7de;
  padding: 2px;
  background: #fff;
  object-fit: contain;
}

/* Image Placeholders */
.gallery-item img, 
.testimonial-img, 
.carousel-item img,
.portfolio-content img {
  background-color: #f0f0f0;
  min-height: 200px;
  display: block;
  transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"] {
  opacity: 1; /* Ensure visible */
}

/* Back Link Styling */
.back-link {
  display: inline-flex;
  align-items: center;
  color: #0969da;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #0550ae;
  text-decoration: none;
  transform: translateX(-3px);
}

.back-link i {
  font-size: 1.1rem;
  margin-right: 4px;
}
