/* =========================
   Home hero
   ========================= */

.home-hero {
  position: relative;
  overflow: hidden;
  margin: 0.75rem 0 2rem;
  padding: 2.75rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(0, 229, 255, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(103, 58, 183, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.92));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.home-hero__content {
  position: relative;
  z-index: 1;
}

.home-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 450;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-accent-fg-color);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.home-hero__subtitle {
  max-width: 48rem;
  margin: 1rem 0 1.5rem;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--md-default-fg-color--light);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* =========================
   Tile grid
   ========================= */

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

/* =========================
   Tile
   ========================= */

.tile {
  --tile-glow-x: 50%;
  --tile-glow-y: 50%;

  position: relative;
  display: block;
  overflow: hidden;
  padding: 1.2rem;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;

  border: 1px solid transparent;
  background:
    linear-gradient(rgba(20, 24, 38, 0.9), rgba(20, 24, 38, 0.9)) padding-box,
    linear-gradient(135deg, rgba(103, 58, 183, 0.35), rgba(0, 229, 255, 0.2)) border-box;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transform: translateY(0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  will-change: transform;
}

/* Glow layer */
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      240px circle at var(--tile-glow-x) var(--tile-glow-y),
      rgba(0, 229, 255, 0.12),
      transparent 45%
    );
  transition: opacity 180ms ease;
}

/* Soft highlight sheen */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.015) 38%,
    rgba(255, 255, 255, 0) 65%
  );
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.tile:hover::before,
.tile:focus-visible::before {
  opacity: 1;
}

.tile:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 3px;
}

.tile__icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  border-radius: 0.85rem;
  font-size: 1.3rem;
  line-height: 1;
  background: linear-gradient(
    135deg,
    rgba(103, 58, 183, 0.24),
    rgba(0, 229, 255, 0.16)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tile:hover .tile__icon,
.tile:focus-visible .tile__icon {
  transform: scale(1.06);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.08), 0 6px 18px rgba(0, 229, 255, 0.08);
}

.tile h3,
.tile p {
  position: relative;
  z-index: 1;
}

.tile h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.tile p {
  margin: 0;
  line-height: 1.6;
  color: var(--md-default-fg-color--light);
}

.tile--disabled {
  opacity: 0.58;
  pointer-events: none;
}

/* =========================
   Reduced motion support
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .tile,
  .tile__icon,
  .tile::before {
    transition: none;
  }

  .tile:hover,
  .tile:focus-visible {
    transform: none;
  }
}

/* =========================
   Small screens
   ========================= */

@media screen and (max-width: 600px) {
  .home-hero {
    padding: 2rem 1.25rem;
  }

  .tile {
    padding: 1rem;
  }
}

/* =========================
   Adding pictures
   ========================= */

.figure-box {
  display: inline-block;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 12px;

  /* Light background for contrast */
  background: rgba(255, 255, 255, 0.95);

  /* Optional: subtle border + shadow */
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.figure-box img {
  display: block;
  max-width: 100%;
  height: auto;
}

.figure-center {
  text-align: center;
}

.figure-caption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #444;
}

/* =========================
   Navigation
   ========================= */

.nav-footer {
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
}

/* BOTH buttons share this */
.nav-prev,
.nav-next {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.75rem 1.4rem;
  border-radius: 999px;

  font-weight: 600;
  text-decoration: none;

  /* 👇 purple text like your screenshot */
  color: var(--md-primary-fg-color); /* #b388ff; */

  /* 👇 dark glass background */
  background: rgba(255, 255, 255, 0.06);

  border: 1px solid rgba(255, 255, 255, 0.15);

  backdrop-filter: blur(6px);

  transition: 
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

/* Hover effect */
.nav-prev:hover,
.nav-next:hover {
  transform: translateY(-2px);

  background: rgba(255, 255, 255, 0.1);

  border-color: var(--md-primary-fg-color); /* #b388ff;rgba(179, 136, 255, 0.6); */

  box-shadow: 0 6px 18px rgba(179, 136, 255, 0.2);
}

/* Optional arrow animation */
.arrow {
  transition: transform 0.2s ease;
}

.nav-prev:hover .arrow {
  transform: translateX(-4px);
}

.nav-next:hover .arrow {
  transform: translateX(4px);
}

/* Footnote references */

a.footnote-ref {
  vertical-align: baseline;
  font-size: 1em;
  text-decoration: none;
}

a.footnote-ref::before {
  content: "[";
}

a.footnote-ref::after {
  content: "]";
}

/* Header */
h1 {
  color: var(--md-primary-fg-color);
}

.md-typeset h1 {
  color: var(--md-primary-fg-color);
}

h2 {
  color: var(--md-primary-fg-color);
}
