:root {
  --indigodye: #080808;       /* Darker background to match intro */
  --secondary-bg: #0F1115;    /* Secondary background color */
  --tertiary-bg: #121620;     /* Tertiary background for depth */
  --teagreen: #F5F5F5;        /* Lighter text for better contrast */
  --jasper: #0D99FF;          /* Brighter blue for better visibility */
  --jasper-light: #47B4FF;    /* Lighter blue for hover states */
  --heading-color: #FFFFFF;    /* Pure white for maximum contrast */
  --neutral-dark: rgba(18, 18, 18, 0.7);  /* For overlays and cards */
  --primary-font: "Inter", sans-serif;
}

/* Global box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal overflow on mobile */
html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Base styles */
body {
  background: linear-gradient(
    135deg,
    #080808 0%,
    #0F1115 50%,
    #121620 100%
  );
  font-family: var(--primary-font);
  font-size: 1.1rem;
  color: var(--teagreen);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Increase base font size for larger screens */
@media (min-width: 768px) {
  body {
    font-size: 1.25rem;
  }
}

a {
  color: var(--jasper);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--jasper-light);
  text-shadow: 0 0 8px rgba(13, 153, 255, 0.3);
}

a:focus {
  outline: 2px solid var(--jasper);
  outline-offset: 2px;
}

/* Better header hierarchy and spacing */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--primary-font);
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.3;
}

/* Enhanced visual hierarchy with subtle variations */
h1 {
  /* Brightest and most prominent */
  color: #FFFFFF;
  text-shadow: 0 0 20px rgba(13, 153, 255, 0.3);
}

h2 {
  /* Slightly dimmed but still prominent */
  color: #F8F9FA;
  opacity: 0.95;
}

h3 {
  /* More subdued for clear hierarchy */
  color: #E9ECEF;
  opacity: 0.9;
}

/* Main page heading - Much larger for clear hierarchy */
h1 {
  font-size: 3rem;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* Section headings - Medium size, clear step down */
h2 {
  font-size: 2rem;
  margin: 3rem 0 2rem 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Subsection headings - Smaller, but still prominent */
h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1.5rem 0;
  letter-spacing: -0.01em;
  font-weight: 600;
}

/* Smaller headings */
h4 {
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem 0;
  font-weight: 600;
}

h5 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.75rem 0;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem 0;
  font-weight: 600;
}

@media (min-width: 768px) {
  h1 {
    font-size: 3.5rem;
    margin: 0 0 2rem 0;
    letter-spacing: -0.04em;
  }
  
  h2 {
    font-size: 2.4rem;
    margin: 3.5rem 0 2.5rem 0;
  }
  
  h3 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1.75rem 0;
  }
  
  h4 {
    font-size: 1.3rem;
    margin: 2rem 0 1.25rem 0;
  }
  
  h5 {
    font-size: 1.15rem;
    margin: 1.5rem 0 1rem 0;
  }
}

/* Better spacing for section headings */
section h2 {
  margin-bottom: 2rem;
}

section h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

/* Hero section headings should not have top margin */
#about-hero h1, #blog-hero h1, #resources-hero h1,
#about-hero h2, #blog-hero h2, #resources-hero h2,
#about-hero h3, #blog-hero h3, #resources-hero h3 {
  margin-top: 0;
}

@media (min-width: 768px) {
  section h2 {
    margin-bottom: 2.5rem;
  }
  
  section h3 {
    margin-top: 3rem;
    margin-bottom: 1.75rem;
  }
  
  /* Hero section headings should not have top margin */
  #about-hero h1, #blog-hero h1, #resources-hero h1,
  #about-hero h2, #blog-hero h2, #resources-hero h2,
  #about-hero h3, #blog-hero h3, #resources-hero h3 {
    margin-top: 0;
  }
}

/* Paragraph spacing within sections */
section p {
  margin-bottom: 1.25rem;
}

section p:last-child {
  margin-bottom: 0;
}

/* Override paragraph spacing in hero sections */
#about-hero p, #blog-hero p, #resources-hero p {
  margin-bottom: 0;
}

/* List spacing within sections */
section ul, section ol {
  margin-bottom: 1.5rem;
}

section ul:last-child, section ol:last-child {
  margin-bottom: 0;
}

section li {
  margin-bottom: 0.5rem;
}

section li:last-child {
  margin-bottom: 0;
}

button {
  border: none;
  border-radius: 8px;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  font-family: var(--primary-font);
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(
    45deg,
    var(--jasper) 0%,
    var(--jasper-light) 100%
  );
  color: #FFFFFF;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  min-width: 44px;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

button:hover {
  background: linear-gradient(
    45deg,
    var(--jasper-light) 0%,
    var(--jasper) 100%
  );
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(13, 153, 255, 0.4);
}

button:hover::before {
  left: 100%;
}

button:focus {
  outline: 2px solid var(--jasper);
  outline-offset: 2px;
}

button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(13, 153, 255, 0.3);
}

/* Secondary button style */
.button-secondary {
  background: rgba(13, 153, 255, 0.1) !important;
  color: var(--jasper) !important;
  border: 2px solid var(--jasper) !important;
}

.button-secondary:hover {
  background: var(--jasper) !important;
  color: white !important;
  border-color: var(--jasper-light) !important;
}

/* Outline button style */
.button-outline {
  background: transparent !important;
  color: var(--jasper) !important;
  border: 2px solid var(--jasper) !important;
}

.button-outline:hover {
  background: var(--jasper) !important;
  color: white !important;
  border-color: var(--jasper-light) !important;
}

/* Small button variant */
.button-small {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  min-height: 36px !important;
}

/* Large button variant */
.button-large {
  padding: 1rem 2rem !important;
  font-size: 1.125rem !important;
  min-height: 52px !important;
}

/* Grid container */
.grid-container {
  display: grid;
  grid-template-areas:
    "nav"
    "header"
    "education"
    "contact"
    "signup"
    "related"
    "footer";
  grid-template-rows: auto auto auto auto auto auto auto;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  align-items: start;
  gap: 1rem;
  overflow-x: hidden;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .grid-container {
    padding: 0 2rem;
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .grid-container {
    gap: 2rem;
  }
}

/* Reduced gap for subpages to avoid extra spacing */
.grid-container.subpage {
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .grid-container.subpage {
    gap: 1rem;
  }
}

/* Simplified grid for subpages (about, blog, resources) */
.grid-container.subpage {
  grid-template-areas:
    "nav"
    "main"
    "breadcrumb"
    "footer";
  grid-template-rows: auto auto auto auto;
}

/* Remove gradient line margins on subpages */
.subpage .gradient-line {
  margin: 0;
}

/* Web Components */
hero-section {
  grid-area: header;
  display: block;
  width: 100%;
  min-height: auto;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

#projects {
  grid-area: main;
  display: block;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

/* Section spacing */
header, main, footer, #newsletter-signup, #contact {
  padding: 2rem 0;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  header, main, footer, #newsletter-signup, #contact {
    padding: 2.5rem 0;
  }
}

