:root {
  --bg-color: #0f1318;
  --bg-gradient: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12), transparent 75%);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --accent-color: #6366f1;
  --accent-hover: #818cf8;
  --tile-bg: rgba(255, 255, 255, 0.04);
  --tile-bg-hover: rgba(255, 255, 255, 0.08);
  --tile-border: rgba(255, 255, 255, 0.08);
  --tile-border-hover: rgba(129, 140, 248, 0.4);
  --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --glow-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

html,
body {
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  text-align: center;
  font-family:
    Montserrat,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  margin-top: 3rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Plush Bio Pill Badges */
.bio-tags {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin: 1rem auto 0 auto;
  max-width: 100%;
}

.bio-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 9999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 0.015em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  white-space: nowrap;
  text-align: center;
}

.bio-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(129, 140, 248, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.3),
    0 0 16px rgba(99, 102, 241, 0.25);
}

/* Plush Avatar Wrapper */
.avatar-wrapper {
  position: relative;
  display: inline-block;
}

.avatar-wrapper::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4), rgba(59, 130, 246, 0.4));
  filter: blur(8px);
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.avatar-wrapper:hover::before {
  opacity: 1;
}

.avatar {
  position: relative;
  width: 110px;
  height: 110px;
  vertical-align: middle;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.avatar:hover {
  transform: scale(1.04);
  box-shadow: 0 0 32px rgba(99, 102, 241, 0.4);
}

.mid-section {
  padding: 1rem 1.25rem 2.5rem 1.25rem;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  flex: 1;
}

/* Link Tiles Grid */
.link-tiles-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Base Link Tile override for MUI panel */
.link-tile {
  background: var(--tile-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--tile-border) !important;
  border-radius: 18px !important;
  padding: 1.15rem 1.35rem !important;
  margin-bottom: 0 !important;
  gap: 1rem !important;
  box-shadow: var(--glass-shadow) !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  position: relative;
  overflow: hidden;
  outline: none;
}

/* Featured Tile style highlight */
.link-tile.featured-tile {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08)) !important;
  border-color: rgba(129, 140, 248, 0.25) !important;
}

/* Tile Icon Container - Frameless Minimalist */
.tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--accent-hover);
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.tile-icon img,
.tile-icon svg {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Tile Content Text */
.tile-content {
  flex: 1;
  margin: 0;
}

.tile-content h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary) !important;
  margin: 0 0 0.25rem 0 !important;
  letter-spacing: -0.01em;
}

.tile-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
  line-height: 1.35;
}

/* Tile Arrow Indicator */
.tile-arrow {
  width: 20px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.35);
  -webkit-mask: url("/images/tile-arrow.svg") no-repeat center / contain;
  mask: url("/images/tile-arrow.svg") no-repeat center / contain;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}

/* Hover & Focus Micro-animations */
.link-tile:hover,
.link-tile:focus-visible {
  transform: translateY(-3px) scale(1.01);
  background: var(--tile-bg-hover) !important;
  border-color: var(--tile-border-hover) !important;
  box-shadow: var(--glass-shadow), var(--glow-shadow) !important;
}

.link-tile:hover .tile-icon,
.link-tile:focus-visible .tile-icon {
  background: transparent;
  color: #ffffff;
  transform: scale(1.12);
}

.link-tile:hover .tile-arrow,
.link-tile:focus-visible .tile-arrow {
  background-color: var(--accent-hover);
  transform: translate(3px, -3px);
}

.link-tile:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

/* Social Footer */
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0 2.5rem 0;
}

.social a {
  padding: 0.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.social a img {
  width: 32px;
  height: 32px;
  display: block;
  transition: transform 0.25s ease;
}

.social a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.social a:hover img {
  transform: scale(1.1);
}

/* Desktop & Larger Screens */
@media screen and (min-width: 680px) {
  .bio-tags {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.6rem;
  }

  .bio-tag {
    font-size: 0.825rem;
    padding: 0.38rem 0.9rem;
  }
}

@media screen and (min-width: 768px) {
  header {
    margin-top: 4rem;
    margin-bottom: 2.5rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .avatar {
    width: 206px;
    height: 206px;
  }

  .mid-section {
    max-width: 800px;
  }

  /* Grid layout option for desktop viewports */
  .link-tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  /* Span featured tile across full width */
  .link-tile.featured-tile {
    grid-column: 1 / -1;
  }
}

@media screen and (min-width: 1024px) and (min-height: 800px) {
  h1 {
    font-size: 2.6rem;
  }

  .avatar {
    width: 320px;
    height: 320px;
  }
}
