:root {
  --primary: #6366f1;
  --bg-light: #ffffff;
  --bg-alt: #f8fafc;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --teal-accent: #0d9488;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text-dark); background: var(--bg-light); line-height: 1.6; }

section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--teal-accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.navbar {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 1.5rem 5%; 
  background: var(--bg-light);
  border-bottom: 1px solid var(--border); 
  position: sticky; 
  top: 0; 
  z-index: 100; 
}
.nav-links { 
  display: flex;
  list-style: none; 
  gap: 1.5rem; 
}

/* Hide Hamburger button on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  appearance: none;
}

.hamburger .bar {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333; /* Change to match your text theme color */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex; /* Show hamburger button on mobile */
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff; /* Match your navbar background color */
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Hidden state */
    display: none;
  }

  /* Active state when toggled */
  .nav-links.active {
    display: flex;
  }

  /* Transform hamburger to an 'X' icon when active */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; }

.hero { text-align: center; 
  padding: 3rem 5%; 
  max-width: 1100px; 
  margin: 0 auto; 
  background: var(--bg-alt); 
  
}

/* Centered Hero Buttons Container */
/* Centered Hero Buttons Container */
.hero-buttons {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center; /* Centers buttons horizontally */
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap; /* Keeps buttons responsive on smaller screens */
}

/* Primary Download Button */
.hero-btn-primary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Secondary Contact Button */
.hero-btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.hero-btn-secondary:hover {
  background-color: var(--primary);
  color: #ffffff;
}
.hero h1 { font-size: 2.5rem; margin: 1rem 0; }
.hero p { color: var(--text-muted); font-size: 1.125rem; margin-bottom: 1.5rem; }

.mission-container {
  border-left: 5px solid var(--teal-accent);
}

.badge { background: #e0e7ff; color: var(--primary); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; }
.container { padding: 2rem 5%; max-width: 1100px; margin: 0 auto; }
.bg-alt { background: var(--bg-alt); }

.card-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 1.5rem; 
  margin-top: 1.5rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.cert-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 1.5rem; 
  margin-top: 1.5rem; }


  /* Responsive breakpoint for medium screens (tablets) */
@media (max-width: 992px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr); /* Drops to 2 wide */
  }
}

/* Responsive breakpoint for small screens (mobile) */
@media (max-width: 600px) {
  .cert-grid {
    grid-template-columns: 1fr; /* Drops to 1 wide */
  }
  
}

.card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #4f46e5; /* Accent color matching your brand badge */
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap:1.25rem;
}
/* Change this: */
.skill-item, .cert-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #4f46e5;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Changed from space-between to flex-start */
  gap: 0.5rem;                 /* Tightens spacing between header and list */
}

/* Header layout inside card */
.cert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Degree/Certificate Title */
.cert-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.3;
}

/* Optional Tag/Badge */
.cert-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: #4f46e5;
  background-color: #eef2ff;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.cert-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Subtitle / Focus Area */
.cert-subtitle {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.4;
}

.card, .skill-item, .cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

/* Degree Badge Styling */
.badge-degree {
  background-color: #1E293B;
  color: #FFFFFF;
  border-left: 3px solid #2563EB; /* Accent bar */
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}

