:root {
  --bg: #0b0d10;
  --bg-elevated: #14171c;
  --border: #23272e;
  --text: #e8eaed;
  --text-muted: #9aa1ab;
  --accent: #6ea8fe;
  --accent-hover: #8fbcff;
  --danger: #f28b82;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

header.hero {
  text-align: center;
  margin-bottom: 48px;
}

.logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 20px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}

.logo-fallback {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #3d63c9);
  color: #0b0d10;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

header.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

header.hero .domain {
  color: var(--text-muted);
  font-size: 0.95rem;
}

section {
  margin-bottom: 40px;
}

section h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 16px;
}

#bio {
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-2px);
}

.links a svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.projects {
  display: grid;
  gap: 14px;
}

.project-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.project-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.project-card a {
  color: var(--accent);
  font-size: 0.88rem;
  text-decoration: none;
}

.project-card a:hover {
  color: var(--accent-hover);
}

.empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 64px;
}

footer a {
  color: var(--text-muted);
}

/* Admin panel */
.admin-wrap {
  max-width: 640px;
}

.card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 16px 0 6px;
}

label:first-child {
  margin-top: 0;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 10px 16px;
  transition: border-color 0.15s ease;
}

button:hover {
  border-color: var(--accent);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0d10;
  font-weight: 600;
}

button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button.danger {
  color: var(--danger);
}

.row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.row input {
  flex: 1;
}

.repeatable-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.status-msg {
  font-size: 0.85rem;
  margin-top: 10px;
}

.status-msg.ok {
  color: #81c995;
}

.status-msg.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}
