/* Ensure hero buttons are centered and spaced as a group */
.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  width: 100%;
}
.profile-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  transform: none;
  box-shadow: none;
  transition: transform 0.3s ease;
  border: none;
}

.profile-image:hover {
  transform: none;
}

/* Grid Layout on index page */
.grid-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: center;
  padding: 12px 0;
}

/* Hero full-width section */

.hero-full-width {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  text-align: center;
}

.hero-full-width > * {
  margin: 0;
}

/* Remove inline-block and margin from hero buttons for proper centering */
.hero-full-width .md-button {
  display: block;
  margin: 0;
}

/* Center buttons inside hero-full-width */
.hero-full-width .md-button {
  display: inline-block;
  margin: 0.5rem;
}

/* Center button container */
.hero-full-width .md-button-wrapper {
  text-align: center;
}

/* Ensure buttons are centered in hero-full-width */
.hero-full-width {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Text intro grid - full width */
.text-intro-grid {
  grid-column: 1 / -1;
}

/* Hero comment - full width with padding */
.hero-comment {
  grid-column: 1 / -1;
  text-align: center;
  padding-left: 20%;
  padding-right: 20%;
}

/* Hero card gradient background */
.hero-section.grid-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1136FF 0%, #2F6CF9 40%, #A5B4FC 100%);
  border-radius: 20px;
  padding: 1.25rem 2rem;
  color: #fff;
  box-shadow: 0 20px 60px rgba(17, 54, 255, 0.2);
  margin-bottom: 20vh;
  gap: 0.5rem 2rem;
  max-width:100%;
}

/* Mesh texture overlay */
.hero-section.grid-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.hero-section.grid-container > * {
  position: relative;
  z-index: 1;
}

.hero-section.grid-container h1,
.hero-section.grid-container h3,
.hero-section.grid-container p,
.hero-section.grid-container li {
  color: #fff;
}

.hero-section.grid-container h1 {
  color: #fff;
  font-size: 2.2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.hero-section.grid-container h3 {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  border-bottom: none;
}

.hero-section.grid-container ul {
  color: rgba(255, 255, 255, 0.92);
}

.hero-section.grid-container .md-button--primary {
  background-color: var(--color-accent-warm);
  border-color: var(--color-accent-warm);
  color: var(--color-charcoal);
  font-weight: 700;
}

.hero-section.grid-container .md-button--primary:hover {
  background-color: var(--color-accent-warm-hover);
  border-color: var(--color-accent-warm-hover);
  color: var(--color-charcoal);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.15);
}

.hero-section.grid-container .profile-image {
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

/* Dark mode hero — subtler gradient */
[data-md-color-scheme="slate"] .hero-section.grid-container {
  background: linear-gradient(135deg, rgba(17, 54, 255, 0.18) 0%, rgba(47, 108, 249, 0.1) 50%, rgba(165, 180, 252, 0.06) 100%);
  border: 1px solid rgba(165, 180, 252, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-md-color-scheme="slate"] .hero-section.grid-container h1,
[data-md-color-scheme="slate"] .hero-section.grid-container h3,
[data-md-color-scheme="slate"] .hero-section.grid-container p,
[data-md-color-scheme="slate"] .hero-section.grid-container li {
  color: #e2e4eb;
}

[data-md-color-scheme="slate"] .hero-section.grid-container h1 {
  color: #fff;
}

[data-md-color-scheme="slate"] .hero-section.grid-container h3 {
  color: rgba(226, 228, 235, 0.85);
}

[data-md-color-scheme="slate"] .hero-section.grid-container .md-button--primary {
  background-color: var(--color-accent-warm);
  border-color: var(--color-accent-warm);
  color: var(--color-charcoal);
}

[data-md-color-scheme="slate"] .hero-section.grid-container .md-button--primary:hover {
  background-color: var(--color-accent-warm-hover);
  border-color: var(--color-accent-warm-hover);
  color: var(--color-charcoal);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.15);
}

[data-md-color-scheme="slate"] .hero-section.grid-container .profile-image {
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

.text-intro-grid {
  grid-column: 1 / 2;
}

.hero-full-width {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* Tighten paragraph margins inside hero */
.hero-section.grid-container p {
  margin-top: 0.25em;
  margin-bottom: 0.5em;
}

.hero-section.grid-container h1 + p,
.hero-section.grid-container .hero-eyebrow + h1 {
  margin-top: 0;
}

.hero-full-width .proof-strip {
  justify-content: flex-start;
}

.hero-full-width .proof-strip p {
  justify-content: flex-start;
}

.hero-proof-strip {
  grid-column: 1 / -1;
}

.profile-image-grid {
  grid-column: 2 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile layout */
@media screen and (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 12px 0;
  }

  .hero-section.grid-container {
    padding: 1.5rem 1.5rem;
    gap: 0.75rem;
  }

  .hero-section.grid-container h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .hero-section.grid-container h3 {
    font-size: 1rem;
  }

  /* Stack hero buttons full-width on mobile */
  .hero-section p:has(.md-button) {
    flex-direction: column;
    gap: 0.6rem;
  }

  .hero-section .md-button {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.95rem;
  }

  /* Description paragraph — slightly tighter on mobile */
  .hero-section.grid-container .text-intro-grid > p:first-of-type {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .md-typeset .profile-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  .text-intro-grid {
    grid-row: 1;
    grid-column: 1;
    padding-right: 0;
  }

  .profile-image-grid {
    grid-row: 2;
    grid-column: 1;
    justify-content: center;
  }

}

/* Small mobile */
@media screen and (max-width: 480px) {
  .hero-section.grid-container {
    padding: 1.25rem 1.15rem;
    gap: 0.6rem;
  }

  .hero-section.grid-container h1 {
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .hero-section.grid-container h3 {
    font-size: 0.9rem;
  }

  /* Description paragraph */
  .hero-section.grid-container .text-intro-grid > p:first-of-type {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .md-typeset .profile-image {
    max-width: 180px;
    height: auto;
  }

}

/* Extra-small mobile (≤ 360px) */
@media screen and (max-width: 425px) {
  .hero-section.grid-container {
    padding: 1rem 0.75rem;
    border-radius: 14px;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    overflow: hidden;
    max-width: calc(100vw - 0.5rem);
    box-sizing: border-box;
    gap: 0.5rem;
  }

  .hero-section.grid-container h1 {
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .hero-section.grid-container h3 {
    font-size: 0.82rem;
  }

  .hero-section.grid-container p {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .md-typeset .profile-image {
    max-width: 140px;
  }

  .hero-section .md-button {
    font-size: 0.82rem;
    padding: 0.6rem 0.85rem;
    white-space: normal;
  }

  /* Proof chips — compact for 360px */
  .hero-proof-strip .proof-chip {
    font-size: 0.62rem;
    padding: 0.2rem 0.45rem;
    gap: 0.2rem;
  }

  .proof-strip,
  .proof-strip p {
    gap: 0.3rem;
  }

}

/* Tablets and small laptops */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-section.grid-container h1 {
    font-size: 2rem;
  }
}

/* Landscape phones */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero-section.grid-container {
    padding: 1.5rem;
  }

  .hero-section.grid-container h1 {
    font-size: 1.5rem;
  }

  .profile-image {
    height: auto;
    width: 160px;
  }
}

/* Add styles for larger screens */
@media screen and (min-width: 1200px) {
  .grid-container {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .profile-image {
    width: 580px;
    height: auto;
  }
}