:root {
  /* Floral day palette */
  --title-strong: #25306b;
  --paper-shadow: rgba(73, 102, 186, 0.2);
  --bg-top: #fefeff;
  --bg-mid: #ffdff1;
  --bg-bottom: #cfe6ff;
  --ink: #1f2b5a;
  --muted: #4a5a95;
  --card: rgba(255, 255, 255, 0.9);
  --stroke: rgba(114, 144, 214, 0.36);
  --accent: #e85ca8;
  --accent-soft: #9fc0ff;
  --accent-bright: #5f8dff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Tiro Devanagari Marathi", serif;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.88), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(255, 205, 232, 0.5), transparent 34%),
    linear-gradient(150deg, var(--bg-top), var(--bg-mid) 48%, var(--bg-bottom));
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 460px;
  height: 460px;
  left: -150px;
  top: -130px;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.78) 0 22%, transparent 24%),
    radial-gradient(ellipse at center, rgba(255, 181, 220, 0.54) 0 20%, transparent 22%),
    radial-gradient(ellipse at center, rgba(162, 198, 255, 0.5) 0 18%, transparent 20%);
  background-size: 136px 136px;
  background-position: 0 0, 44px 24px, 90px 70px;
  filter: blur(0.25px);
  transform: rotate(-10deg);
  opacity: 0.88;
}

body::after {
  width: 560px;
  height: 560px;
  right: -220px;
  bottom: -240px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.64) 0 14%, transparent 16%),
    radial-gradient(circle at 68% 34%, rgba(255, 186, 226, 0.46) 0 12%, transparent 14%),
    radial-gradient(circle at 44% 74%, rgba(162, 198, 255, 0.42) 0 13%, transparent 15%),
    repeating-radial-gradient(circle at center, rgba(120, 161, 233, 0.16) 0 7px, transparent 8px 24px);
  transform: rotate(8deg);
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.52), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(255, 190, 226, 0.34), transparent 40%),
    radial-gradient(circle at 70% 78%, rgba(160, 203, 255, 0.32), transparent 38%);
  z-index: 0;
}

.hero,
main,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
}

.brand {
  margin: 0;
  font-family: "Marcellus", serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 700;
  text-shadow:
    0 2px 0 rgba(255, 233, 250, 0.9),
    0 8px 18px rgba(199, 62, 125, 0.35);
}

.theme-toggle {
  position: fixed;
  right: max(0.7rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 1000;
  border: 1px solid rgba(95, 132, 212, 0.44);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(224, 238, 255, 0.9));
  color: var(--ink);
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(71, 103, 186, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent-bright);
  box-shadow: 0 10px 18px rgba(71, 103, 186, 0.2);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.language-toggle {
  position: fixed;
  right: max(0.7rem, env(safe-area-inset-right));
  bottom: calc(max(0.9rem, env(safe-area-inset-bottom)) + 3.55rem);
  z-index: 1000;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(95, 132, 212, 0.44);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(224, 238, 255, 0.9));
  box-shadow: 0 10px 22px rgba(71, 103, 186, 0.2);
}

.language-option {
  border: 0;
  background: transparent;
  color: var(--ink);
  min-width: 2.2rem;
  height: 1.9rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.language-option.active {
  background: rgba(95, 141, 255, 0.22);
  color: var(--title-strong);
}

h1 {
  margin: 0.45rem 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--title-strong);
  background: linear-gradient(120deg, #f27dbf, #99bdfd, #688cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

body[data-theme="night"] {
  --title-strong: #ffe7ba;
  --paper-shadow: rgba(0, 0, 0, 0.38);
  --bg-top: #1a1742;
  --bg-mid: #3b1d67;
  --bg-bottom: #7e2b68;
  --ink: #fce9cf;
  --muted: #ffd9b0;
  --card: rgba(30, 17, 55, 0.78);
  --stroke: rgba(255, 190, 130, 0.3);
  --accent: #ffbd59;
  --accent-soft: #ff8a5d;
  --accent-bright: #ffd274;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(150deg, var(--bg-top), var(--bg-mid) 44%, var(--bg-bottom));
}

body[data-theme="night"]::before {
  background:
    radial-gradient(circle, rgba(255, 157, 84, 0.22) 0 28%, transparent 30%),
    radial-gradient(circle, rgba(255, 215, 132, 0.2) 0 28%, transparent 30%),
    radial-gradient(circle, rgba(255, 119, 167, 0.18) 0 28%, transparent 30%);
}

body[data-theme="night"]::after {
  background:
    repeating-radial-gradient(circle at center, rgba(255, 160, 102, 0.22) 0 8px, transparent 9px 24px),
    radial-gradient(circle at 50% 50%, rgba(255, 208, 125, 0.12), transparent 65%);
}

body[data-theme="night"] .backdrop {
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.12), transparent 33%),
    radial-gradient(circle at 84% 16%, rgba(255, 173, 93, 0.22), transparent 38%),
    radial-gradient(circle at 70% 78%, rgba(255, 87, 64, 0.2), transparent 36%);
}