/* Increase spacing for main content area on subpages */
.subpage main {
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  .subpage main {
    padding: 2rem 0;
  }
}

/* Special styling for boxed sections */
#newsletter-signup, #contact {
  margin: 0;
}

nav {
  grid-area: nav;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  margin-top: 1.5rem;
  overflow: hidden;
  box-sizing: border-box;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  nav {
    margin-top: 2rem;
  }
}


.nav-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  max-width: calc(100% - 60px);
  overflow: hidden;
  padding: 0 0.25rem;
  justify-content: space-between;
}

@media (min-width: 1200px) {
  nav {
    padding: 1rem 2rem;
  }
  
  .nav-content {
    gap: 2rem;
  }
  
  .primary-nav {
    gap: 1.25rem;
  }
  
  .nav-item a {
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
  }
  
  .search-toggle {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1400px) {
  .nav-content {
    gap: 2rem;
  }
  
  nav {
    gap: 2rem;
    padding: 0.75rem 1.5rem;
  }
  
  .primary-nav {
    gap: 1.25rem;
  }
  
  .nav-search {
    width: 180px;
  }
  
  .secondary-nav {
    gap: 1.25rem;
  }
}

@media (min-width: 1600px) {
  .nav-content {
    gap: 2.5rem;
  }
  
  nav {
    gap: 2.5rem;
    padding: 0.75rem 2rem;
  }
  
  .primary-nav {
    gap: 1.5rem;
  }
}

/* Removed old header styles - using hero-section component instead */

main { grid-area: main; }
footer { grid-area: footer; }
#contact { grid-area: contact; }
#state-machine-education { grid-area: education; }
#newsletter-signup { grid-area: signup; }
related-content { grid-area: related; }
hero-section-enhanced { 
  grid-area: header; 
  display: block;
  position: relative;
  overflow: visible;
}

/* Subpage specific styles */
.subpage #hr1 { grid-area: hr1; }
.subpage #hr2 { grid-area: hr2; }
.subpage #hr3 { grid-area: hr2; } /* Map hr3 to hr2 in subpage layout */

/* Summary styles removed - now handled by hero-section component */

#intro {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 4rem 0;
}

/* Remove the base background since it's now on body */
#intro::before {
  display: none;
}

/* Keep only the particle effect */
#intro::after {
  content: '';
  position: absolute;
  inset: -50%;
  background-image: 
    radial-gradient(1.5px 1.5px at 40px 60px, rgba(0, 163, 255, 0.15) 50%, transparent 100%),
    radial-gradient(2px 2px at 20% 20%, rgba(51, 184, 255, 0.1) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 30% 40%, rgba(0, 163, 255, 0.15) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 60%, rgba(51, 184, 255, 0.1) 50%, transparent 100%),
    radial-gradient(2px 2px at 50% 50%, rgba(0, 163, 255, 0.15) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 60% 30%, rgba(51, 184, 255, 0.1) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70% 70%, rgba(0, 163, 255, 0.15) 50%, transparent 100%),
    radial-gradient(2px 2px at 80% 20%, rgba(51, 184, 255, 0.1) 50%, transparent 100%),
    radial-gradient(2.5px 2.5px at 90% 40%, rgba(0, 163, 255, 0.15) 50%, transparent 100%);
  background-size: 150% 150%;
  opacity: 0.1;
  z-index: -1;
  animation: particleFloat 25s ease-in-out infinite alternate;
}

@keyframes particleFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-10px, 10px) scale(1.02);
  }
  50% {
    transform: translate(10px, -10px) scale(1);
  }
  75% {
    transform: translate(-10px, -10px) scale(1.02);
  }
  100% {
    transform: translate(10px, 10px) scale(1);
  }
}

/* Summary section styles removed - now handled by hero-section component */

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

#intro p {
  font-family: var(--primary-font);
}

#intro picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#intro img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  will-change: opacity, transform, filter;
}

.primary-image {
  opacity: 1;
  filter: grayscale(0%) contrast(110%);
  object-position: 60% center;
  transform: scale(1);
}

.secondary-image {
  opacity: 0;
  filter: grayscale(20%) contrast(110%);
  object-position: center;
  transform: scale(0.95);
}

/* Profile image container styles removed - now handled by hero-section component */

#contact {
  grid-area: contact;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(
    135deg,
    rgba(15, 17, 21, 0.9) 0%,
    rgba(18, 22, 32, 0.9) 100%
  );
  backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border: 1px solid rgba(13, 153, 255, 0.2);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--jasper), transparent);
  opacity: 0.6;
}

@media (min-width: 768px) {
  #contact {
    padding: 3rem;
  }
}

#contact h2 {
  margin-bottom: 1.5rem;
  color: var(--heading-color);
}

#contact p {
  font-family: var(--primary-font);
  line-height: 1.6;
  margin-bottom: 1rem;
}

#contact ul {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

#contact li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--teagreen);
}

#contact li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--jasper);
  font-weight: bold;
}

#contact h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--jasper);
  font-size: 1.5rem;
}

#contact li strong {
  color: var(--heading-color);
  display: block;
  margin-bottom: 0.25rem;
}

.ps-note {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-style: italic;
  opacity: 0.9;
}

#contact a {
  color: var(--jasper);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

#contact a:hover {
  color: var(--jasper-light);
  text-decoration: underline;
}

/* Solution Bridge - Level 3: Solution Aware transition */
.solution-bridge {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(13, 153, 255, 0.08) 0%, rgba(13, 153, 255, 0.03) 100%);
  border-radius: 16px;
  border: 1px solid rgba(13, 153, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.solution-bridge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(13, 153, 255, 0.1), transparent);
  animation: solution-shimmer 3s ease-in-out infinite;
}

