:root {
  --bg: #0a0c10;
  --card: #11141a;
  --card-hover: #171b22;
  --border: #21262d;
  --border-hover: #38414e;
  --text: #f0f3f6;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-bg: rgba(88, 166, 255, 0.12);
  --success: #3fb950;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fa;
    --card: #ffffff;
    --card-hover: #f3f4f6;
    --border: #d0d7de;
    --border-hover: #afb8c1;
    --text: #1f2328;
    --text-muted: #57606a;
    --accent: #0969da;
    --accent-bg: rgba(9, 105, 218, 0.1);
    --success: #1a7f37;
  }
}

[data-theme="light"] {
  --bg: #f6f8fa;
  --card: #ffffff;
  --card-hover: #f3f4f6;
  --border: #d0d7de;
  --border-hover: #afb8c1;
  --text: #1f2328;
  --text-muted: #57606a;
  --accent: #0969da;
  --accent-bg: rgba(9, 105, 218, 0.1);
  --success: #1a7f37;
}

[data-theme="dark"] {
  --bg: #0a0c10;
  --card: #11141a;
  --card-hover: #171b22;
  --border: #21262d;
  --border-hover: #38414e;
  --text: #f0f3f6;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-bg: rgba(88, 166, 255, 0.12);
  --success: #3fb950;
}

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

html {
  font-size: 115%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  transition: background 0.2s, color 0.2s;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle-wrapper {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
}

.theme-toggle-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.theme-toggle-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--card-hover);
}

.theme-toggle-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun {
    display: block;
  }
  :root:not([data-theme="dark"]) .icon-moon {
    display: none;
  }
}

.card-container {
  width: 100%;
  max-width: 27.5rem;
}

.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2.25rem 1.75rem 1.75rem;
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.15);
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
}

.avatar-wrapper {
  margin-bottom: 1.125rem;
}

.avatar-img {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  border: 2px solid var(--border);
  background: var(--card-hover);
  transition: border-color 0.2s;
}

.avatar-wrapper:hover .avatar-img {
  border-color: var(--accent);
}

.profile-name {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.profile-role-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-role-badge::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
}

.profile-location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.profile-location svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: currentColor;
}

.links-nav {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  transition: all 0.15s;
}

.link-item:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.link-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: var(--card-hover);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}

.link-item:hover .link-icon-box {
  color: var(--text);
}

.link-icon-box svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.link-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.link-title {
  font-size: 0.925rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

.link-handle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-right {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}

.link-item:hover .link-right {
  color: var(--text);
}

.link-right svg {
  width: 1rem;
  height: 1rem;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s;
}

.copy-btn:hover {
  color: var(--text);
}

.copy-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.toast-notification {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1.25rem);
  background: var(--card);
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 100;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: var(--success);
}

.profile-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.775rem;
  font-family: var(--font-mono);
}

.profile-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.profile-footer a:hover {
  color: var(--text);
}

@media (max-width: 32rem) {
  html {
    font-size: 105%;
  }

  body {
    padding: 1.25rem 0.875rem;
    justify-content: flex-start;
  }

  .theme-toggle-wrapper {
    top: 1rem;
    right: 1rem;
  }

  .profile-card {
    padding: 1.75rem 1.25rem 1.25rem;
  }

  .avatar-img {
    width: 6.5rem;
    height: 6.5rem;
  }

  .profile-name {
    font-size: 1.2rem;
  }

  .link-item {
    padding: 0.65rem 0.875rem;
  }

  .link-title {
    font-size: 0.875rem;
  }

  .link-handle {
    font-size: 0.72rem;
  }
}
