/* =========================================
   1. Global design tokens & theme
   ========================================= */

:root {
  /* Colors – light theme defaults */
  --color-bg: #f7f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #f0f2f8;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-accent: #2563eb;
  --color-accent-soft: rgba(37, 99, 235, 0.1);
  --color-border: #e5e7eb;

  /* Header/navigation background (opaque to avoid transparency issues) */
  --color-nav-bg: #f8fafc;

  /* Shadows */
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);

  /* Radii */
  --radius-lg: 1.25rem;
  --radius-md: 0.75rem;
  --radius-pill: 999px;

  /* Typography */
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease-out;

  /* Layout */
  --page-max-width: 1080px;
  --page-padding-x: 1.25rem;
  --page-padding-y: 1.5rem;

  /* Fixed header height – keep in sync with actual header size */
  --cm-header-height: 80px;

  /* Theme-aware page background (used by <body>) */
  --page-background: radial-gradient(circle at top, #e0edff 0, #f7f7fb 45%);
}

/* Explicit dark theme via data-theme attribute */
html[data-theme="dark"] {
  --color-bg: #020617;
  --color-surface: #020617;
  --color-surface-alt: #02081c;
  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-accent: #60a5fa;
  --color-accent-soft: rgba(96, 165, 250, 0.12);
  --color-border: #1f2937;
  --color-nav-bg: #020617;
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.7);

  /* Softer, subtle dark gradient background */
  --page-background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.1), transparent 55%),
    radial-gradient(
      circle at 100% 0%,
      rgba(139, 92, 246, 0.08),
      transparent 60%
    ),
    #020617;
}

/* Respect system preference on first load if no explicit theme chosen.
   This avoids the "light flash then dark" issue for dark-mode users. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --color-bg: #020617;
    --color-surface: #020617;
    --color-surface-alt: #02081c;
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;
    --color-accent: #60a5fa;
    --color-accent-soft: rgba(96, 165, 250, 0.12);
    --color-border: #1f2937;
    --color-nav-bg: #020617;
    --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.7);

    --page-background:
      radial-gradient(
        circle at 0% 0%,
        rgba(56, 189, 248, 0.1),
        transparent 55%
      ),
      radial-gradient(
        circle at 100% 0%,
        rgba(139, 92, 246, 0.08),
        transparent 60%
      ),
      #020617;
  }
}

/* =========================================
   2. Global reset / base
   ========================================= */

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

html,
body {
  margin: 0;
  padding: 0;
}

/* Main body setup – includes space for fixed header */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--page-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;

  /* Reserve space so fixed header doesn't overlap content */
  padding-top: var(--cm-header-height);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  display: block;
}

/* Main page container */
.page-shell {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-padding-y) var(--page-padding-x) 3.5rem;
}

/* =========================================
   3. Top navigation / header
   ========================================= */

/* Fixed header that stays on top across scroll */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;

  background: var(--color-nav-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);

  /* For subtle scroll animation */
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    background var(--transition-med);
}

.site-header-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0.75rem var(--page-padding-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Nav container */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Wrapper for inline links – currently empty (all links live in .nav-menu) */
.site-nav-links {
  display: none;
}

/* Mobile menu button (hamburger) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  cursor: pointer;
  padding: 0;
  outline: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform 80ms ease-out;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
  position: relative;
  transition:
    transform var(--transition-med),
    background var(--transition-med);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
  transition:
    transform var(--transition-med),
    opacity var(--transition-med);
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

/* Active (X) state for mobile menu button */
.nav-toggle.is-open span {
  transform: rotate(45deg);
}

.nav-toggle.is-open span::before {
  transform: rotate(-90deg) translateX(-5px);
}

.nav-toggle.is-open span::after {
  opacity: 0;
}

/* Nav menu – shared for mobile + desktop.
   Mobile: fixed overlay under header.
   Desktop: becomes inline via media query. */
.nav-menu {
  position: fixed;
  top: var(--cm-header-height);
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--transition-med),
    opacity var(--transition-med),
    visibility var(--transition-med);
}

.nav-menu-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0.75rem var(--page-padding-x) 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-menu a {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  color: var(--color-text-muted);
}

.nav-menu a span.label {
  font-weight: 500;
}