@keyframes solution-shimmer {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.solution-text {
  color: var(--teagreen);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.solution-text em {
  color: var(--jasper);
  font-style: normal;
  font-weight: 600;
  position: relative;
}

@media (max-width: 768px) {
  .solution-text {
    font-size: 1.1rem;
  }
  
  .solution-bridge {
    margin: 1.5rem 0;
    padding: 1.5rem 1rem;
  }
}

/* Learning Bridge Section */
.learning-bridge {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(18, 22, 32, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(13, 153, 255, 0.2);
  text-align: center;
}

.bridge-text {
  margin: 0;
  font-size: 1.1rem;
  color: var(--teagreen);
}

.bridge-link {
  color: var(--jasper);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.bridge-link:hover {
  color: var(--jasper-light);
  text-shadow: 0 0 8px rgba(13, 153, 255, 0.3);
}

.menu {
  display: none;
  cursor: pointer;
  color: var(--heading-color);
  background: transparent;
  padding: 0.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu .line {
  fill: none;
  stroke: var(--heading-color);
  stroke-width: 2;
  stroke-linecap: round;
  transition: all 0.3s ease;
}

.menu:hover {
  background: rgba(8, 8, 8, 0.8);
}

.menu:hover .line {
  stroke: var(--jasper);
}

#menu-close-button {
  background: transparent;
}

.navlist {
  list-style-type: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--heading-color);
  background-color: transparent;
  margin: 0;
  padding: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.secondary-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

  @media (min-width: 1400px) {
  .primary-nav {
    gap: 2rem;
  }
  
  .secondary-nav {
    gap: 1.5rem;
  }
}

/* Social Navigation Styling */
.social-item a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--heading-color);
  text-decoration: none;
  transition: all 0.25s ease;
  padding: 0.375rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
}

.social-item a:hover {
  color: var(--jasper-light);
  transform: translateY(-1px);
}

.social-item svg {
  transition: all 0.25s ease;
  opacity: 0.9;
}

.social-item a:hover svg {
  opacity: 1;
  transform: scale(1.05);
}

.social-label {
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

@media (max-width: 1200px) {
  .social-label {
    display: none;
  }
  
  .social-item a {
    padding: 0.5rem;
    gap: 0;
  }
  
  .secondary-nav {
    gap: 0.5rem;
  }
}

/* Responsive navigation spacing */
@media (max-width: 1400px) {
  .primary-nav {
    gap: 1.5rem;
  }
  
  .secondary-nav {
    gap: 0.75rem;
  }
}

@media (max-width: 1200px) {
  .primary-nav {
    gap: 1.25rem;
    font-size: 0.9rem;
  }
  
  .nav-item {
    font-size: 1.1rem;
  }
}

@media (max-width: 1100px) {
  /* Hide the XState Challenges link on medium screens */
  .nav-item-challenges {
    display: none;
  }

}

@media (max-width: 1000px) {
  .primary-nav {
    gap: 0.75rem;
  }
  
  .nav-item {
    font-size: 0.9rem;
  }
  
  .nav-item a {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
  }
}

.nav-item {
  font-size: 1rem;
  font-weight: 500;
}

.nav-item a {
  color: var(--heading-color);
  text-decoration: none;
  font-family: var(--primary-font);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  transition: all 0.25s ease;
  position: relative;
  border: 1px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item a:hover {
  color: var(--jasper-light);
}

.nav-item a.active {
  color: var(--jasper-light);
  background: rgba(51, 184, 255, 0.15);
  border-color: rgba(51, 184, 255, 0.3);
  font-weight: 600;
}

.close {
  cursor: pointer;
  display: none;
  grid-area: menu;
}

.close .line {
  stroke: var(--heading-color);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.close:hover .line {
  stroke: var(--jasper);
}

.brand-icon {
  display: flex;
  align-items: center;
  overflow: visible;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.brand-icon:hover {
  transform: scale(1.02);
}

/* Add padding specifically to the brand icon in the navigation */
nav .brand-icon {
  padding: 0.25rem;
}

nav a.brand-link {
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

nav a.brand-link:hover {
  transform: translateY(-1px);
}

/* Brand icon component now handles all icon styling */

.hidden-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gradient-line {
  width: 100%;
  border: none;
  height: 2px;
  background: linear-gradient(90deg, var(--jasper) 0%, var(--jasper-light) 100%);
  opacity: 0.5;
  margin: 1rem 0;
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .gradient-line {
    margin: 1.5rem 0;
  }
}

.cta {
  position: relative;
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  overflow: visible;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--heading-color);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .cta {
    padding: 1.5rem 3rem;
    font-size: 1.25rem;
  }
}

.cta::before,
.cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  border: 2px solid var(--jasper);
  transition: transform 0.3s ease;
}

.cta::before {
  transform: translate(0, 0);
}

.cta::after {
  transform: translate(0, 0);
}

.cta:hover {
  color: var(--jasper);
  transform: translate(-4px, -4px);
}

.cta:hover::before {
  transform: translate(8px, 8px);
}

.cta:hover::after {
  transform: translate(4px, 4px);
}

/* Add a subtle glow effect */
.cta:hover {
  text-shadow: 0 0 8px rgba(0, 163, 255, 0.3);
}

/* Optional: Add a container class for the CTA to control its positioning */
.cta-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
  perspective: 1000px;
}

#state-machine-education {
  grid-area: education;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
}

#newsletter-signup {
  grid-area: signup;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(
    135deg,
    rgba(15, 17, 21, 0.95) 0%,
    rgba(18, 22, 32, 0.95) 100%
  );
  backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border: 1px solid rgba(13, 153, 255, 0.2);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

#newsletter-signup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--jasper), var(--jasper-light), transparent);
  opacity: 0.8;
}

@media (min-width: 768px) {
  #newsletter-signup {
    padding: 3rem;
  }
}

#newsletter-signup h2 {
  margin-bottom: 1rem;
  color: var(--heading-color);
}

#newsletter-signup p {
  font-family: var(--primary-font);
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--teagreen);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
}

.newsletter-label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-family: var(--primary-font);
  font-size: 1rem;
  color: var(--teagreen);
}

.newsletter-input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(13, 153, 255, 0.2);
  border-radius: 8px;
  font-family: var(--primary-font);
  color: var(--teagreen);
  background-color: rgba(15, 17, 21, 0.8);
  transition: all 0.3s ease;
  width: 100%;
}

.newsletter-input:focus {
  border-color: var(--jasper);
  box-shadow: 0 0 0 3px rgba(13, 153, 255, 0.15);
  background-color: rgba(15, 17, 21, 0.9);
  outline: none;
}

