/* ==========================================================================
   俗人的博客 — About Page Dedicated Styles v4
   Matches Homepage v3 Kinetic Paper & Ink Editorial Aesthetic
   ========================================================================== */

/* Kinetic Hero (mirrors homepage atmosphere) */
.about-hero {
  position: relative;
  padding: 76px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.about-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 78% at 24% 45%,
    rgba(246, 244, 239, 0.92) 0%,
    rgba(246, 244, 239, 0.55) 60%,
    rgba(246, 244, 239, 0.16) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.about-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
}

.about-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
}

.about-kicker__line {
  width: 28px;
  height: 1.5px;
  background: var(--vermilion);
  transform-origin: left center;
  animation: aboutDrawLine 0.8s var(--ease-expo) 0.1s both;
}

.about-reveal {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.about-reveal__inner {
  display: inline-block;
  animation: aboutMaskRise 0.85s var(--ease-expo) 0.08s both;
}

.about-hero__title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5.2vw, 56px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.about-hero__sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-secondary);
  max-width: 560px;
  animation: fadeSlide 0.8s var(--ease-expo) 0.22s both;
}

.about-hero__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-left: 28px;
  border-left: 1px solid var(--hairline);
  animation: fadeSlide 0.85s var(--ease-expo) 0.3s both;
}

.about-stat {
  text-align: right;
}

.about-stat__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.about-stat__label {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Bento Editorial Grid with 3D Spring Tilt & Specular Sheen
   ========================================================================== */
.about-stage {
  padding: 44px 0 92px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  perspective: 1400px;
}

.bento-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.32s ease, box-shadow 0.4s var(--ease-expo);
}

.bento-card:hover {
  border-color: var(--vermilion-border);
  box-shadow: var(--shadow-hover);
}

.bento-card__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  background: radial-gradient(
    420px circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.42) 0%,
    rgba(200, 75, 49, 0.045) 38%,
    transparent 70%
  );
  transition: opacity 0.35s ease;
}

.bento-card:hover .bento-card__sheen {
  opacity: 1;
}

/* Column Spans */
.bento-card--bio {
  grid-column: span 7;
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.bento-card--photo {
  grid-column: span 5;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-card--half {
  grid-column: span 6;
  padding: 32px 34px;
}

/* Dedicated Full-Width GitHub Self-Intro Showcase Card */
.bento-card--github {
  grid-column: span 12;
  padding: 34px 38px;
  background: var(--ink);
  color: #fcfbf8;
  border-color: rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 32px;
}

.bento-card--github:hover {
  border-color: rgba(200, 75, 49, 0.55);
  box-shadow: 0 26px 52px -18px rgba(22, 22, 20, 0.36);
}

.bento-card--github .bento-card__sheen {
  background: radial-gradient(
    460px circle at var(--glare-x, 50%) var(--glare-y, 50%),
    rgba(255, 255, 255, 0.09) 0%,
    rgba(200, 75, 49, 0.12) 40%,
    transparent 70%
  );
}

.bento-card--github .bento-meta {
  color: rgba(252, 251, 248, 0.58);
}

.github-intro__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 12px;
}

.github-intro__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(252, 251, 248, 0.08);
  border: 1px solid rgba(252, 251, 248, 0.14);
  color: #fcfbf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.github-intro__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  color: #fcfbf8;
  letter-spacing: 0.02em;
}

.github-intro__desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(252, 251, 248, 0.72);
}

.github-intro__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.github-repo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.github-repo-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #f3d7cf;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.github-repo-url::-webkit-scrollbar {
  display: none;
}

.github-repo-url:hover {
  color: #ffffff;
  text-decoration: underline;
}

.github-copy-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fcfbf8;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.github-copy-btn:hover {
  background: var(--vermilion);
  border-color: var(--vermilion);
}

.github-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-vermilion {
  background: var(--vermilion);
  color: #fcfbf8;
  box-shadow: 0 8px 20px -8px rgba(200, 75, 49, 0.5);
}

.btn-vermilion:hover {
  background: #d8573b;
  transform: translateY(-1px);
}

.btn-dark-ghost {
  background: transparent;
  color: rgba(252, 251, 248, 0.85);
  border-color: rgba(252, 251, 248, 0.22);
}

.btn-dark-ghost:hover {
  color: #ffffff;
  border-color: rgba(252, 251, 248, 0.55);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.bento-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.bento-meta__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermilion);
  display: inline-block;
  margin-right: 7px;
  vertical-align: middle;
}

