:root {
  color-scheme: light;
  --background: #f4f2ec;
  --foreground: #191a18;
  --muted: #6e706a;
  --subtle: #d9d6ce;
  --accent: #16777a;
  --focus: #0f777c;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #121412;
  --foreground: #efeee8;
  --muted: #a5a79f;
  --subtle: #343832;
  --accent: #78c8ca;
  --focus: #8dd9dc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--background);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.site-shell {
  width: min(100%, 90rem);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 5vw, 5rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-name:hover {
  color: var(--foreground);
}

.theme-toggle {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--foreground);
  background: color-mix(in srgb, var(--foreground) 7%, transparent);
}

.theme-icon {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

:root[data-theme='light'] .theme-icon-sun,
:root[data-theme='dark'] .theme-icon-moon {
  display: none;
}

.profile {
  width: min(100%, 52rem);
  margin: auto;
  display: grid;
  grid-template-columns: clamp(10rem, 24vw, 16rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
}

.profile-visual {
  width: 100%;
  margin: 0;
}

.profile-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 1.25rem;
  object-fit: cover;
}

.artwork-credit {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.artwork-credit a {
  color: inherit;
  text-decoration-color: var(--subtle);
  text-underline-offset: 0.2rem;
}

.artwork-credit a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.profile-copy {
  min-width: 0;
}

.introduction {
  margin: 0 0 0.15em;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 500;
}

.profile h1 {
  margin: 0;
  font-size: clamp(4rem, 10vw, 7.5rem);
  font-weight: 720;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.profile-summary {
  max-width: 31rem;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.65;
}

.site-footer {
  min-height: 2.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.35rem, 3vw, 2rem);
}

.social-link {
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
}

.social-link svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

a.social-link:hover {
  color: var(--accent);
}

a.social-link:hover svg {
  transform: translateY(-1px);
}

.social-link-placeholder {
  cursor: default;
  opacity: 0.48;
}

.error-content {
  width: 100%;
  margin: auto;
  text-align: center;
}

.error-shell {
  position: relative;
}

.error-shell .error-content {
  position: absolute;
  top: 50%;
  left: 50%;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
  transform: translate(-50%, -50%);
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-size: clamp(6rem, 22vw, 13rem);
  font-weight: 750;
  letter-spacing: -0.09em;
  text-indent: -0.09em;
  line-height: 0.8;
}

.error-content h1 {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.error-message {
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.65;
}

.home-link {
  width: fit-content;
  margin: 2rem auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--foreground);
  font-weight: 650;
  text-decoration-color: var(--subtle);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
}

.home-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.home-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

@media (max-width: 42rem) {
  .profile {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2rem;
    text-align: center;
  }

  .profile-visual {
    width: min(58vw, 13rem);
  }

  .profile-summary {
    max-width: 24rem;
    margin-inline: auto;
  }

  .site-footer {
    padding-top: 2rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body,
  .theme-toggle,
  .site-name,
  .social-link,
  .home-link {
    transition:
      color 140ms ease,
      background-color 140ms ease,
      transform 140ms ease;
  }

  .social-link svg {
    transition: transform 140ms ease;
  }
}