.newsletter-input::placeholder {
  color: rgba(245, 245, 245, 0.5);
}

.input-helper {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(245, 245, 245, 0.7);
  line-height: 1.4;
}

.newsletter-button {
  background: linear-gradient(45deg, var(--jasper) 0%, var(--jasper-light) 100%);
  color: #FFFFFF;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--primary-font);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.newsletter-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.newsletter-button:hover {
  background: linear-gradient(45deg, var(--jasper-light) 0%, var(--jasper) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 153, 255, 0.4);
}

.newsletter-button:hover::before {
  left: 100%;
}

.newsletter-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.newsletter-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.button-loading {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.newsletter-button.loading .button-text {
  display: none;
}

.newsletter-button.loading .button-loading {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  color: white;
}

@media (min-width: 480px) {
  .newsletter-form {
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .newsletter-input {
    margin-bottom: 0;
    flex: 1;
  }
  
  .newsletter-button {
    width: auto;
    min-width: 180px;
    flex-shrink: 0;
  }
}

.newsletter-button:focus {
  outline: 2px solid var(--jasper);
  outline-offset: 2px;
}

#mc_embed_signup_scroll {
  display: grid;
}

/* Fade-in animation for sections */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Animation delays */
header.fade-in { animation-delay: 0.2s; }
#newsletter-signup.fade-in { animation-delay: 0.4s; }
main.fade-in { animation-delay: 0.6s; }
footer.fade-in { animation-delay: 0.8s; }

/* Footer Styles */
#footer {
  grid-area: footer;
  width: 100%;
  margin-top: 2rem;
  padding: 3rem 0 2rem 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(8, 8, 8, 0.3) 30%,
    rgba(8, 8, 8, 0.5) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  #footer {
    margin-top: 2.5rem;
    padding: 4rem 0 2.5rem 0;
  }
}

.footer-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Footer brand icon styling handled by component */
.footer-brand brand-icon {
  margin: 0 0 2rem 0;
  display: block;
  padding: 2.5rem 0 0 0;
}

.philosophy {
  font-size: 1.125rem;
  color: var(--teagreen);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 3rem;
  opacity: 0.9;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  color: var(--teagreen);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  opacity: 0.8;
  position: relative;
  padding-bottom: 2px;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--jasper);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--jasper);
  opacity: 1;
}

.footer-links a:hover::after {
  width: 100%;
}

.copyright {
  font-size: 0.875rem;
  color: var(--teagreen);
  opacity: 0.6;
  margin: 0;
  text-align: center;
}

/* Mobile-first typography adjustments */
@media (max-width: 480px) {
  p, li { font-size: 0.9rem; line-height: 1.5; }
  
  /* Ensure all content fits within viewport */
  section, article, div {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Fix lead magnet styling */
  .lead-magnet {
    padding: 1rem;
  }
  
  .lead-magnet h3 {
    font-size: 1.1rem;
  }
  
  .value-prop {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* Intermediate mobile breakpoint for larger phones and small tablets */
@media (min-width: 481px) and (max-width: 640px) {
  body {
    font-size: 1rem;
  }
  
  p, li { font-size: 0.95rem; line-height: 1.6; }
  
  /* Container adjustments */
  .grid-container {
    padding: 0 1.25rem;
    gap: 1.5rem;
  }
  
  /* Navigation improvements */
  nav {
    padding: 0.75rem 1rem;
  }
  
  /* Button sizing */
  button {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  /* Form elements */
  input, textarea, select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 0.75rem;
  }
  
  /* Lead magnet adjustments */
  .lead-magnet {
    padding: 1.5rem;
  }
  
  .lead-magnet h3 {
    font-size: 1.25rem;
  }
  
  /* Code blocks */
  pre, code {
    font-size: 0.85rem;
  }
  
  /* Card components */
  .card, .post-card, .project-card {
    padding: 1.25rem;
  }
}

/* Tablet-specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
  body {
    font-size: 1.15rem;
  }
  
  .grid-container {
    padding: 0 1.5rem;
    gap: 1.75rem;
    max-width: 100%;
  }
  
  /* Ensure all sections stay within bounds */
  section, article, nav, header, main, footer, div[id] {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  /* Navigation adjustments */
  .navlist {
    gap: 3rem;
  }
  
  .nav-item {
    font-size: 1.25rem;
  }
  
  /* Ensure hamburger menu is visible on tablet */
  .nav-content {
    display: none;
  }
  
  .menu {
    display: block !important;
    z-index: 1001;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Section spacing */
  header, main, footer, #newsletter-signup, #contact {
    padding: 2.5rem 0;
  }
  
  /* Contact section */
  #contact {
    padding: 2rem;
  }
  
  /* Newsletter section */
  #newsletter-signup {
    padding: 2rem;
  }
  
  .lead-magnets {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* CTA button */
  .cta {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  #intro { justify-content: center; }
  .profile-image-container { display: none; }
}

@media (max-width: 850px) {
  .body--no-scroll { overflow: hidden; }
  .grid-container {
    padding: 0 1rem;
    gap: 0.75rem;
  }
  .grid-container.subpage {
    gap: 0.5rem;
  }
  nav {
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    gap: 1rem;
  }
  .nav-content {
    display: none;
  }
  .nav-content.nav-content--visible {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    background: linear-gradient(
      135deg,
      rgba(8, 8, 8, 0.98) 0%,
      rgba(15, 17, 21, 0.98) 50%,
      rgba(18, 22, 32, 0.98) 100%
    );
    backdrop-filter: blur(10px);
    padding: 4rem 2rem;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.4);
  }
  .navlist {
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 300px;
  }
  .nav-item {
    font-size: 2rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    padding: 0.5rem 1rem;
  }
  .nav-item:hover {
    opacity: 1;
  }
  
  /* Mobile active state enhancement */
  .nav-item a.active {
    color: var(--jasper);
    opacity: 1;
    font-weight: 600;
  }
  
  .nav-item a.active::before {
    content: '→';
    margin-right: 0.5rem;
    color: var(--jasper);
    font-weight: bold;
  }
  .menu {
    display: block;
    z-index: 1001;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .menu.menu--hide {
    display: none;
  }
  .close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 1002;
    padding: 0.75rem;
    background: transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
  }
  .close:hover {
    background: rgba(8, 8, 8, 0.8);
    box-shadow: 0 0 12px rgba(13, 153, 255, 0.2);
  }
  .close.close--visible {
    display: block;
  }
  .close .line {
    stroke: var(--heading-color);
    stroke-width: 2;
    stroke-linecap: round;
    transition: all 0.3s ease;
  }
  .close:hover .line {
    stroke: var(--jasper);
  }
  /* Summary styles now handled by hero-section component */
  p, li { font-size: 1rem; }
  li, ul { padding: 0; }
  #intro {
    padding: 2rem 0;
  }
  header, main, footer, #newsletter-signup {
    padding: 2rem 0;
  }
  .gradient-line {
    margin: 0;
  }
  #about-me {
    margin-bottom: 0;
  }
  #contact {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
  }
  #contact ul {
    padding: 0;
    margin: 1.5rem 0;
  }
  #contact li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
  }
  #newsletter-signup {
    margin: 1rem auto;
    padding: 1.5rem;
    border-radius: 8px;
  }
  .newsletter-input {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
  }
  .newsletter-button {
    margin-top: 0.5rem;
    padding: 0.75rem;
  }
  .nav-search-icon {
    display: none; /* Hide search on mobile */
  }
  
  /* Better mobile menu styling */
  .nav-content.nav-content--visible {
    animation: slideInLeft 0.3s ease-out;
  }
  
  @keyframes slideInLeft {
    from {
      left: -100%;
      opacity: 0;
    }
    to {
      left: 0;
      opacity: 1;
    }
  }
}

