:root {
  --ink: #1c1930;
  --muted: #667184;
  --paper: #fffafa;
  --cream: #fff3ee;
  --teal: #ff3d1c;
  --teal-dark: #10285d;
  --coral: #eb566c;
  --plum: #1c1930;
  --gold: #dca73a;
  --line: rgba(28, 25, 48, 0.12);
  --shadow: 0 22px 70px rgba(28, 25, 48, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.home-page {
  overflow: hidden;
}

.site-nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 0;
}

.site-nav .container {
  min-height: 64px;
  padding: 0 18px;
  background: rgba(16, 40, 93, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(28, 25, 48, 0.12);
  backdrop-filter: blur(18px);
}

.navbar-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-brand img {
  display: block;
  width: 200px;
  max-width: 52vw;
  height: auto;
}

.site-nav .logo-brand img {
  width: 176px;
}

.site-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 650;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: #ffd59b;
}

.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(28, 25, 48, 0.12);
}

.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 61, 28, 0.18);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-start;
  padding: 112px 0 44px;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(28, 25, 48, 0.92) 0%, rgba(16, 40, 93, 0.68) 46%, rgba(255, 61, 28, 0.18) 100%),
    url("https://images.unsplash.com/photo-1515488042361-ee00e0ddd4e4?auto=format&fit=crop&w=1800&q=82") center right / cover;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  z-index: -1;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0), var(--paper));
}

.hero-content {
  display: block;
}

.hero-copy {
  max-width: 940px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #ffd59b;
}

.hero-copy h1 {
  max-width: 920px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.03rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.hero-search,
.subscribe-box form {
  display: flex;
  width: min(100%, 660px);
  min-height: 62px;
  margin-top: 28px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-search input,
.subscribe-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--ink);
  font-size: 1rem;
}

.hero-search button,
.subscribe-box button {
  min-width: 128px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--coral);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.intro-band,
.browse-section,
.letters-section,
.newborn-section,
.subscribe-section {
  padding: 82px 0;
}

.intro-grid,
.newborn-grid,
.subscribe-box {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
}

.intro-grid h2,
.section-heading h2,
.newborn-grid h2,
.subscribe-box h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
}

.intro-copy p,
.newborn-grid p,
.site-footer p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.browse-section,
.newborn-section {
  background: #fff;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 32px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 61, 28, 0.34);
  box-shadow: 0 18px 46px rgba(28, 25, 48, 0.13);
}

.category-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.category-card.hindu .category-icon {
  background: var(--coral);
}

.category-card.sikh .category-icon {
  background: var(--gold);
}

.category-card.muslim .category-icon {
  background: var(--teal-dark);
}

.category-card strong {
  display: block;
  margin-top: 26px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.category-card small {
  color: var(--teal);
  font-weight: 850;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 8px;
}

.letter-grid a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.letter-grid a:hover {
  color: #fff;
  background: var(--teal);
}

.newborn-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.newborn-links a {
  min-height: 128px;
  display: flex;
  align-items: end;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-dark), var(--plum));
  font-size: 1.3rem;
  font-weight: 850;
  text-decoration: none;
}

.subscribe-section {
  background: var(--cream);
}

.subscribe-box form {
  margin-top: 0;
  box-shadow: 0 18px 46px rgba(28, 25, 48, 0.1);
}

.site-footer {
  padding: 58px 0 30px;
  color: #dbe7e4;
  background: #000;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.site-footer .footer-brand {
  color: #fff;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 850;
  text-transform: uppercase;
}

.site-footer a {
  display: block;
  margin-bottom: 9px;
  color: #dbe7e4;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffd59b;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom p {
  margin-bottom: 8px;
  color: rgba(219, 231, 228, 0.72);
  font-size: 0.84rem;
}

.results-page {
  min-height: 100vh;
  background: var(--paper);
}

.results-hero {
  padding: 132px 0 48px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(28, 25, 48, 0.96), rgba(16, 40, 93, 0.88), rgba(255, 61, 28, 0.48)),
    url("https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?auto=format&fit=crop&w=1600&q=82") center / cover;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: #ffd59b;
  font-weight: 800;
  text-decoration: none;
}

.results-hero h1 {
  max-width: 800px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
}

.results-search {
  display: flex;
  width: min(100%, 620px);
  min-height: 58px;
  margin-top: 26px;
  padding: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.results-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--ink);
}

