/* ==========================================================================
   HERO
   ========================================================================== */
.hero-section {
  position: relative;
  margin-bottom: 2.5rem;
  z-index: 2;
}

.hero-stage {
  position: relative;
  width: 100%;
  min-height: clamp(190px, 25vw, 250px);
  margin-bottom: 0.5rem;
}

.hero-name-wrap {
  position: relative;
  width: 68%;
  max-width: 68%;
  min-height: clamp(170px, 22vw, 245px);
}

.hero-name {
  --base-size: clamp(3.2rem, 9.6vw, 7.2rem);
  --font-width-scale: 1;
  position: absolute;
  left: 0;
  bottom: 1.8rem;
  width: max-content;
  font-family: var(--font-grotesque);
  font-weight: 600;
  font-size: var(--base-size);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--sheet-text);
  word-break: break-word;
  user-select: text;
  cursor: pointer;
  transform: scaleX(var(--font-width-scale));
  transition: transform 0.15s ease;
  transform-origin: left bottom;
}

.hero-name:hover {
  transform: scaleX(var(--font-width-scale)) translateY(-1px);
}

.hero-name span.line {
  display: block;
  width: max-content;
}

/* Portrait aligns to the mode controls above */
.hero-photo-anchor {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
}

.hero-photo-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1.5px solid var(--sheet-border);
  padding: 0.4rem;
  box-shadow: 3px 3px 0px rgba(20, 20, 20, 0.14);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  cursor: pointer;
  user-select: none;
  width: clamp(132px, 15.4vw, 159.5px);
  display: block;
}

.hero-photo-card:hover {
  transform: translateY(-2px) rotate(-0.5deg);
  box-shadow: 4px 6px 0px rgba(20, 20, 20, 0.22);
}

.hero-photo-card::before,
.hero-photo-card::after {
  content: '+';
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sheet-subtle);
  pointer-events: none;
}
.hero-photo-card::before { top: 2px; left: 3px; }
.hero-photo-card::after { bottom: 2px; right: 3px; }

.hero-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #222224;
  border: 1px solid rgba(20, 20, 20, 0.2);
}

.specimen-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: opacity 0.4s ease, filter 0.4s ease, transform 0.5s ease;
}

/* Dual mode image visibility */
.img-cool {
  display: block;
  filter: contrast(1.08) brightness(0.98);
}

.img-simple {
  display: none;
  filter: contrast(1.02) saturate(1.05);
}

/* Mode-dependent transitions */
body.mode-simple .img-cool {
  display: none;
}

body.mode-simple .img-simple {
  display: block;
  animation: photoCrossfade 0.45s ease forwards;
}

@keyframes photoCrossfade {
  from { opacity: 0.4; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.hero-photo-caption {
  display: flex;
  justify-content: center;
  align-items: baseline;
  margin-top: 0.35rem;
  padding: 0 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--sheet-muted);
}

.caption-name {
  font-weight: 700;
  color: var(--sheet-text);
}

/* ==========================================================================
   HERO DETAILS
   ========================================================================== */
.subtitle-row {
  display: grid;
  grid-template-columns: 1.15fr 2.15fr 0.9fr;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 2.25rem;
  padding-top: 0.5rem;
}

.sub-col-left {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--sheet-text);
  letter-spacing: 0.02em;
}

.sub-col-left .bracketed {
  display: block;
}

.sub-col-center {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.25;
  color: #141414;
  padding-right: 0.75rem;
}

.sub-col-right {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--sheet-muted);
}

.sub-col-right a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.sub-col-right a:hover {
  color: var(--sheet-text);
  text-decoration: underline;
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
  margin: -0.75rem 0 2rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--sheet-border-subtle);
  border-bottom: 1px solid var(--sheet-border-subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
}

.chapter-nav a {
  color: var(--sheet-muted);
  text-decoration: none;
}

.chapter-nav a:hover,
.chapter-nav a:focus-visible {
  color: var(--sheet-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   DIVIDER BARS
   ========================================================================== */
.specimen-divider {
  border: none;
  border-top: 1.5px solid var(--sheet-border);
  margin: 2.5rem 0 1.75rem 0;
  position: relative;
}