.cta h3, 
.cta p {
  background: linear-gradient(
    45deg,
    var(--jasper) 0%,
    var(--jasper-light) 50%,
    var(--heading-color) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 8s ease infinite;
}

.cta:hover h3,
.cta:hover p {
  background: linear-gradient(
    45deg,
    var(--jasper-light) 0%,
    var(--heading-color) 50%,
    var(--jasper) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Remove the text shadow since we're using gradient text */
.cta:hover {
  transform: translate(-4px, -4px);
}

.cta.scroll-active {
  color: var(--jasper);
  transform: translate(-4px, -4px);
}

.cta.scroll-active::before {
  transform: translate(8px, 8px);
}

.cta.scroll-active::after {
  transform: translate(4px, 4px);
}

.cta.scroll-active h3,
.cta.scroll-active p {
  background: linear-gradient(
    45deg,
    var(--jasper-light) 0%,
    var(--heading-color) 50%,
    var(--jasper) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Interactive Lead Magnet Cards */
.lead-magnet-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .lead-magnet-cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.lead-magnet-card {
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 17, 21, 0.8);
  border: 2px solid rgba(13, 153, 255, 0.2);
  backdrop-filter: blur(10px);
}

.lead-magnet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 153, 255, 0.4);
  box-shadow: 0 12px 32px rgba(13, 153, 255, 0.15);
}

.lead-magnet-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lead-magnet-card input[type="radio"]:checked + .card-content {
  background: rgba(13, 153, 255, 0.05);
  border-color: var(--jasper);
}

.lead-magnet-card input[type="radio"]:checked + .card-content .radio-indicator {
  background: var(--jasper);
  box-shadow: 0 0 0 2px rgba(13, 153, 255, 0.3);
}

.lead-magnet-card input[type="radio"]:checked + .card-content .radio-indicator::after {
  transform: translate(-50%, -50%) scale(1);
}

.card-content {
  position: relative;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  border-radius: 14px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}

.card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.card-header h3 {
  /* Follow global H3 hierarchy */
  color: #E9ECEF;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
  letter-spacing: -0.01em;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .card-header h3 {
    font-size: 1.6rem;
  }
}

.radio-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(13, 153, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.radio-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.card-content p {
  color: rgba(245, 245, 245, 0.85);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  flex: 1;
}

.card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.value-prop {
  display: inline-block;
  background: rgba(13, 153, 255, 0.1);
  color: var(--jasper-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  border: 1px solid rgba(13, 153, 255, 0.3);
  text-align: center;
}

.cta-text {
  color: var(--jasper);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.lead-magnet-card:hover .cta-text {
  color: var(--jasper-light);
  transform: translateX(4px);
}

.lead-magnet-card input[type="radio"]:checked + .card-content .cta-text {
  color: var(--jasper-light);
}

/* Newsletter Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.newsletter-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--teagreen, #F5F5F5);
  font-weight: 500;
}

.newsletter-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(13, 153, 255, 0.3);
  border-radius: 8px;
  background: rgba(15, 17, 21, 0.8);
  color: var(--teagreen, #F5F5F5);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--jasper, #0D99FF);
  box-shadow: 0 0 0 2px rgba(13, 153, 255, 0.2);
}

.resource-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(13, 153, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(15, 17, 21, 0.8);
}

@media (min-width: 768px) {
  .resource-option {
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
  }
}

.resource-option:hover {
  border-color: var(--jasper, #0D99FF);
  transform: translateY(-2px);
}

.resource-option input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(13, 153, 255, 0.3);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  background: var(--jasper, #0D99FF);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.resource-option input[type="radio"]:checked + .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.option-content {
  flex: 1;
}

.option-content strong {
  display: block;
  color: var(--teagreen, #F5F5F5);
  margin-bottom: 0.25rem;
}

.option-content span {
  display: block;
  color: var(--teagreen, #F5F5F5);
  opacity: 0.8;
  font-size: 0.9rem;
}

.form-responses {
  margin-top: 1rem;
}

.response {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
}

.response.error {
  background: rgba(255, 87, 87, 0.1);
  border: 1px solid rgba(255, 87, 87, 0.3);
  color: #ff5757;
}

.response.success {
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: #2ed573;
}

/* Mobile form adjustments */
@media (max-width: 480px) {
  .lead-magnet-cards {
    gap: 0.75rem;
    margin: 1.5rem 0;
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .card-header h3 {
    font-size: 1.2rem !important;
  }
  
  .card-content p {
    font-size: 0.9rem;
  }
  
  .value-prop {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
  }
  
  .cta-text {
    font-size: 0.875rem;
  }
  
  .newsletter-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    min-height: 48px;
  }
  
  .input-helper {
    font-size: 0.8rem;
  }
  
  #mc_embed_signup {
    padding: 0;
  }
  
  /* Footer mobile adjustments */
  #footer {
    padding: 3rem 0 1.5rem 0;
    margin-top: 2rem;
  }
  
  .philosophy {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .footer-links {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-links a {
    font-size: 0.9rem;
  }
  
  .copyright {
    font-size: 0.8rem;
    padding: 0 1rem;
  }
}

/* Section spacing enhancements */
#about-content {
  padding: 3rem 0;
  text-align: left; /* Reset to left align for body content */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  #about-content {
    padding: 4rem 0;
  }
}

/* About section component spacing and centering */
about-section {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  about-section {
    padding: 0 2rem;
  }
}

about-section > div {
  margin-bottom: 3rem;
}

about-section > div:last-child {
  margin-bottom: 0;
}

/* Ensure specific sections maintain their alignment */
about-section h2,
about-section h3 {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 768px) {
  about-section > div {
    margin-bottom: 4rem;
  }
}

/* Projects section spacing */
#projects {
  padding: 4rem 0;
  width: 100%;
  background: rgba(15, 17, 21, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  #projects {
    padding: 5rem 0;
  }
}

/* Projects section component spacing and centering */
projects-section {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  projects-section {
    padding: 0 2rem;
  }
}

projects-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--heading-color);
}

