:root {
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #eff6ff;
  --text: #111827;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e5e7eb;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.13);
  --radius: 14px;
  --positive: #16a34a;
  --positive-bg: #dcfce7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: clip; }
body { overflow-x: clip; width: 100%; }
main { width: 100%; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  width: 100%;
  box-sizing: border-box;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 62px;
  gap: 2rem;
}
.logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo span { color: #374151; }
.header-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.header-nav a { font-size: 0.9rem; color: #374151; font-weight: 500; }
.header-nav a:hover { color: var(--primary); }
@media (max-width: 480px) {
  .header-nav { display: none; }
  .logo { font-size: 1.1rem; }
}

/* ── Footer ── */
.site-footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 5rem;
}

/* ── Utilities ── */
.container { max-width: 1200px; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; width: 100%; }

/* ════════════════════════════
   HOME PAGE
════════════════════════════ */

/* Hero */
.home-hero {
  background: linear-gradient(135deg, #0f2d6b 0%, #1a56db 60%, #3b82f6 100%);
  color: #fff;
  padding: 4rem 1rem 3.5rem;
  text-align: center;
  width: 100%;
  overflow: hidden;
}
.home-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}
.home-hero h1 .accent {
  color: #fbbf24;
  font-style: italic;
}
.home-hero p {
  font-size: 1.15rem;
  opacity: 0.88;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  padding: 0.75rem 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.hero-stat { text-align: center; padding: 0.5rem 1.25rem; }
.hero-stat strong { display: block; font-size: 1.4rem; font-weight: 900; line-height: 1; }
.hero-stat span { font-size: 0.75rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.07em; }
.hero-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.25); }
@media (max-width: 480px) {
  .hero-stats { border-radius: 16px; padding: 0.75rem 1rem; }
  .hero-stat-divider { display: none; }
  .hero-stat { padding: 0.25rem 0.75rem; }
}

/* Section headers */
.home-section { padding-top: 4rem; padding-bottom: 4rem; width: 100%; overflow: hidden; }
.home-section.container { padding-left: 1rem; padding-right: 1rem; }
.section-header { margin-bottom: 2rem; }
.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.section-sub { font-size: 0.95rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Photo card grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

.photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  color: inherit;
}
.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.photo-card-img {
  position: relative;
  aspect-ratio: 3/4;
  background: #e5e7eb;
  overflow: hidden;
}
.photo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s;
}
.photo-card:hover .photo-card-img img { transform: scale(1.04); }
.photo-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
}
.photo-card-placeholder svg { width: 60px; height: 60px; }

.photo-card-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10,20,50,0.85) 0%, transparent 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  padding: 1.5rem 0.75rem 0.6rem;
  text-align: center;
}

.photo-card-body {
  padding: 0.75rem 1rem 1rem;
}
.photo-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.photo-card-occ {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* About section */
.home-about {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 2.5rem;
  margin: 0 auto 4rem;
  max-width: 1200px;
  width: calc(100% - 2rem);
  box-sizing: border-box;
}
.home-about.container { padding-left: 2.5rem; padding-right: 2.5rem; width: calc(100% - 2rem); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-about, .home-about.container { padding: 1.5rem; margin: 0 1rem 3rem; width: calc(100% - 2rem); border-radius: 12px; }
}
.about-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
}
.about-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.about-categories h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.cat-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.cat-list li {
  font-size: 0.9rem;
  color: #374151;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 500;
}

/* ════════════════════════════
   PROFILE PAGE
════════════════════════════ */

.breadcrumb {
  padding: 1.25rem 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.875rem;
  color: var(--text-muted);
  width: 100%;
  box-sizing: border-box;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }

.profile-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: 2rem 1rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .profile-layout { grid-template-columns: 1fr; padding: 1.25rem 1rem 2rem; }

  /* On mobile: sidebar becomes a compact header row */
  .sidebar-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 1rem;
    align-items: start;
  }
  .avatar-photo {
    width: 90px;
    aspect-ratio: 1;
    border-radius: 8px;
    margin-bottom: 0;
  }
  .avatar-placeholder {
    width: 90px;
    aspect-ratio: 1;
    margin-bottom: 0;
  }
  .sidebar-info { display: flex; flex-direction: column; justify-content: center; }
  .sidebar-name { font-size: 1.1rem; text-align: left; }
  .sidebar-occupation { text-align: left; margin: 0.15rem 0 0.4rem; }
  .sidebar-net-worth { font-size: 1.4rem; text-align: left; }
  .sidebar-net-worth-label { text-align: left; }
  .info-list { grid-column: 1 / -1; }
}

.sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.avatar-photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.avatar-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.avatar-placeholder svg { width: 70px; height: 70px; }

.sidebar-name { font-size: 1.4rem; font-weight: 900; text-align: center; line-height: 1.2; }
.sidebar-occupation { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin: 0.4rem 0 1rem; }
.sidebar-net-worth { font-size: 2rem; font-weight: 900; color: var(--primary); text-align: center; line-height: 1; }
.sidebar-net-worth-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); text-align: center; margin-top: 4px; margin-bottom: 1.25rem; }

.info-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.info-list li { display: flex; justify-content: space-between; font-size: 0.875rem; }
.info-label { color: var(--text-muted); font-weight: 500; }
.info-value { font-weight: 600; color: var(--text); text-align: right; max-width: 55%; }

/* Main content */
.main-content { display: flex; flex-direction: column; gap: 1.75rem; }
.content-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  min-width: 0;
  overflow: hidden;
}
@media (max-width: 480px) {
  .content-card { padding: 1.25rem; }
}
.content-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bio-text { line-height: 1.8; color: #374151; font-size: 0.975rem; }

/* Earnings widget */
.earnings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 480px) {
  .earnings-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}
.earnings-item {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 1rem 0.75rem;
  text-align: center;
}
.earnings-value {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}
@media (max-width: 400px) {
  .earnings-value { font-size: 1rem; }
}
.earnings-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.earnings-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Wealth perspective */
.perspective-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.perspective-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #374151;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.perspective-list li:last-child { border-bottom: none; }
.persp-num {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary);
  min-width: 60px;
  text-align: right;
  flex-shrink: 0;
}

/* Timeline — desktop table */
.timeline-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.timeline-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.875rem; }

/* Timeline — mobile cards */
.timeline-cards { display: none; }

@media (max-width: 640px) {
  .timeline-wrap { display: none; }
  .timeline-cards { display: flex; flex-direction: column; gap: 0.75rem; }
}

.tl-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.tl-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.tl-year {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 38px;
}
.tl-amount {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
}
.tl-highlight {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.timeline-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--bg-alt);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.timeline-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.timeline-table tr:last-child td { border-bottom: none; }
.timeline-table tr:hover td { background: #f8fafc; }
.year-cell { font-weight: 800; color: var(--text); width: 60px; }
.amount-cell { font-weight: 800; color: var(--primary); width: 90px; }
.change-badge {
  display: inline-block;
  background: var(--positive-bg);
  color: var(--positive);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
}
.highlight-cell { color: var(--text-muted); font-size: 0.875rem; }
