:root {
  --bg: #f7f5f3;
  --ink: #0f0c0c;
  --muted: #5a5555;
  --accent: #9c0f0e;
  --accent-dark: #7a0c0b;
  --line: #e4dfdb;
  --panel: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(156, 15, 14, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 45%, #efecea 100%);
  font-family: "Barlow", "Segoe UI", sans-serif;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(8px);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.brand img {
  display: block;
  height: 40px;
  max-height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--accent); }
.main { width: min(860px, calc(100% - 32px)); margin: 28px auto 48px; flex: 1; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.lede { color: var(--muted); margin: 0 0 24px; max-width: 40rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
}
.form { display: grid; gap: 12px; max-width: 420px; }
label { font-weight: 600; font-size: 0.92rem; }
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { border-color: var(--ink); }
.flash {
  background: #eef7f0;
  border: 1px solid #cfe3d5;
  color: #215338;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 4px;
}
.errors {
  background: #fbeceb;
  border: 1px solid #efc7c5;
  color: #7a1614;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 4px;
}
.meta { color: var(--muted); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip {
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  background: #fff;
}
.avatar {
  width: 96px;
  height: 96px;
  max-width: 96px;
  max-height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  background: #ddd;
  flex-shrink: 0;
}
.profile-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}
.section { margin-top: 22px; }
.section h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer {
  border-top: 1px solid var(--line);
  padding: 16px 22px 24px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 640px) {
  .profile-head { flex-direction: column; align-items: flex-start; }
}
