:root {
  --bg: #0f1320;
  --card-bg: #171d2d;
  --text: #f4f7ff;
  --muted: #b5c0dd;
  --outline: #8ea3ff;
  --card-border: #2a3352;
  --button-text: #fcc111;
  --button-bg: rgb(15 19 32 / 50%);
  --button-border: #fcc111;
  --button-hover-bg: rgb(252 193 17 / 16%);
  --button-hover-text: #ffd44f;
  --button-hover-inset: rgb(252 193 17 / 28%);
  --social-icon-filter: brightness(0) invert(1);
  --toggle-bg: rgb(15 19 32 / 74%);
  --toggle-border: #3b4a73;
  --toggle-text: #e9efff;
}

:root[data-theme="light"] {
  --bg: #0f1320;
  --card-bg: #f8f9ff;
  --text: #182031;
  --muted: #3f4d68;
  --outline: #4d67b5;
  --card-border: #ced7ee;
  --button-text: #c98300;
  --button-bg: rgb(255 255 255 / 66%);
  --button-border: #d2900f;
  --button-hover-bg: rgb(252 193 17 / 20%);
  --button-hover-text: #b47200;
  --button-hover-inset: rgb(201 131 0 / 24%);
  --social-icon-filter: none;
  --toggle-bg: rgb(255 255 255 / 78%);
  --toggle-border: #c6d2ee;
  --toggle-text: #243251;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-image: url("assets/yarpbot-pattern.gif");
  background-color: var(--bg);
  background-position: center;
  background-repeat: repeat;
  background-size: cover;
  background-attachment: scroll;
  color: var(--text);
}

.page {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.profile-card {
  width: min(92vw, 28rem);
  min-height: min(68vh, 38rem);
  background: color-mix(in srgb, var(--card-bg), black 8%);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 10px 30px rgb(0 0 0 / 35%);
  display: flex;
  flex-direction: column;
}

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.brand-logo {
  width: min(88%, 12.5rem);
  height: auto;
  margin-top: 0.1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.tagline {
  margin: 0.4rem 0 1.2rem;
  color: var(--muted);
}

.link-list {
  display: grid;
  gap: 0.7rem;
  width: 100%;
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
}

.primary-links {
  margin-top: auto;
  margin-bottom: auto;
}

.link-button {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  color: var(--button-text);
  background: var(--button-bg);
  padding: 0.8rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid var(--button-border);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.link-button:hover {
  background: var(--button-hover-bg);
  color: var(--button-hover-text);
  box-shadow: 0 0 0 1px var(--button-hover-inset) inset;
}

.link-button:focus-visible,
.social-link:focus-visible {
  outline: 2px solid var(--outline);
  outline-offset: 2px;
}

.social-section {
  padding-top: 1rem;
  text-align: center;
}

.social-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.15rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 0;
}

.social-link:hover {
  filter: brightness(1.2);
}

.social-link img {
  width: 1.85rem;
  height: 1.85rem;
  filter: var(--social-icon-filter);
  transition: transform 160ms ease;
}

.social-link:hover img {
  transform: scale(1.1);
}

@media (min-width: 40rem) {
  .profile-card {
    padding: 1.6rem 1.5rem;
  }
}
