/* A quiet grid, editorial typography, and animated cyan highlights. */
:root {
  color-scheme: light;
  --paper: #f8f9fb;
  --ink: #505274;
  --heading: #3d3f64;
  --highlight: #26DAE0;
  --grid: rgba(87, 104, 134, 0.14);
  font-family: "Poppins", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  margin: 0;
  padding: clamp(64px, 8vh, 112px) 28px 80px;
  font-size: 17px;
  line-height: 1.8;
}

/* Decorative layers stay behind the content and never intercept clicks. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse at 90% 15%, #000 5%, rgba(0, 0, 0, 0.45) 50%, transparent 85%);
  mask-image: radial-gradient(ellipse at 90% 15%, #000 5%, rgba(0, 0, 0, 0.45) 50%, transparent 85%);
}

body::after {
  background-image:
    linear-gradient(rgba(154, 216, 191, 0.18), rgba(154, 216, 191, 0.18)),
    linear-gradient(rgba(109, 119, 171, 0.07), rgba(109, 119, 171, 0.07)),
    linear-gradient(rgba(154, 216, 191, 0.13), rgba(154, 216, 191, 0.13));
  background-size: 79px 79px;
  background-position: 1041px 161px, 1121px 321px, 961px 481px;
  background-repeat: no-repeat;
}

main {
  width: calc(100% - clamp(0px, 8vw, 128px));
  max-width: 850px;
  margin-left: clamp(0px, 8vw, 128px);
  animation: arrive 650ms ease-out both;
}

h1 {
  margin: 0 0 clamp(36px, 6vh, 64px);
  color: var(--heading);
  font-family: inherit;
  font-size: clamp(44px, 6vw, 56px);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

h1 span {
  color: #73af99;
}

p {
  margin: 0 0 28px;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--heading);
  font-weight: 600;
}

a,
.highlight {
  color: #30394a;
  text-decoration: none;
  background-image: linear-gradient(var(--highlight), var(--highlight));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.32em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 220ms ease, color 220ms ease;
}

a:hover,
a:focus-visible,
.highlight:hover {
  color: #183e31;
  background-size: 100% 100%;
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid #508a75;
  outline-offset: 4px;
}

::selection {
  color: #263e35;
  background: #c6e9db;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  main {
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  body {
    padding: 56px 24px;
    font-size: 17px;
    line-height: 1.8;
  }

  body::before {
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }

  a,
  .highlight {
    transition: none;
  }
}

/* Compact language controls, separate from the highlighted content links. */
.language-switch {
  position: absolute;
  top: 16px;
  right: clamp(24px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 1;
}

.language-switch[hidden] {
  display: none;
}

.language-switch > span {
  opacity: 0.45;
}

.language-switch button {
  min-width: 44px;
  min-height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.language-switch button:hover,
.language-switch button[aria-pressed="true"] {
  color: var(--heading);
  text-decoration-color: var(--highlight);
}

.language-switch button:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .language-switch {
    top: 8px;
  }
}
