/* =========================================
   IceTeaMacchiato — About Page
   ========================================= */

/* ── Page-level overrides ────────────────── */

body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Header / nav ────────────────────────── */

.about-header {
  position: relative;
  z-index: 70;
  background: var(--color-bg);
  transition: background-color 0.2s ease;
}

.about-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--nav-padding);
}

.about-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.brand-sep {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 1.2rem;
}

.brand-title {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

[data-lang="zh"] .brand-title {
  font-family: var(--font-zh);
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}

.home-link {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  gap: 0.6em;
}

.home-link:hover {
  opacity: 0.55;
}

.home-link .logo-en {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  white-space: nowrap;
}

/* ── Main layout ─────────────────────────── */

.about-main {
  padding: 2rem 3rem 5rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* ── Text column ─────────────────────────── */

.about-text {
  display: flex;
  flex-direction: column;
  gap: 3.75rem;
}

.about-section-title {
  font-family: var(--font-en);
  font-weight: 650;
  font-size: 1.45rem;
  letter-spacing: 0.075em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

[data-lang="zh"] .about-section-title {
  font-family: var(--font-zh);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

.about-bio-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  line-height: 1.7;
}

.about-bio-body p {
  margin: 0;
  letter-spacing: 0.02em;
}

/* ── Contact section ─────────────────────── */

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  line-height: 1.6;
}

.contact-item {
  margin: 0;
}

.contact-label {
  color: var(--color-text);
}

.contact-link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.contact-link:hover {
  opacity: 0.6;
}

/* Noto Sans Mono for English text in ZH contact section */
[data-lang="zh"] .contact-mono {
  font-family: 'Noto Sans Mono', 'Courier New', monospace;
  letter-spacing: 0.01em;
}

/* Inline QR code trigger button */
.qr-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.qr-trigger:hover {
  opacity: 0.6;
}


/* ── Visual column ───────────────────────── */

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.about-img-container {
  background: #f0f0f0;
  border-radius: 0.8rem;
  overflow: hidden;
  line-height: 0;
  aspect-ratio: 1;
  width: 100%;
  max-width: min(100%, 58vh);
}

[data-theme="dark"] .about-img-container {
  background: #252525;
}

.about-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.3s ease;
  will-change: opacity;
}

.about-img.fading {
  opacity: 0;
}

.about-img-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: min(100%, 58vh);
}

.about-img-btn {
  background: #f0f0f0;
  border: none;
  border-radius: 0.55rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease;
  letter-spacing: 0.01em;
}

.about-img-btn:hover {
  opacity: 0.65;
}

[data-theme="dark"] .about-img-btn {
  background: #252525;
}

[data-lang="zh"] .about-img-btn {
  font-family: var(--font-zh);
}

/* ── Page transitions ────────────────────── */

.page-entering .about-header,
.page-entering .about-main {
  opacity: 0;
  transform: translateY(14px);
}

.about-header,
.about-main {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.page-leaving {
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

/* ── Responsive: tablet ──────────────────── */

@media (max-width: 768px) {
  .about-main {
    padding: 1.5rem 1.5rem 4rem;
  }

  .about-content {
    gap: 3rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .home-link .logo-en {
    font-size: 1.15rem;
  }
}

/* ── Responsive: mobile (≤ 430px) ───────── */

@media (max-width: 430px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .about-nav {
    align-items: flex-start;
  }

  .about-nav .nav-links {
    display: none;
  }

  .about-main {
    padding: 1.25rem 1.25rem 4rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Image section below text on mobile */
  .about-visual {
    order: 2;
  }

  .about-text {
    order: 1;
    gap: 2rem;
  }


  /* Hide Chinese subtitle in brand — not enough horizontal room */
  .home-link .logo-zh {
    display: none !important;
  }

  .home-link .logo-en,
  .brand-title {
    font-size: 1.15rem;
  }

  /* Chinese mode: two-line logo makes navbar taller */
  [data-lang="zh"] .mobile-nav-links {
    padding-top: 5.5rem;
  }
}