/* Bio Card Typography */
.bio-statement {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: 0.015em;
}

.bio-statement::before {
  content: "“";
  color: var(--vermilion);
  margin-right: 4px;
}

.bio-statement::after {
  content: "”";
  color: var(--vermilion);
  margin-left: 4px;
}

.hobby-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hobby-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--ink-secondary);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.28s var(--ease-expo);
}

.hobby-pill:hover {
  border-color: var(--vermilion-border);
  color: var(--vermilion-deep);
  transform: translateY(-2px);
}

.hobby-pill svg {
  width: 14px;
  height: 14px;
  color: var(--vermilion);
}

.bio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

/* Darkroom Film-Graded Photo Print with Viewfinder Marks */
.photo-frame {
  position: relative;
  flex: 1;
  min-height: 270px;
  border-radius: 10px;
  overflow: hidden;
  background: #1e1d1a;
  cursor: zoom-in;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(0.95) sepia(0.11);
  transition: transform 0.72s var(--ease-expo), filter 0.6s var(--ease-expo);
}

.bento-card--photo:hover .photo-frame img {
  transform: scale(1.045);
  filter: saturate(0.96) contrast(1.02) sepia(0.02);
}

/* Camera Viewfinder Corners */
.viewfinder-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.78;
  transition: transform 0.42s var(--ease-expo), opacity 0.3s ease;
}

.viewfinder-corner--tl { top: 12px; left: 12px; border-top: 1.5px solid #fcfbf8; border-left: 1.5px solid #fcfbf8; }
.viewfinder-corner--tr { top: 12px; right: 12px; border-top: 1.5px solid #fcfbf8; border-right: 1.5px solid #fcfbf8; }
.viewfinder-corner--bl { bottom: 12px; left: 12px; border-bottom: 1.5px solid #fcfbf8; border-left: 1.5px solid #fcfbf8; }
.viewfinder-corner--br { bottom: 12px; right: 12px; border-bottom: 1.5px solid #fcfbf8; border-right: 1.5px solid #fcfbf8; }

.bento-card--photo:hover .viewfinder-corner--tl { transform: translate(-3px, -3px); opacity: 1; }
.bento-card--photo:hover .viewfinder-corner--tr { transform: translate(3px, -3px); opacity: 1; }
.bento-card--photo:hover .viewfinder-corner--bl { transform: translate(-3px, 3px); opacity: 1; }
.bento-card--photo:hover .viewfinder-corner--br { transform: translate(3px, 3px); opacity: 1; }

.photo-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  padding: 2px 4px 0;
}

/* Topic & Project Editorial Lists */
.bento-heading {
  margin: 10px 0 18px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.editorial-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.editorial-list li {
  border-top: 1px solid var(--hairline);
}

.editorial-list li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.editorial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 4px;
  transition: padding-left 0.3s var(--ease-expo), color 0.2s ease;
}

.editorial-row:hover {
  padding-left: 10px;
}

.editorial-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editorial-row__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}

.editorial-row:hover .editorial-row__title {
  color: var(--vermilion);
}

.editorial-row__sub {
  font-size: 13px;
  color: var(--ink-muted);
}

.editorial-row__arrow {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-muted);
  transition: transform 0.3s var(--ease-expo), color 0.2s ease;
}

.editorial-row:hover .editorial-row__arrow {
  color: var(--vermilion);
  transform: translateX(4px);
}

/* Scroll Reveal */
.bento-card.is-awaiting {
  opacity: 0;
  transform: translateY(24px);
}

.bento-card.is-shown {
  animation: aboutCardIn 0.65s var(--ease-expo) var(--delay, 0ms) both;
}

@keyframes aboutMaskRise {
  from { opacity: 0; transform: translateY(108%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes aboutDrawLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes aboutCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive */
@media (max-width: 920px) {
  .about-hero__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-hero__stats {
    flex-direction: row;
    padding-left: 0;
    padding-top: 18px;
    border-left: none;
    border-top: 1px solid var(--hairline);
    gap: 28px;
  }

  .about-stat {
    text-align: left;
  }

  .bento-card--bio,
  .bento-card--photo,
  .bento-card--half,
  .bento-card--github {
    grid-column: span 12;
  }

  .bento-card--github {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 680px) {
  .about-hero {
    padding: 46px 0 36px;
  }

  .bento-card--bio,
  .bento-card--half,
  .bento-card--github {
    padding: 24px 20px;
  }

  .photo-frame {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-hero__canvas {
    display: none;
  }
}
