:root {
  color-scheme: light;
  --color-oat: #f2efe8;
  --color-oat-strong: #e9e1d6;
  --color-mauve: #946f9d;
  --color-lavender: #bc97c2;
  --color-accent: #c07ed0;
  --color-plum: #7d6b7d;
  --color-ink: #352d35;
  --color-white: #fffdf9;
  --color-page-top: #fbf7f1;
  --color-page-bottom: #f5f0e8;
  --color-surface: rgba(255, 253, 249, 0.8);
  --color-surface-strong: rgba(255, 255, 255, 0.72);
  --color-surface-soft: rgba(242, 239, 232, 0.75);
  --color-border: rgba(148, 111, 157, 0.14);
  --color-border-strong: rgba(148, 111, 157, 0.18);
  --color-border-soft: rgba(148, 111, 157, 0.1);
  --color-text-muted: rgba(53, 45, 53, 0.82);
  --color-text-soft: rgba(53, 45, 53, 0.78);
  --color-nav-accent: rgba(148, 111, 157, 0.5);
  --shadow-soft: 0 24px 60px rgba(125, 107, 125, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-body: "Inter", sans-serif;
  --font-display: "Playfair Display", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-oat: #251f25;
    --color-oat-strong: #312833;
    --color-ink: #f4edf6;
    --color-white: #161116;
    --color-page-top: #161116;
    --color-page-bottom: #211924;
    --color-surface: rgba(33, 25, 36, 0.84);
    --color-surface-strong: rgba(44, 34, 47, 0.86);
    --color-surface-soft: rgba(49, 40, 51, 0.82);
    --color-border: rgba(188, 151, 194, 0.18);
    --color-border-strong: rgba(188, 151, 194, 0.24);
    --color-border-soft: rgba(188, 151, 194, 0.14);
    --color-text-muted: rgba(244, 237, 246, 0.84);
    --color-text-soft: rgba(244, 237, 246, 0.74);
    --color-nav-accent: rgba(188, 151, 194, 0.45);
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.34);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-oat: #251f25;
  --color-oat-strong: #312833;
  --color-ink: #f4edf6;
  --color-white: #161116;
  --color-page-top: #161116;
  --color-page-bottom: #211924;
  --color-surface: rgba(33, 25, 36, 0.84);
  --color-surface-strong: rgba(44, 34, 47, 0.86);
  --color-surface-soft: rgba(49, 40, 51, 0.82);
  --color-border: rgba(188, 151, 194, 0.18);
  --color-border-strong: rgba(188, 151, 194, 0.24);
  --color-border-soft: rgba(188, 151, 194, 0.14);
  --color-text-muted: rgba(244, 237, 246, 0.84);
  --color-text-soft: rgba(244, 237, 246, 0.74);
  --color-nav-accent: rgba(188, 151, 194, 0.45);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(192, 126, 208, 0.16),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      var(--color-page-top) 0%,
      var(--color-page-bottom) 100%
    );
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(188, 151, 194, 0.16), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(192, 126, 208, 0.12), transparent 20%);
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
  margin-bottom: 30px;
  padding: 18px 12px 6px;
}

.nav-utilities {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.nav-brand,
.nav-links a {
  color: var(--color-ink);
  text-decoration: none;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
  grid-column: 1;
  grid-row: 2;
  transition: transform 180ms ease, letter-spacing 180ms ease;
}

.nav-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(125, 107, 125, 0.86);
  grid-column: 1 / -1;
  grid-row: 1;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 111, 157, 0.14);
  grid-column: 1 / -1;
  grid-row: 3;
}

.nav-links a {
  position: relative;
  display: inline-block;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  transition: color 180ms ease, transform 180ms ease;
}

.nav-brand:hover,
.nav-brand:focus-visible {
  transform: translateY(-1px);
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-ink);
  transform: translateY(-1px);
}

.nav-links a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-links a:not(:last-child) {
  padding-right: 18px;
}

.nav-links a:not(:last-child)::before {
  right: 18px;
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before {
  transform: scaleX(1);
}

.nav-links a:not(:last-child)::after {
  content: "\2022";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: var(--color-nav-accent);
}

.theme-toggle {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--color-surface-strong);
  color: var(--color-ink);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform 220ms ease;
}

.language-button {
  min-width: 44px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-strong);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.language-button:hover,
.language-button:focus-visible,
.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: 0 16px 28px rgba(125, 107, 125, 0.16);
}

.theme-toggle:hover .theme-toggle-icon,
.theme-toggle:focus-visible .theme-toggle-icon {
  transform: rotate(18deg) scale(1.08);
}

.hero,
.section,
.profile-card {
  backdrop-filter: blur(10px);
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.profile-card,
.section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
}

.hero-copy {
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -18% -36% auto;
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 126, 208, 0.18), transparent 70%);
  pointer-events: none;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--color-plum);
}

.logo-preview {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.8rem);
  line-height: 0.92;
  font-weight: 400;
  letter-spacing: 0.015em;
  animation: hero-settle 700ms ease-out both;
}

.logo-so {
  color: var(--color-lavender);
}

.logo-ull {
  color: var(--color-mauve);
}

.lede {
  max-width: 44rem;
  margin: 24px 0 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  animation: fade-up 700ms 120ms ease-out both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  animation: fade-up 700ms 220ms ease-out both;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--color-mauve);
  color: var(--color-white);
  box-shadow: 0 10px 24px rgba(148, 111, 157, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 18px 32px rgba(148, 111, 157, 0.34);
}

.button-secondary {
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  background: var(--color-surface-strong);
}

.profile-card {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.profile-card:hover,
.profile-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
  box-shadow: 0 26px 56px rgba(125, 107, 125, 0.18);
}

.profile-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  background: var(--color-oat-strong);
  transition: transform 320ms ease, filter 320ms ease;
}

.profile-card:hover .profile-avatar,
.profile-card:focus-within .profile-avatar {
  transform: scale(1.02);
  filter: saturate(1.04);
}

.profile-handle,
.profile-name,
.profile-bio {
  margin: 0;
}

.profile-handle {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-plum);
}

.profile-name {
  margin-top: 10px;
  font-size: 1.4rem;
  font-weight: 600;
}

.profile-bio {
  margin-top: 10px;
  line-height: 1.7;
  color: var(--color-text-soft);
}

.section {
  margin-top: 28px;
  padding: 38px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.section:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
}

.section h2,
.section h3 {
  margin-top: 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 24px;
}

.section-heading h2,
.story h2 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
}

.section-heading p,
.story p {
  line-height: 1.75;
  color: var(--color-text-muted);
}

.story-grid {
  display: grid;
  gap: 18px;
}

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

.story-grid article {
  padding: 24px;
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
}

.story-grid article:hover,
.story-grid article:focus-within {
  transform: translateY(-6px);
  border-color: var(--color-border-strong);
  background: var(--color-surface-strong);
  box-shadow: 0 20px 36px rgba(125, 107, 125, 0.14);
}

.cards-3up article {
  min-height: 180px;
}

.back-to-top {
  position: fixed;
  right: 40px;
  bottom: 40px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface-strong);
  color: var(--color-ink);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
  cursor: pointer;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-settle {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ambient-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(0, -12px, 0) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 920px) {
  .hero,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    padding-top: 14px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-utilities {
    align-self: center;
  }

  .hero-copy,
  .section {
    padding: 28px;
  }

}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .hero-copy,
  .profile-card,
  .section {
    padding: 22px;
  }

  .logo-preview {
    font-size: 3.4rem;
  }

  .back-to-top {
    right: 22px;
    bottom: 22px;
  }
}
