/* ==========================================
   GLOBAL & RESET STYLES
   ========================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #e0e0e0;       
  line-height: 1.6;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
header {
  background-color: #1b4332; 
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

header h1 {
  margin: 0;
}

.site-title {
  color: #fff;
  text-decoration: none;
}

.site-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.site-logo {
  height: 40px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.site-logo-link:hover .site-logo {
  transform: scale(1.1) rotate(-3deg); 
  filter: brightness(0.7);             
}

nav a {
  color: #e8f5e9;
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #a3e635; 
}

/* ==========================================
   UNIVERSAL GRID PARAGRAPH FIX
   Hides Markdown-injected empty <p> tags
   ========================================== */
.software-grid > p,
.project-grid > p,
.skills-grid > p,
.skills-qualifications-container > p,
.about-container > p,
swiper-container > p {
  display: none !important;
}

/* ==========================================
   ABOUT & PROFILE CONTAINER
   ========================================== */
.about-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: center;
}

.home-profile-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #2d2d2d;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.home-intro-text h2 {
  color: #81c784;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.home-intro-text p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ==========================================
   SWIPER GALLERY FIX
   ========================================== */
swiper-container.about-gallery {
  display: block; /* Essential for Web Components in Grid */
  width: 100%;
  height: 320px; /* Gives Swiper a explicit height so it can render & scroll */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid #2d2d2d;
  --swiper-navigation-size: 20px;
  --swiper-navigation-color: #ffffff;
  cursor: grab;
}

swiper-container.about-gallery:active {
  cursor: grabbing;
}

swiper-slide {
  display: flex;
  flex-direction: column;
  position: relative; /* This is the magic line that stops captions from escaping! */
  overflow: hidden;
  background-color: #121212;
}

swiper-slide img,
swiper-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

/* ==========================================
   PROJECT CARDS & PADDING FIX
   ========================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Default card styling with padding built-in */
.project-card {
  background-color: #1e1e1e;
  border: 1px solid #2d2d2d;
  padding: 1.25rem; /* Restored padding for cards without header images */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #2e7d32;
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.project-card p {
  margin-bottom: 1rem;
  color: #cccccc;
}

.project-card a {
  color: #81c784;
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
}

.project-card a:hover {
  text-decoration: underline;
}

/* Removes outer padding ONLY if card has a full-width header image */
.project-card:has(.project-card-image) {
  padding: 0;
}

.project-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #2d2d2d;
}

.project-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ==========================================
   SKILLS & QUALIFICATIONS SECTION
   ========================================== */
.skills-qualifications-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

.skill-card {
  background-color: #1e1e1e;
  border: 1px solid #2d2d2d;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box; 
}

.skill-card h3 {
  color: #81c784;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  border-bottom: 1px solid #2d2d2d;
  padding-bottom: 0.5rem;
}