.nav-menu a span.pill {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.nav-menu a.is-active {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* Open state (mobile) */
.nav-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  outline: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform 80ms ease-out;
}

.theme-toggle-icon {
  font-size: 0.85rem;
}

/* Focus states */
.nav-toggle:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Subtle header animation on scroll */
.site-header--scrolled {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
}

/* Slightly tighter padding when scrolled to feel “compressed” */
.site-header--scrolled .site-header-inner {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

/* =========================================
   4. Hero / page header section
   ========================================= */

.page-hero {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr);
  gap: 1.8rem;
  align-items: center;
}

.page-hero-text {
  background: radial-gradient(
    circle at top left,
    var(--color-accent-soft),
    transparent 55%
  );
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.page-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.page-title {
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.hero-pill {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.02);
  color: var(--color-text-muted);
}

/* Hero actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    transform 80ms ease-out,
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-outline:hover {
  background: rgba(148, 163, 184, 0.1);
}

.hero-card {
  border-radius: var(--radius-lg);
  padding: 0.9rem 0.85rem;
  background: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  font-size: 0.8rem;
}

.hero-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

/* =========================================
   5. Generic sections / cards
   ========================================= */

.section {
  margin-top: 2.2rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.section-grid {
  display: grid;
  gap: 0.9rem;
}

.card {
  display: block;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.9rem 0.9rem 0.85rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  transition:
    transform 120ms ease-out,
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 45px rgba(15, 23, 42, 0.16);
  border-color: var(--color-accent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.card-body {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.card-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Badge when used inside tag row */
.card-tags .project-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.project-badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
/* PRIVATE */
.meta-private {
  color: #8a3b12;
  background: rgba(255, 165, 0, 0.15);
  border-color: rgba(255, 165, 0, 0.35);
}
html[data-theme="dark"] .meta-private {
  color: #e0e7ff; /* soft indigo text */
  background: rgba(79, 70, 229, 0.18); /* indigo, calmer than blue */
  border-color: rgba(79, 70, 229, 0.5);
}

/* OSS */
.meta-oss {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

.meta-public {
  color: #1e3a8a;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
}

.meta-on-demand {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.35);
  font-style: italic;
}
/*status*/
.meta-status {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.meta-status.completed {
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

/*Confidence */
.meta-confidence {
  color: #065f46;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
}

.meta-confidence.experimental {
  color: #92400e;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.35);
}

/* Scope */
.meta-scope {
  color: #334155;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.35);
}

/*Dark THeme override*/
html[data-theme="dark"] .project-badge {
  background-opacity: 0.22; /* conceptual – real change below */
  filter: none; /* remove brightness hacks */
}
html[data-theme="dark"] .meta-public {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
}
html[data-theme="dark"] .meta-on-demand {
  color: #e0e7ff;
  background: rgba(129, 140, 248, 0.22);
  border-color: rgba(129, 140, 248, 0.45);
  font-style: italic;
}

html[data-theme="dark"] .meta-status {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.45);
}

html[data-theme="dark"] .meta-status.completed {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.45);
}
html[data-theme="dark"] .meta-oss {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.45);
}
html[data-theme="dark"] .meta-confidence {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.22);
  border-color: rgba(22, 163, 74, 0.45);
}
html[data-theme="dark"] .meta-confidence.experimental {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.22);
  border-color: rgba(234, 179, 8, 0.45);
}
html[data-theme="dark"] .meta-scope {
  color: #e5e7eb;
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.4);
}

/* INTERNAL */
.badge-internal {
  color: var(--badge-internal-text, #084298);
  background: var(--badge-internal-bg, rgba(13, 110, 253, 0.15));
  border-color: var(--badge-internal-border, rgba(13, 110, 253, 0.35));
}

/* =========================================
   Private badge — dark theme override
   ========================================= */
html[data-theme="dark"] .badge-private {
  color: #c7d2fe; /* soft indigo text */
  background: rgba(99, 102, 241, 0.15); /* indigo wash */
  border-color: rgba(99, 102, 241, 0.35);
}

/* Also cover system dark mode (no explicit toggle yet) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .badge-private {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
  }
}

/* =========================================
   6. Contact form
   ========================================= */

.contact-form {
  margin-top: 1.2rem;
  padding: 1rem 0.9rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
}

.form-row label {
  font-size: 0.8rem;
  font-weight: 500;
}

.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid var(--color-border);
  background: rgba(15, 23, 42, 0.02);
  color: var(--color-text);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-soft);
}

.form-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* =========================================
   7. Footer
   ========================================= */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1rem var(--page-padding-x) 1.4rem;
  background: radial-gradient(
    circle at bottom,
    rgba(37, 99, 235, 0.18),
    transparent 50%
  );
}