@media (min-width: 768px) {
  projects-section h2 {
    font-size: 3rem;
    margin-bottom: 4rem;
  }
}

projects-section .project-card {
  margin-bottom: 2rem;
}

projects-section .project-card:last-child {
  margin-bottom: 0;
}

/* Additional Resources Section Styling */
#additional-resources {
  padding: 3rem 0;
  max-width: 100%;
}

@media (min-width: 768px) {
  #additional-resources {
    padding: 4rem 0;
  }
}

#additional-resources h2 {
  font-size: 2.5rem;
  color: var(--heading-color);
  margin-bottom: 2rem;
  text-align: center;
}

.resource-category {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(15, 17, 21, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(13, 153, 255, 0.1);
}

.resource-category h3 {
  font-size: 1.5rem;
  color: var(--jasper);
  margin-bottom: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .resource-category h3 {
    font-size: 1.75rem;
  }
}

.resource-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(18, 22, 32, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(13, 153, 255, 0.05);
  transition: all 0.3s ease;
}

.resource-item:hover {
  border-color: rgba(13, 153, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(13, 153, 255, 0.1);
}

.resource-item:last-child {
  margin-bottom: 0;
}

.resource-item h4 {
  font-size: 1.25rem;
  color: var(--heading-color);
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .resource-item h4 {
    font-size: 1.375rem;
  }
}

/* Outcome Preview Section */
.outcome-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .outcome-preview {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    padding: 0;
  }
}

.outcome-stat {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(13, 153, 255, 0.05);
  border: 1px solid rgba(13, 153, 255, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.outcome-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 153, 255, 0.4);
  background: rgba(13, 153, 255, 0.08);
  box-shadow: 0 8px 24px rgba(13, 153, 255, 0.15);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--jasper);
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--jasper) 0%, var(--jasper-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 2.5rem;
  }
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--teagreen);
  line-height: 1.4;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 1rem;
  }
}

/* Enhanced Resource Categories */
.resource-category.primary-cta,
.resource-category.secondary-cta {
  position: relative;
  overflow: hidden;
}

.resource-category.primary-cta {
  background: linear-gradient(
    135deg,
    rgba(13, 153, 255, 0.1) 0%,
    rgba(13, 153, 255, 0.05) 100%
  );
  border: 2px solid rgba(13, 153, 255, 0.3);
}

.resource-category.secondary-cta {
  background: linear-gradient(
    135deg,
    rgba(13, 153, 255, 0.08) 0%,
    rgba(13, 153, 255, 0.03) 100%
  );
  border: 2px solid rgba(13, 153, 255, 0.25);
}

.resource-category.primary-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--jasper), var(--jasper-light), transparent);
  opacity: 0.8;
}

.resource-item.featured {
  background: rgba(15, 17, 21, 0.9);
  border: 1px solid rgba(13, 153, 255, 0.3);
  position: relative;
}

.resource-item.featured:hover {
  border-color: rgba(13, 153, 255, 0.5);
  box-shadow: 0 8px 24px rgba(13, 153, 255, 0.2);
}

.resource-type.active {
  background: rgba(13, 153, 255, 0.2);
  color: var(--jasper-light);
  border-color: rgba(13, 153, 255, 0.4);
  font-weight: 600;
}

.resource-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, var(--jasper) 0%, var(--jasper-light) 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.resource-cta:hover {
  background: linear-gradient(45deg, var(--jasper-light) 0%, var(--jasper) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 153, 255, 0.4);
  color: white;
}

.resource-cta:hover::before {
  left: 100%;
}

/* Mobile adjustments for new sections */
@media (max-width: 480px) {
  .outcome-preview {
    gap: 1rem;
    margin: 1.5rem 0;
  }
  
  .outcome-stat {
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
  
  .stat-label {
    font-size: 0.85rem;
  }
  
  .resource-cta {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* Final CTA Section */
.cta-section {
  background: linear-gradient(
    135deg,
    rgba(13, 153, 255, 0.08) 0%,
    rgba(13, 153, 255, 0.04) 100%
  );
  border: 2px solid rgba(13, 153, 255, 0.3);
  border-radius: 20px;
  padding: 3rem 2rem;
  margin: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--jasper), var(--jasper-light), transparent);
  opacity: 0.9;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 4rem 3rem;
  }
}

.cta-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

@media (min-width: 768px) {
  .cta-options {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .cta-options {
    gap: 3rem;
  }
}

.cta-option {
  padding: 2rem;
  border-radius: 16px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  box-sizing: border-box;
  width: 100%;
}

.cta-option.primary {
  background: rgba(13, 153, 255, 0.1);
  border: 2px solid rgba(13, 153, 255, 0.3);
}

.cta-option.secondary {
  background: rgba(13, 153, 255, 0.05);
  border: 2px solid rgba(13, 153, 255, 0.2);
}

.cta-option:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 153, 255, 0.5);
  box-shadow: 0 12px 32px rgba(13, 153, 255, 0.15);
}

