:root {
  --background: oklch(0.9711 0.0074 80.7211);
  --foreground: oklch(0.3000 0.0358 30.2042);
  --card: oklch(0.9711 0.0074 80.7211);
  --card-foreground: oklch(0.3000 0.0358 30.2042);
  --primary: oklch(0.5234 0.1347 144.1672);
  --primary-foreground: oklch(1.0000 0 0);
  --secondary: oklch(0.9571 0.0210 147.6360);
  --secondary-foreground: oklch(0.4254 0.1159 144.3078);
  --muted: oklch(0.9370 0.0142 74.4218);
  --muted-foreground: oklch(0.4495 0.0486 39.2110);
  --accent: oklch(0.8952 0.0504 146.0366);
  --accent-foreground: oklch(0.4254 0.1159 144.3078);
  --destructive: oklch(0.5386 0.1937 26.7249);
  --destructive-foreground: oklch(1.0000 0 0);
  --border: oklch(0.8805 0.0208 74.6428);
  --input: oklch(0.8805 0.0208 74.6428);
  --ring: oklch(0.5234 0.1347 144.1672);
  --font-sans: Montserrat, sans-serif;
  --font-serif: Merriweather, serif;
  --font-mono: "Source Code Pro", monospace;
  --radius: 0.5rem;
  --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 1px 2px -1px hsl(0 0% 0% / 0.10);
  --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 2px 4px -1px hsl(0 0% 0% / 0.10);
  --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.10), 0 8px 10px -1px hsl(0 0% 0% / 0.10);
  --focus-ring: 0 0 0 3px oklch(0.5234 0.1347 144.1672 / 0.24);
}

.dark {
  --background: oklch(0.2683 0.0279 150.7681);
  --foreground: oklch(0.9423 0.0097 72.6595);
  --card: oklch(0.3327 0.0271 146.9867);
  --card-foreground: oklch(0.9423 0.0097 72.6595);
  --primary: oklch(0.6731 0.1624 144.2083);
  --primary-foreground: oklch(0.2157 0.0453 145.7256);
  --secondary: oklch(0.3942 0.0265 142.9926);
  --secondary-foreground: oklch(0.8970 0.0166 142.5518);
  --muted: oklch(0.2926 0.0212 147.7496);
  --muted-foreground: oklch(0.8579 0.0174 76.0955);
  --accent: oklch(0.5752 0.1446 144.1813);
  --accent-foreground: oklch(0.9423 0.0097 72.6595);
  --destructive: oklch(0.5386 0.1937 26.7249);
  --destructive-foreground: oklch(0.9423 0.0097 72.6595);
  --border: oklch(0.3942 0.0265 142.9926);
  --input: oklch(0.3942 0.0265 142.9926);
  --ring: oklch(0.6731 0.1624 144.2083);
  --focus-ring: 0 0 0 3px oklch(0.6731 0.1624 144.2083 / 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  font-family: var(--font-sans);
  background: var(--background);
  transition: color 180ms ease, background-color 180ms ease;
}

a {
  color: var(--secondary-foreground);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.page {
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  align-items: center;
}

.profile {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--card-foreground);
  background: var(--card);
  box-shadow: var(--shadow-xl);
}

.profile__hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 270px;
  padding: 32px;
  color: oklch(0.9711 0.0074 80.7211);
  background: oklch(0.2157 0.0453 145.7256);
}

.profile__hero::before {
  position: absolute;
  inset: -18%;
  z-index: 0;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 18%, oklch(0.5752 0.1446 144.1813 / 0.48) 26%, transparent 38%),
    linear-gradient(68deg, transparent 0 24%, oklch(0.6731 0.1624 144.2083 / 0.30) 36%, transparent 50%),
    linear-gradient(156deg, oklch(0.2157 0.0453 145.7256), oklch(0.4254 0.1159 144.3078), oklch(0.2926 0.0212 147.7496));
  background-size: 170% 170%, 150% 150%, 100% 100%;
  animation: forest-flow 9s ease-in-out infinite alternate;
}