.site-footer-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* =========================================
   8. Responsive breakpoints
   ========================================= */

@media (min-width: 640px) {
  .page-hero {
    grid-template-columns: minmax(0, 1.5fr);
  }

  .page-title {
    font-size: 1.9rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .section-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* Tablet / small laptop */
@media (min-width: 768px) {
  .page-shell {
    padding: 2.25rem var(--page-padding-x) 4rem;
  }

  .page-hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 1.75rem;
  }

  .site-header-inner {
    padding-block: 0.8rem;
  }

  /* Desktop nav:
     - Hamburger hidden
     - Nav menu always visible and inline under header */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    border-bottom: 0;
    background: transparent;
  }

  .nav-menu-inner {
    padding: 0;
    flex-direction: row;
  }

  .nav-menu a {
    padding-inline: 0.7rem;
    font-size: 0.8rem;
  }

  .theme-toggle {
    font-size: 0.78rem;
  }

  /* Scroll state padding tweak (desktop) */
  .site-header--scrolled .site-header-inner {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
}

/* Larger desktops */
@media (min-width: 1024px) {
  .page-title {
    font-size: 2.1rem;
  }

  .page-subtitle {
    max-width: 34rem;
  }

  .section {
    margin-top: 2.6rem;
  }

  .site-header-inner {
    padding-inline: 0;
  }

  .page-shell {
    padding-inline: 0;
  }
}

/* =========================================
   CTA buttons in main content (View all / View roles / Contact me)
   Keep labels single-line and visually consistent on mobile
   ========================================= */

main a[href$="projects/index.html"],
main a[href$="/projects"],
main a[href$="companies/index.html"],
main a[href$="/companies"],
main a[href$="contact.html"],
main a[href$="/contact"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Keep text on one line */
  white-space: nowrap;

  /* Make their widths feel consistent */
  min-width: 9.5rem; /* increase to 10rem or 11rem if you still see wrapping */
  padding-inline: 1.1rem; /* mild extra breathing room */

  /* Inherit your existing button style (border, background, etc.),
     so we only control sizing/behavior, not colors. */
}

/* Contact Form */
.email-fallback p {
  margin: 8px 0;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.85rem;
}

/* ================================
   Copy Email Toast
================================ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111827;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Email fallback (contact page) */
.email-fallback {
  margin-top: 16px;
}

.card-muted {
  background: var(--color-surface-alt);
  border: 1px dashed var(--border-muted);
}

.fallback-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.fallback-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.text-muted {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Email fallback close icon */
.email-fallback {
  position: relative;
}

.fallback-close {
  position: absolute;
  top: 10px;
  right: 12px;

  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;

  color: var(--color-text-muted);
}

.fallback-close:hover {
  color: var(--color-text);
}

#emailFallback {
  position: relative; /* Ensure the container div is the reference point for positioning */
}

#closeFallback {
  position: absolute;
  top: 10px; /* Distance from the top of the container */
  right: 10px; /* Distance from the right edge of the container */
  background: transparent; /* Remove button background */
  border: none; /* Remove border */
  font-size: 16px; /* Adjust size of the cross icon */
  cursor: pointer; /* Pointer cursor to indicate it's clickable */
  padding: 5px; /* Add some padding to make the button area larger */
}

#closeFallback:hover {
  color: #ff0000; /* Optional: change the icon color on hover */
}
/* Make sure the fallback container has relative positioning */
#emailFallback {
  position: relative; /* Ensure the container div is the reference point for positioning */
}

/* Close button styles */
#closeFallback {
  position: absolute;
  top: 10px; /* Distance from the top of the container */
  right: 10px; /* Distance from the right edge of the container */
  background: transparent; /* Remove button background */
  border: none; /* Remove border */
  font-size: 16px; /* Adjust size of the cross icon */
  cursor: pointer; /* Pointer cursor to indicate it's clickable */
  padding: 5px; /* Add some padding to make the button area larger */
}

/* Hover effect for the close button */
#closeFallback:hover {
  color: #ff0000; /* Optional: change the icon color on hover */
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
  /* Adjust the close button for smaller screens */
  #closeFallback {
    top: 5px; /* Reduce space from the top */
    right: 5px; /* Reduce space from the right */
    font-size: 14px; /* Make the icon smaller on mobile */
  }

  /* Ensure fallback div has enough padding on mobile */
  #emailFallback {
    padding: 10px;
  }
}

/* Hero aside (optional illustration / stats) */
.page-hero-aside {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: inherit;
}