.software-card {
  display: flex;
  flex-direction: column;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.software-item {
  aspect-ratio: 1 / 1;
  background-color: #2a2a2a;
  border: 1px solid #3d3d3d;
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.software-item:hover {
  transform: translateY(-3px);
  border-color: #81c784;
  background-color: #1b4332;
}

.software-item img {
  width: 100%;
  max-width: 50px;
  height: 45px; 
  object-fit: contain; 
  filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
}

.software-item span {
  font-size: 1rem;
  color: #e0e0e0;
  font-weight: 500;
}


.qualifications-list {
  padding-left: 1.2rem;
  margin: 1rem 0 0 0;
  color: #cccccc;
  line-height: 1.6;
}

.qualifications-list > li {
  margin-bottom: 1rem;
}


.qualifications-list ul {
  padding-left: 1.2rem;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  list-style-type: circle; /* Distinct bullet icon for sub-items */
}

.qualifications-list ul li {
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  color: #aaaaaa; /* Slightly lighter tone for sub-information */
  line-height: 1.5;
}

/* ==========================================
   PROJECT CARDS & GRID
   ========================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #2e7d32;
}

.project-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #2d2d2d;
}

.project-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.project-card-content p {
  margin-bottom: 1rem;
  color: #cccccc;
  flex-grow: 1;
}

.project-card-content a {
  color: #81c784;
  text-decoration: none;
  font-weight: 500;
}

.project-card-content a:hover {
  text-decoration: underline;
}

/* ==========================================
   CONTACT LINKS & FOOTER
   ========================================== */
.contact-links a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  background: #2a2a2a;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  text-decoration: none;
  color: #e0e0e0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover {
  background: #1b4332;
  border-color: #81c784;
  color: #ffffff;
}

footer {
  text-align: center;
  padding: 2rem;
  background: #181818;
  border-top: 1px solid #2a2a2a;
  margin-top: 3rem;
  color: #888;
}

.contact-links a.no-lift:hover {
  transform: none;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 850px) {
  .skills-qualifications-container {
    grid-template-columns: 1fr; /* Stacks the main content cards vertically */
  }
}

@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .home-profile-img {
    height: 260px;
  }
  
  .project-meta-grid {
    grid-template-columns: repeat(2, 1fr); /* Forces a 2-column layout on tablets */
  }

  .swiper-caption {
    font-size: 0.8rem;
    padding: 1rem 1rem 0.5rem 1rem;
    line-height: 1.3;
  }
  
  swiper-container.overview-slideshow,
  swiper-container.evidence-gallery {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  /* On very small phones, make everything 1 column */
  .project-meta-grid {
    grid-template-columns: 1fr; 
  }
  
  header {
    padding: 0.8rem 1rem; 
  }
  
  .skill-card {
    padding: 1rem; 
  }
  
  .skill-card h3 {
    font-size: 1.1rem;
  }
}

/* ==========================================
   INLINE PDF EMBED STYLES
   ========================================== */
.pdf-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1e1e1e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  

  border: 2px solid #ffffff;
  
  /* OPTION B: Green Accent Border (uncomment if preferred) */
  /* border: 2px solid #81c784; */
}

.pdf-container iframe,
.pdf-container embed,
.pdf-container object {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
}

/* ==========================================
   PRODUCTION PROJECT DETAIL PAGES
   ========================================== */
.project-detail-header {
  margin-bottom: 2rem;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
}

.meta-card {
  background-color: #1e1e1e;
  border: 1px solid #2d2d2d;
  padding: 1rem;
  border-radius: 8px;
}

.meta-card h4 {
  margin: 0 0 0.35rem 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #81c784;
}

.meta-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 500;
}

.project-section-card {
  background-color: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-section-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #81c784;
  border-bottom: 1px solid #2d2d2d;
  padding-bottom: 0.5rem;
  font-size: 1.35rem;
}

.project-section-card ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.project-section-card li {
  margin-bottom: 0.5rem;
  color: #cccccc;
  line-height: 1.6;
}

.project-section-card li strong {
  color: #ffffff;
}

/* ==========================================
   MODERN VIDEO EMBED (NATIVE HTML5)
   ========================================== */
.video-container {
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid #2d2d2d;
  background-color: #000000;
}

.video-container video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

/* ==========================================
   UNIVERSAL SWIPER CAPTIONS
   ========================================== */
.swiper-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 100%);
  color: #e0e0e0;
  padding: 1.25rem 1.5rem 0.75rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  z-index: 10;
  box-sizing: border-box;
}

.about-gallery swiper-slide {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

swiper-container.overview-slideshow {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  margin: 1.5rem 0 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid #2d2d2d;
  --swiper-navigation-size: 25px;
  --swiper-navigation-color: #ffffff;
}

swiper-container.evidence-gallery {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid #2d2d2d;
  --swiper-navigation-size: 20px;
  --swiper-navigation-color: #ffffff;
}

swiper-container {
  max-width: 100%;
  display: block;
}

/* ==========================================
   MODERN VIDEO EMBED (16:9) - IFRAMES & LOCAL FILES
   ========================================== */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 8px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid #2d2d2d;
  background-color: #000000;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}