:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --text: #1c1f26;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #400500;
  --accent-soft: #eaf0fe;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card-bg: #1c1f26;
    --text: #f2f3f5;
    --muted: #9aa1ac;
    --border: #2b2f38;
    --accent: #400500;
    --accent-soft: #1f2a44;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.logo { height: 28px; width: auto; display: block; }

.brand { font-weight: 600; font-size: 1.05rem; }

.content {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
/*  background-image: url('bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1; */
  pointer-events: none;
}

.state {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin: 0 auto;
  color: var(--muted);
}
.state.error { color: #dc2626; }

.card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 720px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.identity {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 { margin: 0; font-size: 1.3rem; }
h2 { font-size: 1rem; margin: 28px 0 12px; }
.muted { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.field { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; }
.label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.value { font-size: 0.95rem; word-break: break-word; }

.field-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: min(340px, calc(100vw - 64px));
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.55;
  white-space: pre-line;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.field:hover .field-tooltip,
.field:focus-within .field-tooltip,
.field.tooltip-open .field-tooltip {
  opacity: 1;
  visibility: visible;
}

.licenses, .links { display: flex; flex-direction: column; gap: 10px; }

.license-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.license-name { font-weight: 600; font-size: 0.9rem; }

.link-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s ease;
}
.link-item:hover { border-color: var(--accent); }
.link-title { font-weight: 600; font-size: 0.9rem; color: var(--accent); }
.link-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 18px; }
  .card { padding: 22px; }
}