.profile__hero::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background:
    linear-gradient(90deg, oklch(0.2157 0.0453 145.7256 / 0.54), transparent 60%),
    linear-gradient(0deg, oklch(0.2157 0.0453 145.7256 / 0.30), transparent 70%);
  pointer-events: none;
}

.profile__hero-content {
  position: relative;
  z-index: 3;
}

.header-shader {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: oklch(0.2157 0.0453 145.7256);
  opacity: 1;
}

@keyframes forest-flow {
  0% {
    background-position: 0% 50%, 100% 35%, 50% 50%;
    transform: scale(1) translate3d(0, 0, 0);
  }

  100% {
    background-position: 100% 48%, 0% 62%, 50% 50%;
    transform: scale(1.04) translate3d(-1.5%, 1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile__hero::before {
    animation: none;
  }
}

.profile__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.profile__tag {
  padding: 7px 10px;
  border: 1px solid oklch(0.8970 0.0166 142.5518 / 0.28);
  border-radius: var(--radius);
  color: oklch(0.8970 0.0166 142.5518);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: oklch(0.2157 0.0453 145.7256 / 0.42);
  backdrop-filter: blur(12px);
}

.theme-toggle {
  width: 40px;
  min-height: 36px;
  padding: 0;
  border: 1px solid oklch(0.8970 0.0166 142.5518 / 0.28);
  border-radius: var(--radius);
  color: oklch(0.8970 0.0166 142.5518);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: oklch(0.2157 0.0453 145.7256 / 0.42);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.profile__header {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}

.avatar {
  width: 88px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: oklch(0.2157 0.0453 145.7256);
  font-size: 28px;
  font-weight: 800;
  background: oklch(0.9423 0.0097 72.6595 / 0.90);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 8px;
  color: oklch(0.8579 0.0174 76.0955);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.profile__role {
  margin: 10px 0 0;
  color: oklch(0.8970 0.0166 142.5518);
  font-size: 18px;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 32px 32px 0;
}

.field {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary);
  box-shadow: var(--shadow-xs);
}

.field--wide {
  grid-column: 1 / -1;
}

dt {
  margin-bottom: 10px;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

dd {
  margin: 0;
  min-height: 28px;
  font-size: 18px;
  line-height: 1.45;
}

.field dd:has(.status-switch) {
  display: grid;
  gap: 12px;
}

.status-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-width: 360px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
}

.status-switch__button,
.icon-button {
  min-height: 40px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  background: transparent;
  cursor: pointer;
}

.status-switch__button {
  padding: 8px 12px;
  font-weight: 700;
}

.status-switch__button.is-active {
  color: var(--primary-foreground);
  background: var(--primary);
}

.status-pill {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--accent-foreground);
  font-size: 14px;
  font-weight: 700;
  background: var(--accent);
}

.status-pill.is-muted {
  color: var(--destructive-foreground);
  background: var(--destructive);
}

.icon-button {
  margin-left: 8px;
  width: 40px;
  padding: 0;
  color: var(--accent-foreground);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  background: var(--accent);
}

.icon-button:hover,
.status-switch__button:hover {
  filter: brightness(0.97);
}

.profile__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding: 22px 32px 32px;
  color: var(--muted-foreground);
  font-size: 14px;
}

.copy-message {
  color: var(--secondary-foreground);
  font-weight: 700;
}

@media (max-width: 720px) {
  .page {
    padding: 20px 12px;
    align-items: start;
  }

  .profile {
    padding: 0;
  }

  .profile__toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile__hero,
  .details,
  .profile__footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .profile__hero {
    min-height: 320px;
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .details {
    padding-top: 20px;
  }

  .profile__footer {
    padding-bottom: 20px;
  }

  .profile__header,
  .details {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 72px;
    font-size: 24px;
  }

  .field--wide {
    grid-column: auto;
  }

  dd {
    font-size: 16px;
  }

  .status-switch {
    max-width: none;
  }
}
