/* about.css — David Rokhinson profile page + travel index.
   Layers on top of styles.css (shared header, section-heading, footer). */

/* ── Header: home / breadcrumb link ─────────────────────────────────────── */
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}
.home-link:hover { color: #fff; }
.home-link:hover .home-link__here { color: var(--pico-primary); }
.home-link__sep  { color: var(--pico-muted-color); font-weight: 400; }
.home-link__here { color: var(--pico-muted-color); font-weight: 600; transition: color 0.15s; }

/* ── Profile ────────────────────────────────────────────────────────────── */
.profile {
  position: relative; /* anchors the profile edit pencil (top-right) */
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0 1rem;
  padding: 1.75rem;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-card-border-color);
  border-radius: 20px;
}
.profile-edit-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--pico-card-border-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.profile-body { min-width: 0; }

.profile-name {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 0.15rem;
}
.profile-role {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pico-primary);
  margin: 0 0 0.9rem;
}
.profile-bio {
  font-size: 1rem;
  line-height: 1.6;
  color: #cfd0d6;
  margin: 0 0 1.1rem;
  max-width: 52ch;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #cfd0d6;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pico-card-border-color);
}
.profile-tags svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--pico-primary);
}

/* ── Section ────────────────────────────────────────────────────────────── */
.about-section { margin-top: 2.5rem; }

/* Heading + inline edit pencil sit on one row. The row owns the vertical
   rhythm the bare .section-heading used to carry. */
.section-head-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 2.25rem 0 1.1rem;
}
/* Add-trip button sits on the right edge of the Travel header, centered with
   the heading text (the row's align-items: center handles the vertical). */
.travel-add-btn { margin-left: auto; }
/* Bigger, real heading — override the shared eyebrow-style .section-heading
   (small/uppercase/muted) into a proper section title. */
.about-section .section-heading {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #fff;
  margin: 0;
}

/* ── Travel grid + cards ────────────────────────────────────────────────── */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.travel-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  /* `relative` anchors the live bubble and the upcoming band; `overflow: hidden`
     already clips both to the rounded corners. */
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  /* Wears the trip's colour preset — about-travel.js puts data-trip-theme on
     each card, and the token blocks live in person-travel.css (loaded here too).
     The three gradient stops ARE the trip page's ground mid / plate / deep, so
     a card and the page it opens read as the same object. */
  background: linear-gradient(135deg,
    var(--trip-ground-mid) 0%, var(--trip-plate) 55%, var(--trip-ground-deep) 100%);
  border: 1px solid var(--trip-card-border);
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.travel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--trip-card-border-hover);
}

/* ── Status: live ───────────────────────────────────────────────────────── */
/* A trip that's happening right now. Top-right corner of the card, over the
   body rather than the art column, so it never sits on top of a trip logo. */
.travel-card__live {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.45rem 0.18rem 0.38rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe9e0;
  background: rgba(196, 74, 46, 0.85);
  border: 1px solid rgba(255, 160, 130, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
/* The bubble is absolutely positioned, so the title has to be told to get out of
   its way — without this a title long enough to reach the corner runs straight
   underneath it. A floated spacer rather than padding-right, because the bubble
   only occupies the FIRST line: padding would indent every line and push a
   two-word title onto three of them. `height` is what keeps the float to that
   one line. */
.travel-card--live .travel-card__title::before {
  content: "";
  float: right;
  width: 3.1rem;
  height: 1.1em;
}
.travel-card__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd9cc;
  animation: travel-live-pulse 1.8s ease-in-out infinite;
}
@keyframes travel-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .travel-card__live-dot { animation: none; }
}

/* ── Status: upcoming ───────────────────────────────────────────────────── */
/* Rendered as a <div>, not an <a> — there is nothing to open yet. Muted, with
   the word across the card. */
.travel-card--upcoming {
  cursor: default;
  border-color: var(--trip-card-border-muted);
  /* No background here: .travel-card's themed gradient already applies, and
     restating it (as this rule used to) would pin every upcoming card to
     enamel regardless of its preset. */
}
.travel-card--upcoming:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--trip-card-border-muted);
}
/* Dim the card's own content, not the band on top of it. */
.travel-card--upcoming .travel-card__art,
.travel-card--upcoming .travel-card__body {
  opacity: 0.3;
  filter: grayscale(0.7);
}
.travel-card__upcoming {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The scrim is what makes it read as "not yet" rather than "broken", and what
     keeps the word legible over whatever title is dimmed behind it. */
  background: rgba(10, 20, 32, 0.55);
  font-size: 0.82rem;
  font-weight: 700;
  /* Trimmed at the narrow end of the grid (280px) so the tracking can't push
     the word past the card's edge. The matching padding-left re-centres it:
     letter-spacing leaves a gap after the last letter that would otherwise sit
     the word slightly left of centre. */
  letter-spacing: clamp(0.1em, 0.05em + 1.2vw, 0.34em);
  padding-left: clamp(0.1em, 0.05em + 1.2vw, 0.34em);
  text-transform: uppercase;
  color: rgba(234, 241, 247, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.travel-card__art {
  flex: none;
  width: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--trip-accent);
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
/* Trip with an icon_url. `contain`, not `cover`: these are logos and marks, and
   cropping one to fill the column cuts its wordmark off. The panel background
   stays: it's the dark surface a transparent logo is drawn against, and the
   fallback surface if the image fails to load and removes itself.

   The image is taken out of flow on purpose. In flow, a portrait icon's own
   height drives the art column and the card grows taller than its icon-less
   neighbours, leaving the grid ragged. Absolute inset:0 means the panel is
   sized only by the card body, and the icon fits whatever height that is
   (padding is on the image, which is border-box via styles.css). */
.travel-card__art--img {
  display: block;
  padding: 0;
  position: relative;
}
.travel-card__art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0.45rem;
  object-fit: contain;
  display: block;
}

.travel-card__body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.travel-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}
.travel-card__desc {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  color: rgba(214, 223, 231, 0.9);
}
.travel-card__cta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--trip-accent);
}

/* ── Edit pencils (profile + travel) ────────────────────────────────────── */
/* Small round pencil, styled to match the dark app controls. Shown only in
   admin edit mode — about-travel.js / about-profile.js toggle the [hidden] attr. */
.pa-edit-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #eaf1f7;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pa-edit-pencil:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); }
.pa-edit-pencil:active { transform: translateY(1px); }
.pa-edit-pencil svg { display: block; }
.pa-edit-pencil[hidden] { display: none; }

/* ── Bottom-center admin login dock ─────────────────────────────────────── */
.admin-dock {
  display: flex;
  justify-content: center;
  margin: 0 0 1.25rem;
}
/* The pill itself is the login/edit toggle. Label + accent reflect state:
   "Admin" (logged out) → "Logged in" → gold "Editing" (edit mode on). */
.admin-pill {
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  color: rgba(214, 223, 231, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.admin-pill:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); }
.admin-pill--editing {
  color: #f2d46b;
  background: rgba(242, 212, 107, 0.12);
  border-color: rgba(242, 212, 107, 0.5);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .profile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem;
  }
  .profile-photo { width: 160px; height: 160px; }
  .profile-name { font-size: 1.7rem; }
  .profile-bio { margin-left: auto; margin-right: auto; }
  .profile-tags { justify-content: center; }
  /* Keep the pencil clear of the centered photo/name. */
  .profile-edit-btn { top: 0.75rem; right: 0.75rem; }
}