.cta-option h3 {
  font-size: 1.25rem;
  color: var(--jasper);
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.cta-option p {
  color: var(--teagreen);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  opacity: 0.9;
  flex-grow: 1;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-button.primary {
  background: linear-gradient(45deg, var(--jasper) 0%, var(--jasper-light) 100%);
  color: white;
}

.cta-button.secondary {
  background: transparent;
  color: var(--jasper);
  border: 2px solid var(--jasper);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 153, 255, 0.3);
}

.cta-button.primary:hover {
  background: linear-gradient(45deg, var(--jasper-light) 0%, var(--jasper) 100%);
  color: white;
}

.cta-button.secondary:hover {
  background: rgba(13, 153, 255, 0.1);
  color: var(--jasper-light);
}

.cta-button:hover::before {
  left: 100%;
}

.trust-signals {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(13, 153, 255, 0.2);
}

.trust-signals p {
  color: var(--teagreen);
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
  line-height: 1.5;
}

/* Mobile adjustments for CTA section */
@media (max-width: 480px) {
  .cta-section {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .cta-option {
    padding: 1.5rem;
  }
  
  .cta-option h3 {
    font-size: 1.125rem;
  }
  
  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .trust-signals p {
    font-size: 0.85rem;
  }
  
  .choice-indicator {
    margin: 1.5rem 0;
    padding: 0.75rem;
  }
  
  .choice-indicator p {
    font-size: 1rem;
  }
  
  .option-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}



.resource-item p {
  color: var(--teagreen);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.resource-type {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(13, 153, 255, 0.1);
  color: var(--jasper);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(13, 153, 255, 0.2);
}

/* Section Header Styling - consistent across all pages */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--heading-color);
  margin: 0 0 1rem 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--teagreen);
  margin: 0;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 3rem;
  }
  
  .section-subtitle {
    font-size: 1.3rem;
    line-height: 1.7;
  }
}

@media (max-width: 850px) {
  .section-header h2 {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1.1rem;
  }
}

.section-intro {
  color: var(--teagreen);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero sections for subpages */
#about-hero, #blog-hero, #resources-hero {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Ensure direct children within hero sections are centered */
#about-hero > *, #blog-hero > *, #resources-hero > * {
  text-align: center;
}

@media (min-width: 768px) {
  #about-hero, #blog-hero, #resources-hero {
    padding: 3rem 1rem;
  }
}

#about-hero h1, #blog-hero h1, #resources-hero h1 {
  font-size: 3rem !important;
  color: #FFFFFF !important;
  margin: 0 0 1.5rem 0;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  text-align: center;
  width: 100%;
  text-shadow: 0 0 20px rgba(13, 153, 255, 0.3);
}

@media (min-width: 768px) {
  #about-hero h1, #blog-hero h1, #resources-hero h1 {
    font-size: 3.5rem !important;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
  }
}

#about-hero .lead, #blog-hero .lead, #resources-hero .lead,
#about-hero p, #blog-hero p, #resources-hero p {
  font-size: 1.2rem;
  color: var(--teagreen);
  max-width: 700px;
  margin: 0 auto 0 auto;
  padding: 0;
  line-height: 1.7;
  opacity: 0.9;
  text-align: center;
  display: block;
  width: 100%;
}

@media (min-width: 768px) {
  #about-hero .lead, #blog-hero .lead, #resources-hero .lead,
  #about-hero p, #blog-hero p, #resources-hero p {
    font-size: 1.3rem;
    line-height: 1.8;
  }
}

@media (max-width: 768px) {
  #additional-resources h2 {
    font-size: 2rem;
  }
  
  .resource-category {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .resource-category h3 {
    font-size: 1.3rem;
  }
  
  .resource-item {
    padding: 1rem;
  }
  
  .resource-item h4 {
    font-size: 1.1rem;
  }
  
  #about-hero h1, #blog-hero h1, #resources-hero h1 {
    font-size: 2.4rem !important;
    font-weight: 800 !important;
  }
  
  #about-hero .lead, #blog-hero .lead, #resources-hero .lead {
    font-size: 1.1rem;
  }
}

/* Enhanced Navigation Styling */
.nav-search-icon {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  overflow: visible;
  padding: 2px 0;
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--heading-color);
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: auto;
  width: 40px;
  height: 40px;
  position: relative;
  overflow: hidden;
  margin: 2px 0;
}

.search-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(13, 153, 255, 0.1) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.search-toggle:hover::before {
  width: 100%;
  height: 100%;
}

.search-toggle:hover {
  background: rgba(13, 153, 255, 0.05);
  border-color: rgba(13, 153, 255, 0.5);
  color: var(--jasper);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(13, 153, 255, 0.2);
}

.search-toggle:focus {
  outline: none;
  border-color: var(--jasper);
  box-shadow: 0 0 0 2px rgba(13, 153, 255, 0.2);
}

.search-toggle:active {
  transform: translateY(0);
}

.search-toggle svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

/* Search modal styles */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.search-modal-container {
  background: rgba(24, 28, 38, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.search-modal-overlay.active .search-modal-container {
  transform: translateY(0);
  opacity: 1;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(13, 153, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-color);
  outline: none;
  font-family: var(--font-family);
}

.search-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-modal-close {
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--jasper);
}

.search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.search-hint {
  color: rgba(255, 255, 255, 0.6);
}

.search-hint p {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  backdrop-filter: blur(10px);
}

.quick-link:hover {
  background: rgba(13, 153, 255, 0.1);
  border-color: rgba(13, 153, 255, 0.3);
  color: var(--jasper);
  transform: translateY(-1px);
}

.quick-link-icon {
  font-size: 1.25rem;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.search-result {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

.search-result:hover {
  background: rgba(13, 153, 255, 0.05);
  border-color: rgba(13, 153, 255, 0.3);
  transform: translateX(4px);
}

.search-result-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.search-result-title mark {
  background: rgba(13, 153, 255, 0.3);
  color: var(--heading-color);
  padding: 0.1em 0.2em;
  border-radius: 4px;
}

.search-result-path {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.search-no-results {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.search-no-results p:first-child {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.search-suggestion {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Breadcrumb styling in grid */
breadcrumb-nav {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.5rem 0;
}

/* Breadcrumb styling for subpages - positioned at bottom */
.subpage breadcrumb-nav {
  grid-area: breadcrumb;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .subpage breadcrumb-nav {
    padding: 3rem 0;
    margin-top: 4rem;
  }
}

/* Enhanced mobile navigation */
@media (max-width: 850px) {
  .nav-search-icon {
    display: none; /* Hide search on mobile */
  }
  
  /* Better mobile menu styling */
  .nav-content.nav-content--visible {
    animation: slideInLeft 0.3s ease-out;
  }
  
  @keyframes slideInLeft {
    from {
      left: -100%;
      opacity: 0;
    }
    to {
      left: 0;
      opacity: 1;
    }
  }
}



/* Quick access improvements */
.nav-item a {
  position: relative;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

/* Underline for primary nav items on hover (excluding active and social) */
.primary-nav .nav-item:not(.nav-search-icon) a:not(.active)::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--jasper);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}

.primary-nav .nav-item:not(.nav-search-icon) a:not(.active):hover::after {
  width: calc(100% - 2rem);
}

/* Focus improvements for accessibility */
.nav-item a:focus {
  outline: 2px solid var(--jasper);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Related content integration */
related-content {
  grid-column: 1 / -1;
  display: block;
  padding: 3rem 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

@media (min-width: 768px) {
  related-content {
    padding: 4rem 0;
  }
}

/* Better grid integration for subpages */
.subpage breadcrumb-nav {
  grid-area: auto;
}

.subpage related-content {
  grid-area: auto;
}

/* Add visual rhythm and separation to about page sections */
.subpage main > section {
  position: relative;
  overflow: visible;
}

/* Remove all gradient line styles - using ::after instead */
.gradient-line {
  display: none;
}

/* Add separator lines using ::after pseudo-elements for home page sections */
hero-section-enhanced::after {
  content: '';
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--jasper) 20%, 
    var(--jasper) 80%, 
    transparent 100%
  );
  opacity: 0.4;
}

#state-machine-education::after,
#contact::after {
  content: '';
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--jasper) 20%, 
    var(--jasper) 80%, 
    transparent 100%
  );
  opacity: 0.4;
}

@media (min-width: 768px) {
  hero-section-enhanced::after {
    bottom: -4rem;
  }
  
  #state-machine-education::after,
  #contact::after {
    bottom: -5rem;
  }
}

/* Add proper margins to home page sections */
hero-section-enhanced {
  margin-bottom: 6rem;
}

#state-machine-education,
related-content,
#contact {
  margin-bottom: 8rem;
}

#newsletter-signup {
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  hero-section-enhanced {
    margin-bottom: 8rem;
  }
  
  #state-machine-education,
  related-content,
  #contact {
    margin-bottom: 10rem;
  }
  
  #newsletter-signup {
    margin-bottom: 5rem;
  }
}