body[data-theme="night"] .theme-toggle {
  border-color: rgba(255, 190, 130, 0.45);
  background: linear-gradient(135deg, rgba(44, 26, 74, 0.95), rgba(76, 35, 104, 0.9));
  color: #ffe8c8;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.44);
}

body[data-theme="night"] .language-toggle {
  border-color: rgba(255, 190, 130, 0.45);
  background: linear-gradient(135deg, rgba(44, 26, 74, 0.95), rgba(76, 35, 104, 0.9));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.44);
}

body[data-theme="night"] .language-option {
  color: #ffe8c8;
}

body[data-theme="night"] .language-option.active {
  background: rgba(255, 189, 89, 0.3);
  color: #fff4de;
}

body[data-theme="night"] .portrait {
  border-color: rgba(255, 217, 170, 0.85);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
}

body[data-theme="night"] .poem-grid a {
  border-color: rgba(255, 190, 130, 0.34);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 245, 225, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(49, 26, 80, 0.9), rgba(64, 24, 78, 0.86));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

body[data-theme="night"] .poem-grid a:hover {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 245, 225, 0.2), transparent 24%),
    linear-gradient(135deg, rgba(88, 36, 108, 0.95), rgba(120, 43, 110, 0.9));
}

body[data-theme="night"] .poem-text {
  border-left-color: rgba(255, 189, 89, 0.62);
  background: linear-gradient(90deg, rgba(255, 166, 92, 0.16), rgba(35, 18, 52, 0.08));
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

.portrait-wrap {
  display: flex;
  justify-content: center;
  animation: rise-in 900ms ease-out both;
}

.portrait {
  width: auto;
  max-width: min(360px, 88vw);
  max-height: 520px;
  height: auto;
  object-fit: contain;
  border-radius: 2rem;
  border: 5px solid rgba(255, 243, 223, 0.95);
  box-shadow: 0 24px 50px rgba(98, 26, 8, 0.3);
  background: linear-gradient(135deg, #ffe378, #ff8f54);
}

.hero-text {
  animation: rise-in 700ms ease-out both;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 1.2rem;
  padding: 1.4rem 1.2rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 30px var(--paper-shadow);
}

.card h2 {
  margin-top: 0;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
}

.bio p,
.collection p {
  color: var(--muted);
  line-height: 1.75;
}

.note {
  font-style: italic;
}

.bio-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(209, 75, 31, 0.45);
}

.quick-links {
  margin: 0.45rem 0 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.poem-grid {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.8rem;
}

.poem-grid li {
  min-width: 0;
}

.poem-grid a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  border: 1px solid rgba(172, 62, 23, 0.3);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.6), transparent 24%),
    linear-gradient(135deg, rgba(255, 248, 236, 0.95), rgba(255, 222, 162, 0.9));
  box-shadow: 0 8px 18px rgba(117, 45, 13, 0.12);
  transition: transform 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
  padding: 0.62rem 0.72rem;
  border-radius: 0.7rem;
  line-height: 1.45;
}

.poem-grid a:hover {
  color: var(--accent);
  border-color: var(--accent-bright);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.4), transparent 24%),
    linear-gradient(135deg, rgba(255, 236, 173, 0.95), rgba(255, 176, 109, 0.9));
  box-shadow: 0 12px 24px rgba(117, 45, 13, 0.22);
  transform: translateY(-2px);
}

footer {
  padding: 0 1.25rem 2rem;
  text-align: center;
  color: rgba(52, 18, 6, 0.8);
}

.footer-links {
  margin: 0.35rem 0 0;
  line-height: 1.75;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 18, 6, 0.3);
}

.footer-links a:hover {
  color: var(--accent);
  border-bottom-color: currentColor;
}

body[data-theme="night"] .footer-links a {
  border-bottom-color: rgba(255, 225, 184, 0.45);
}

.copyright {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

.poem-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.poem-page .card {
  padding: 2rem 1.5rem;
}

.poem-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0 0 0.5rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.poem-meta {
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.translation-note {
  margin: -0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid rgba(95, 132, 212, 0.5);
  background: linear-gradient(90deg, rgba(206, 228, 255, 0.55), rgba(255, 255, 255, 0));
  border-radius: 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

body[data-theme="night"] .translation-note {
  border-left-color: rgba(255, 189, 89, 0.62);
  background: linear-gradient(90deg, rgba(255, 166, 92, 0.16), rgba(35, 18, 52, 0.08));
}

.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
#goog-gt-tt {
  display: none !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

.poem-text {
  white-space: pre-wrap;
  line-height: 1.95;
  font-size: 1.12rem;
  padding: 0.85rem 0.85rem 0.85rem 1rem;
  border-left: 3px solid rgba(221, 63, 29, 0.52);
  background: linear-gradient(90deg, rgba(255, 211, 154, 0.42), rgba(255, 244, 227, 0));
  border-radius: 0.5rem;
}

.poem-line {
  display: block;
}

.poem-line-empty {
  min-height: 1.15em;
}

.back-link {
  display: inline-block;
  margin-top: 1.3rem;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid rgba(209, 75, 31, 0.45);
}

.back-link-top {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-weight: 700;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .subtitle {
    margin-inline: auto;
  }

  .poem-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  body::before,
  body::after {
    transform: scale(0.75);
  }
}
