/* ═══════════════════════════════════════════════════════════════
   profile.css — Profile Page (The Product)
   ═══════════════════════════════════════════════════════════════
   Layout: "Hollywood dossier" — photo on the left, information
   on the right, like a spy-film intelligence file. Restrained
   elegance, generous whitespace, no decorative clutter.
═══════════════════════════════════════════════════════════════ */


/* ── Page shell ──────────────────────────────────────────── */
.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ── Top bar ─────────────────────────────────────────────── */
/* Fixed bar across the very top of every profile page.
   Shows the UnfoundMe logo on the left and a user-menu
   (showing the signed-in user's name) on the right.        */
.profile-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  height: 60px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-med) var(--ease),
              border-color var(--duration-med) var(--ease);
}

.profile-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--size-lg);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -.01em;
}

.profile-topbar__brand:hover { color: var(--text-primary); }

/* The lock icon box in the brand */
.profile-topbar__icon {
  width: 26px;
  height: 26px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-inverse);
  flex-shrink: 0;
}

.profile-topbar__icon svg { width: 13px; height: 13px; }

.profile-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}


/* ── Page wrapper & card container ──────────────────────── */
/* profile-wrapper fills the space between the topbar and
   footer, and adds the page-level padding around the card.  */
.profile-wrapper {
  flex: 1;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
}

/* The card — white-glove "premium document" feel.
   overflow:hidden lets the cover photo fill the top corners. */
.profile-container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}


/* ── Cover banner ────────────────────────────────────────── */
/* Full-width strip between the topbar and profile content.
   Default is a dark gradient; profile.js sets background-image
   when the user has uploaded a cover photo.                   */
.profile-cover {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1c2237 0%, #161b2e 55%, #0d1120 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Bottom fade — smoothly blends the cover into the page bg */
.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(28,34,55,0.55) 100%);
  pointer-events: none;
}


/* ── Profile main container ──────────────────────────────── */
.profile-main {
  flex: 1;
  padding: var(--space-2xl) var(--space-xl) var(--space-2xl);
}


/* ── Profile header ──────────────────────────────────────── */
/* Round avatar on the left, fully visible below the cover banner.
   Name, headline, and location on the right, vertically centred. */
.dossier-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-3xl);
}

@media (max-width: 600px) {
  .dossier-header {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
}

/* Avatar column */
.dossier-photo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .dossier-photo { align-items: center; }
}

/* Round avatar — circle, sits fully below the cover banner */
.avatar-wrapper {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid var(--border);
  overflow: hidden;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .avatar-wrapper { width: 100px; height: 100px; }
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Information column */
.dossier-info {
  padding-top: 0;
}

/* A small all-caps label above the name — like a file category */
.profile-category {
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.profile-name {
  font-family: var(--font-display);
  font-size: var(--size-4xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: var(--space-sm);
}

.profile-headline {
  font-size: var(--size-base);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
  margin-top: var(--space-xs);
}

/* Location — pin icon + text, shown only when set */
.profile-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--size-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
}

.profile-location svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: .8;
}

@media (max-width: 600px) {
  .profile-name { font-size: var(--size-3xl); }
  .profile-headline { max-width: 100%; }
  .profile-location { justify-content: center; }
}

/* Thin divider line between header and content */
.profile-divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-lg) 0;
  opacity: .6;
}

@media (max-width: 600px) {
  .profile-divider { margin: var(--space-md) auto; }
}


/* ── Content sections ────────────────────────────────────── */
/* Each section is separated by generous whitespace and a
   thin bottom border — no heavy card backgrounds.           */
.section {
  margin-bottom: 3.5rem; /* 56px — generous breathing room between sections */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s var(--ease-out),
              transform .4s var(--ease-out);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section[data-visible="false"] { display: none; }

/* About */
.about-text {
  font-size: var(--size-base);
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 680px;
}


/* ── Services ────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

@media (min-width: 480px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

.service-card {
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) var(--ease);
}

.service-card:hover {
  border-color: var(--accent);
}

.service-card__icon {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.service-card__name {
  font-weight: 700;
  font-size: var(--size-sm);
  letter-spacing: .02em;
  margin-bottom: 4px;
}

.service-card__desc {
  font-size: var(--size-xs);
  color: var(--text-tertiary);
  line-height: 1.65;
}


/* ── Skills ──────────────────────────────────────────────── */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-lg);
}

.skill-pill {
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: border-color var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease);
  white-space: nowrap;
}

.skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ── Portfolio gallery ───────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color var(--duration-fast) var(--ease);
}

.gallery-item:hover {
  border-color: var(--accent);
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-item__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 10px;
  font-size: var(--size-xs);
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}

.gallery-item:hover .gallery-item__caption { opacity: 1; }


/* ── Qualifications ─────────────────────────────────────── */
.qualifications-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.qualification-item {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.qualification-item__name {
  font-family: var(--font-display);
  font-size: var(--size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2xs);
}

.qualification-item__meta {
  font-size: var(--size-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Year displayed as a small pill after the institution name */
.qualification-item__year {
  font-size: var(--size-xs);
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  letter-spacing: .03em;
}


/* ── Experience ──────────────────────────────────────────── */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.experience-item {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

/* Title and period on the same line */
.experience-item__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-2xs);
  flex-wrap: wrap;
}

.experience-item__title {
  font-family: var(--font-display);
  font-size: var(--size-base);
  font-weight: 600;
  color: var(--text-primary);
}

.experience-item__period {
  font-size: var(--size-xs);
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  letter-spacing: .03em;
  white-space: nowrap;
}

.experience-item__company {
  font-size: var(--size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.experience-item__desc {
  font-size: var(--size-sm);
  color: var(--text-tertiary);
  line-height: 1.65;
  margin-top: var(--space-xs);
}


/* ── Certifications ──────────────────────────────────────── */
.certifications-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.certification-item {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.certification-item__name {
  font-family: var(--font-display);
  font-size: var(--size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2xs);
}

.certification-item__meta {
  font-size: var(--size-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.certification-item__year {
  font-size: var(--size-xs);
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  letter-spacing: .03em;
}


/* ── Testimonials ────────────────────────────────────────── */
.testimonials-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  margin-top: var(--space-lg);
}

.testimonial {
  position: relative;
  padding-left: var(--space-lg);
}

/* Thin vertical accent line on the left — editorial quote style */
.testimonial::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: .4;
}

.testimonial__quote {
  font-family: var(--font-display);
  font-size: var(--size-lg);
  font-style: italic;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.testimonial__author {
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}


/* ── Contact section ─────────────────────────────────────── */
.contact-section {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.contact-btn svg { width: 15px; height: 15px; }

.contact-hint {
  font-size: var(--size-xs);
  color: var(--text-tertiary);
  margin-top: 12px;
  letter-spacing: .04em;
}


/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-med) var(--ease);
  cursor: zoom-out;
  padding: var(--space-lg);
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 12px 48px rgba(0,0,0,.8);
  transform: scale(.94);
  transition: transform .3s var(--ease);
}

.lightbox.open img { transform: scale(1); }


/* ── Footer ──────────────────────────────────────────────── */
.profile-footer {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--border-light);
  font-size: var(--size-xs);
  color: var(--text-tertiary);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.profile-footer a { color: var(--accent); }


/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
  .profile-cover { height: 140px; }
  .profile-wrapper { padding: 24px 16px; }
  .profile-container { border-radius: 10px; }
  .profile-main { padding: var(--space-xl) var(--space-md) var(--space-xl); }
  .section { margin-bottom: 2.5rem; } /* 40px on mobile */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-topbar { padding: 0 var(--space-md); }
}