.results-search button {
  min-width: 120px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--coral);
  font-weight: 850;
}

.results-list {
  padding: 48px 0 76px;
}

.results-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.results-count {
  color: var(--muted);
  font-weight: 700;
}

.view-switcher {
  display: inline-flex;
  gap: 8px;
  border: 1px solid rgba(28, 25, 48, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px;
}

.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(28, 25, 48, 0.18);
  border-radius: 999px;
  background: #f8f9fb;
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.view-button:hover {
  background: rgba(16, 40, 93, 0.12);
}

.view-button.active {
  background: var(--teal);
  color: #fff;
  border-color: transparent;
  transform: scale(1.05);
}

.view-button span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.name-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.name-card {
  min-height: 156px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.name-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(28, 25, 48, 0.12);
}

.name-card strong,
.name-card span,
.name-card p {
  display: block;
}

.hidden {
  display: none !important;
}

.name-table-wrapper {
  margin-top: 16px;
}

.name-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.name-table th,
.name-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(28, 25, 48, 0.08);
  text-align: left;
}

.name-table th {
  background: #f7f5f4;
  color: var(--ink);
  font-weight: 800;
}

.name-table tr:last-child td {
  border-bottom: none;
}

.name-table a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.name-table a:hover {
  color: var(--coral);
}

.name-card strong {
  font-size: 1.35rem;
}

.name-card span {
  margin-top: 6px;
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 850;
  text-transform: uppercase;
}

.name-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-page {
  min-height: 100vh;
  background: var(--paper);
}

.detail-hero {
  position: relative;
  padding: 132px 0 66px;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(28, 25, 48, 0.97), rgba(16, 40, 93, 0.82) 54%, rgba(255, 61, 28, 0.48)),
    url("https://images.unsplash.com/photo-1519689680058-324335c77eba?auto=format&fit=crop&w=1600&q=82") center / cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0), var(--paper));
}

.detail-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  gap: 34px;
  align-items: end;
}

.detail-copy h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
}

.native-name {
  margin: 14px 0 0;
  color: #ffd59b;
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 800;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-tags a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.detail-summary {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.detail-summary span {
  display: block;
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-summary strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.16;
}

.detail-content {
  padding: 66px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 22px;
  align-items: start;
}

.meaning-panel,
.facts-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(28, 25, 48, 0.08);
}

.meaning-panel {
  padding: 34px;
}

.meaning-panel h2,
.detail-actions-box h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.meaning-panel p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.85;
}

.facts-panel {
  padding: 24px;
}

.facts-panel h2 {
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 900;
}

.facts-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.facts-panel dl div {
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
}

.facts-panel dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.facts-panel dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 850;
}

.detail-actions-section {
  padding: 0 0 76px;
}

.detail-actions-box {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: 8px;
  background: var(--cream);
}

.detail-actions-box .results-search {
  margin-top: 0;
}

@media (max-width: 991px) {
  .site-nav {
    top: 10px;
  }

  .site-nav .container {
    margin: 0 12px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 104px;
  }

  .intro-grid,
  .newborn-grid,
  .subscribe-box,
  .footer-grid,
  .detail-hero-grid,
  .detail-layout,
  .detail-actions-box {
    grid-template-columns: 1fr;
  }

  .name-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .letter-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-bottom: 34px;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(28, 25, 48, 0.92), rgba(16, 40, 93, 0.72)),
      url("https://images.unsplash.com/photo-1515488042361-ee00e0ddd4e4?auto=format&fit=crop&w=900&q=80") center / cover;
  }

  .hero-copy h1 {
    font-size: 3.05rem;
  }

  .hero-search,
  .subscribe-box form,
  .results-search {
    display: grid;
    gap: 8px;
  }

  .hero-search input,
  .subscribe-box input,
  .results-search input {
    min-height: 50px;
  }

  .hero-search button,
  .subscribe-box button,
  .results-search button {
    min-height: 50px;
    width: 100%;
  }

  .intro-band,
  .browse-section,
  .letters-section,
  .newborn-section,
  .subscribe-section {
    padding: 58px 0;
  }

  .category-grid,
  .newborn-links {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 160px;
  }

  .letter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .name-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 118px 0 50px;
  }

  .detail-summary,
  .meaning-panel,
  .facts-panel,
  .detail-actions-box {
    padding: 20px;
  }
}
