/* ═══════════════════════════════════════════════════════════════
   HERO — photo RIGHT, text LEFT (mirrors kamingfung.github.io)
   ═══════════════════════════════════════════════════════════════ */
.profile-hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin: 2rem 0 2rem;
}

/* Text column grows to fill available space */
.profile-text {
  flex: 1 1 0;
  min-width: 0;
}

.profile-text h1 {
  margin-top: 0;
  margin-bottom: 0.15rem;
  font-size: 2rem;
  line-height: 1.2;
}

.profile-text h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 400;
  color: var(--md-default-fg-color--light);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* Photo column — fixed width, floats right */
.profile-photo {
  flex: 0 0 200px;
}

.profile-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   SOCIAL ICON BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.social-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

/* Each social link rendered as a small round icon button */
.social-bar a.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.3em 0.75em;
  border-radius: 2em;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--md-primary-fg-color);
  color: var(--md-primary-fg-color);
  transition: background 0.15s, color 0.15s;
}

.social-bar a.social-btn:hover {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

.social-bar a.social-btn .twemoji,
.social-bar a.social-btn svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* ═══════════════════════════════════════════════════════════════
   INTERESTS + EDUCATION — side-by-side below the hero
   ═══════════════════════════════════════════════════════════════ */
.bio-lower {
  display: flex;
  gap: 3rem;
  margin: 0.5rem 0 1.5rem;
  align-items: flex-start;
}

.bio-col {
  flex: 1 1 0;
  min-width: 0;
}

.bio-col h2 {
  margin-top: 0;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-default-fg-color--light);
  border-bottom: 2px solid var(--md-primary-fg-color);
  padding-bottom: 0.3em;
  margin-bottom: 0.8em;
}

/* ── Interests chips ─────────────────────────────────────────── */
.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.interest-chip {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  border-radius: 2em;
  padding: 0.25em 0.85em;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Education list ──────────────────────────────────────────── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.edu-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 0.1em;
}

.edu-body {
  font-size: 0.9rem;
  line-height: 1.5;
}

.edu-body strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.1em;
}

.edu-period {
  font-size: 0.8rem;
  color: var(--md-default-fg-color--light);
}

.edu-note {
  margin: 0.25em 0 0;
  font-size: 0.82rem;
  color: var(--md-default-fg-color--light);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   BLOG & PAPER CARDS — tighten up grid card descriptions
   ═══════════════════════════════════════════════════════════════ */
.blog-cards .md-typeset,
.paper-cards .md-typeset {
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — stack vertically on small screens
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-width: 640px) {
  .profile-hero {
    flex-direction: column-reverse;   /* photo on top when stacked */
    align-items: center;
    text-align: center;
  }

  .profile-photo img {
    width: 160px;
    height: 160px;
  }

  .social-bar {
    justify-content: center;
  }

  .bio-lower {
    flex-direction: column;
    gap: 1.5rem;
  }

  .interest-chips {
    justify-content: center;
  }
}