/* Certificate Badge Styling */
.badge-certification {
  background-color: #CCFBF1;
  color: #0F766E;
  border-left: 3px solid #0D9488; /* Accent bar */
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================
   Degree Cards (Indigo Theme)
   ========================================== */
.cert-card.degree-card {
  border-left-color: #4f46e5; /* Primary accent border */
}

.cert-card.degree-card .cert-badge {
  background-color: #e0e7ff; /* Soft indigo background */
  color: #3730a3;            /* Dark indigo text */
}

/* ==========================================
   Certificate Cards (Teal Theme)
   ========================================== */
.cert-card.cert-type-card {
  border-left-color: #0d9488; /* Teal accent border */
}

.cert-card.cert-type-card .cert-badge {
  background-color: #ccfbf1; /* Light teal background */
  color: #0f766e;            /* Dark teal text */
}

.btn, button { 
background: var(--primary); 
color: white; 
border: none; 
padding: 0.75rem 1.5rem; 
border-radius: 6px; 
cursor: pointer; 
font-weight: 600; 
}

form { display: flex; flex-direction: column; gap: 1rem; max-width: 500px; margin: 2rem auto 0; }
input, textarea { padding: 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }

/* Modal Styling */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
.modal-content { background: white; padding: 2rem; border-radius: 8px; max-width: 500px; width: 90%; position: relative; }
.close-btn { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; cursor: pointer; }



/* Ensure the photo container doesn't shrink or deform */
.mission-photo {
  flex-shrink: 0; /* Prevents flexbox from squishing the image container */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Force the image to maintain a perfect square aspect ratio */
.mission-photo img {
  width: 180px;
  height: 180px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center; /* Focuses framing on the top/face so it doesn't clip */
  border-radius: 50%;
}

/* Mobile Responsiveness Adjustment */
/* Mobile Adjustment */
@media (max-width: 768px) {
  .mission-photo img {
    width: 140px;
    height: 140px;
    margin-bottom: 1rem;
  }
}
/* Container link styling */
.brand-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
}

/* Circular Logo Badge */
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0; /* Prevents badge from shrinking on smaller screens */
  
  /* Gradient background matching the MH badge */
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #8b5cf6 100%);
  
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect on the badge */
.brand-logo:hover .logo-badge {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Text styling */
.brand-text {
  display: flex;
  align-items: center; /* Vertically centers the text within the flex container */
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  white-space:nowrap;
}

.divider {
  color: #d1d5db;
  margin: 0 4px;
  font-weight: 300;
}

.tagline {
  color: #6b7280;
  font-weight: 400;
}

/* Card Container */
.mission-container {
  display: flex;
  align-items: center; /* Vertically aligns image and text */
  gap: 32px; /* Space between photo and text */
  max-width: 800px; /* Adjust card width as needed */
  margin: 0 auto; /* Center card on page */
  padding: 32px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Soft card shadow */
}

/* Styling for the button wrapper outside the container */
.hero-cta {
  text-align: center;
  margin-top: 2rem; /* Adjust space between the container and the button */
}

/* Optional: Ensures button displays as inline-block for clean spacing */
.hero-cta .btn {
  display: inline-block;
  text-decoration: none;
}

/* Text Styling */
.mission-text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
}

/* Ensure hero container stacks vertically on mobile */
@media (max-width: 640px) {
  .mission-container {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .mission-photo img {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
  }

  .hero-buttons {
    justify-content: center;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%; /* Full-width buttons on mobile for easier tapping */
    max-width: 300px;
  }
}
/* CSS */
@media (max-width: 768px) {
  .brand-text {
    flex-direction: column;   /* Stacks title and tagline vertically */
    align-items: flex-start; /* Aligns text to the left */
    gap: 0.2rem;             /* Tightens gap between stacked lines */
  }

  /* Hide the vertical divider when stacked */
  .brand-text .divider {
    display: none;
  }

  .tagline {
    font-size: 0.85rem;       /* Slightly smaller text for better fit */
    opacity: 0.8;             /* Optional subtle styling */
  }
}
/* ==========================================
   Case Study Modal Custom Formatting
   ========================================== */

/* Expand modal container for detailed reading */
.modal-content {
  max-width: 750px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto; /* Enable smooth scrolling inside popup */
  padding: 2.5rem;
  text-align: left;
}

.cs-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.cs-title {
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-top: 0.5rem;
  line-height: 1.2;
}

.cs-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* Quick Stats Metadata Grid */
.cs-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background-color: var(--bg-alt);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.cs-stat-item {
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
}

.cs-stat-item strong {
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.cs-stat-item span {
  color: var(--text-muted);
}

/* Case Study Content Sections */
.cs-section {
  margin-bottom: 1.5rem;
}

.cs-section h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.cs-section p {
  color: var(--text-muted);
  line-height: 1.6;
}

.cs-list {
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cs-list li {
  margin-bottom: 0.5rem;
}

.cs-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px; /* Optional: adds smooth rounded corners */
}

.cs-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
  margin-top: 1rem;
}

.cs-media-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes the caption to the bottom of the card */
  align-items: center;            /* Centers image and caption horizontally */
  height: 100%;                   /* Ensures both grid items stretch to full height */
  gap: 0.5rem;
}

.cs-image-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: auto;              /* Pushes caption down to align across both cards */
}

/* Stack comparison images vertically on mobile screens */
@media (max-width: 600px) {
  .cs-comparison-grid {
    grid-template-columns: 1fr;
  }
}

/* Impact Callout Box */
.cs-highlight-box {
  background-color: #eef2ff;
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1.5rem;
}

.cs-highlight-box h3 {
  color: #3730a3;
}

.cs-highlight-box .cs-list {
  color: #312e81;
}

/* Responsive adjustment for small screens */
@media (max-width: 600px) {
  .cs-stats-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }
}
@media (max-width: 600px) {
  #contact > div {
    flex-direction: column;
    gap: 1.5rem !important;
  }

  #contact input, 
  #contact textarea, 
  #contact button {
    width: 100%;
    box-sizing: border-box; /* Prevents input padding from causing overflow */
  }
}

/* Stack Featured Projects and Samples on tablets and mobile screens */
@media (max-width: 768px) {
  #projects .card-grid,
  #samples .card-grid {
    grid-template-columns: 1fr !important;
  }
}