/* Add separator lines using ::after pseudo-elements for all hero sections */
.subpage #about-hero::after,
.subpage #blog-hero::after,
.subpage #resources-hero::after {
  content: '';
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--jasper) 20%, 
    var(--jasper) 80%, 
    transparent 100%
  );
  opacity: 0.4;
}

/* Add separators for content sections that need them */
.subpage #about-content::after,
.subpage #state-machine-deep-dive::after {
  content: '';
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--jasper) 20%, 
    var(--jasper) 80%, 
    transparent 100%
  );
  opacity: 0.4;
}

@media (min-width: 768px) {
  .subpage #about-hero::after,
  .subpage #blog-hero::after,
  .subpage #resources-hero::after {
    bottom: -4rem;
  }
  
  .subpage #about-content::after,
  .subpage #state-machine-deep-dive::after {
    bottom: -5rem;
  }
}

/* Add proper margins to sections to accommodate the ::after lines */
.subpage #about-hero,
.subpage #blog-hero,
.subpage #resources-hero {
  margin-bottom: 6rem;
}

.subpage #about-content,
.subpage #blog-content,
.subpage #state-machine-deep-dive {
  margin-bottom: 8rem;
}

/* No margin needed for last sections before footer */
.subpage #projects,
.subpage #additional-resources {
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .subpage #about-hero,
  .subpage #blog-hero,
  .subpage #resources-hero {
    margin-bottom: 8rem;
  }
  
  .subpage #about-content,
  .subpage #blog-content,
  .subpage #state-machine-deep-dive {
    margin-bottom: 10rem;
  }
  
  .subpage #projects,
  .subpage #additional-resources {
    margin-bottom: 5rem;
  }
}

/* Ensure all main content sections have consistent max-width and centering */
.subpage main > * {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .subpage main > * {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* First heading in any section should have reduced top margin */
section > h1:first-child,
section > h2:first-child,
section > h3:first-child,
section > .section-header h1:first-child,
section > .section-header h2:first-child,
section > .section-header h3:first-child {
  margin-top: 0;
}

/* Section headers within components should have less aggressive spacing */
.section-header h2 {
  margin: 0 0 1.5rem 0;
  /* Ensure hierarchy is maintained */
  font-size: 2rem !important;
  font-weight: 700 !important;
}

.section-header h3 {
  margin: 0 0 1rem 0;
  /* Ensure hierarchy is maintained */
  font-size: 1.4rem !important;
  font-weight: 600 !important;
}

@media (min-width: 768px) {
  .section-header h2 {
    margin: 0 0 2rem 0;
    font-size: 2.4rem !important;
  }
  
  .section-header h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.6rem !important;
  }
}

/* Mobile header size adjustments to prevent excessive spacing */
@media (max-width: 480px) {
  h1 { 
    font-size: 1.75rem;
    margin: 0 0 1rem 0;
  }
  h2 { 
    font-size: 1.4rem;
    margin: 2rem 0 1.25rem 0;
  }
  h3 { 
    font-size: 1.15rem;
    margin: 1.5rem 0 1rem 0;
  }
  h4 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.75rem 0;
  }
  
  /* Ensure all content fits within viewport */
  section, article, div {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Section headers on mobile should have minimal top spacing */
  .section-header h1,
  .section-header h2,
  .section-header h3 {
    margin-top: 0;
  }
  
  /* Ensure hierarchy on mobile by overriding component styles */
  h1 {
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    margin: 0 0 1rem 0;
  }
  
  /* Hero sections on mobile should maintain prominence */
  #about-hero h1, #blog-hero h1, #resources-hero h1 {
    font-size: 2.4rem !important;
    margin: 0 0 1rem 0;
    font-weight: 800 !important;
  }
  
  h2 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
  }
  
  h3 {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
  }
  
  h4 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
  }
}

/* Tablet-specific styles - ensure hamburger is visible on 768px-850px */
@media (min-width: 768px) and (max-width: 850px) {
  .nav-content {
    display: none;
  }
  
  .menu {
    display: block !important;
    z-index: 1001;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 850px) {
  .body--no-scroll { overflow: hidden; }
  .grid-container {
    padding: 0 1rem;
    gap: 0.75rem;
  }
  .grid-container.subpage {
    gap: 0.5rem;
  }
  nav {
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    gap: 1rem;
  }
  .nav-content {
    display: none;
  }
  .menu {
    display: block;
    z-index: 1001;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}