/* Couchsurfing-style clone */
:root {
  --cs-orange: #e55749;
  --cs-orange-dark: #c94638;
  --cs-teal: #2e7e7e;
  --ink: #1d1d1d;
  --muted: #6b6b6b;
  --line: #e6e4df;
  --bg: #faf8f4;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3 { margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--cs-orange-dark); }
h3 { font-size: 1rem; font-weight: 600; margin-top: 1.2em; }
p { margin: 0 0 .8em; }
a { color: var(--cs-orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { background: var(--cs-orange); color: #fff; }
.topbar-inner {
  max-width: 1040px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 8px; }
.brandlogo { width: 24px; height: 24px; background: #fff; border-radius: 6px; padding: 2px; }
.brand span { opacity: .7; font-weight: 400; }
.note { font-size: .85rem; opacity: .92; flex: 1; min-width: 200px; }
.topbar-link {
  color: #fff; background: rgba(0,0,0,.18); padding: 6px 12px;
  border-radius: 999px; font-size: .85rem; font-weight: 600;
  white-space: nowrap;
}
.topbar-link:hover { background: rgba(0,0,0,.3); text-decoration: none; }

.hero {
  background: linear-gradient(180deg, #fff 0, #f4efe7 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1040px; margin: 0 auto; padding: 36px 20px;
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
}
.avatar {
  width: 160px; height: 160px; border-radius: 50%;
  object-fit: cover; border: 4px solid #fff; box-shadow: var(--shadow);
  background: #ddd;
}
.avatar.placeholder { background: #ddd; }
.hero-text { flex: 1; min-width: 260px; }
.hero-text .username { color: var(--muted); font-size: .95rem; }
.hero-text .sub { color: var(--muted); margin-top: 4px; }
.hero-text .location { color: var(--ink); font-weight: 500; }

.verifs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.verif {
  background: #eef7f0; color: #2e7e4e; border: 1px solid #cfe6d4;
  padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
}

.profilenav {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.profilenav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-wrap: wrap;
}
.profilenav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 14px 14px; color: var(--ink); font-weight: 500;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.profilenav a:hover { color: var(--cs-orange-dark); border-bottom-color: var(--cs-orange); text-decoration: none; }
.profilenav .navcount {
  background: #f1ede4; color: var(--muted);
  font-size: .78rem; padding: 1px 8px; border-radius: 999px; font-weight: 600;
}
.counth {
  display: inline-block; margin-left: 6px; font-size: .9rem; vertical-align: middle;
  background: #f1ede4; color: var(--muted); padding: 2px 10px; border-radius: 999px; font-weight: 600;
}
.muted { color: var(--muted); }
section[id] { scroll-margin-top: 72px; }

.container { max-width: 1040px; margin: 0 auto; padding: 24px 20px 48px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px 24px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 640px) { .card.two-col { grid-template-columns: 1fr; } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.tag {
  background: #f1ede4; color: #5a4a30; font-size: .82rem;
  padding: 3px 10px; border-radius: 999px;
}

.kvlist { margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 520px) { .kvlist { grid-template-columns: 1fr; } }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-weight: 500; }

.refstats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill {
  background: #f4efe7; padding: 4px 12px; border-radius: 999px;
  font-size: .85rem; color: var(--muted);
}
.pill.positive { background: var(--cs-teal); color: #fff; font-weight: 600; }

.reflist { display: grid; gap: 14px; }
.ref { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fcfaf6; }
.ref header { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.refkind { font-weight: 600; color: var(--cs-orange-dark); }
.refbody p:last-child { margin-bottom: 0; }
.ref footer {
  margin-top: 10px; font-size: .88rem; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.refavatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; background: #eee; display: inline-block;
}
.refavatar.placeholder { background: #ddd; }
.response {
  margin-top: 10px; padding: 10px 12px;
  background: #fff; border-left: 3px solid var(--cs-orange); border-radius: 4px;
}

.triplist { display: grid; gap: 10px; }
.trip { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fcfaf6; }
.tripwhere { font-weight: 600; }
.tripwhen { font-size: .85rem; color: var(--muted); margin: 2px 0 6px; }
.tripdesc { font-size: .95rem; }

.friends {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.friend {
  display: block; color: inherit; text-align: center;
  padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px;
  background: #fcfaf6; transition: transform .15s ease, box-shadow .15s ease;
}
.friend:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.friend img, .friend .frimg {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; display: block; margin: 0 auto 8px; background: #eee;
}
.friname { font-weight: 600; font-size: .92rem; }
.frslug { font-size: .78rem; color: var(--muted); }
.ref footer a { color: var(--cs-orange-dark); font-weight: 600; }

.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.gallery img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px;
  display: block; background: #eee; transition: transform .15s ease;
}
.gallery a:hover img { transform: scale(1.02); }

.footer { background: #2a2a2a; color: #cfcfcf; margin-top: 40px; }
.footer-inner {
  max-width: 1040px; margin: 0 auto; padding: 18px 20px;
  font-size: .85rem;
}
