/* === Side A: editorial, white-backed, restrained === */

/* ---- Layering: prism background band under all content ---- */
.side-a {
  position: relative;
}

/* The side-index keeps its own positioning (fixed) — exclude it here */
.side-a > *:not(.prism-bg):not(.side-index) {
  position: relative;
  z-index: 1;
}

/* ---- Hero section ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  /* Reserve the top band for the prism logo (viewBox ratio 350/1094),
     so the text opens BELOW the logo on first paint */
  padding: calc(32vw + var(--space-xl)) var(--content-gutter) var(--space-3xl);
  text-align: center;
}

/* ---- Name ---- */
.hero-name {
  font-size: var(--text-3xl);
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--a-text);
  margin-bottom: var(--space-md);
  /* Stack Chinese + English name naturally */
}

.hero-name-zh {
  font-family: var(--font-cn);
}

.hero-name-sep {
  color: var(--a-text-tertiary);
  font-weight: 300;
  margin: 0 0.15em;
}

.hero-name-en {
  font-family: var(--font-en);
}

/* ---- Tagline ---- */
.hero-tagline {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--a-text-secondary);
  font-weight: 400;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.01em;
}

/* ---- Role ---- */
.hero-role {
  font-size: var(--text-base);
  color: var(--a-text);
  margin-bottom: var(--space-sm);
  font-weight: 400;
}

.hero-at {
  color: var(--a-text-tertiary);
}

.hero-role-line {
  white-space: nowrap;
}

.hero-company-en {
  font-family: var(--font-en);
  color: var(--a-text-secondary);
  font-size: var(--text-sm);
  margin-left: 0.35em;
}

/* ---- Focus areas ---- */
.hero-focus {
  font-size: var(--text-sm);
  color: var(--a-text-tertiary);
  letter-spacing: 0.04em;
}

/* ---- Sections after the hero: single editorial column ---- */
.career,
.education {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4xl) var(--content-gutter) 0;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--a-text-tertiary);
  margin-bottom: var(--space-xl);
}

/* ---- Career ---- */
.career-company {
  font-size: var(--text-lg);
  font-weight: 550;
  color: var(--a-text);
  margin-bottom: var(--space-xs);
}

.career-company-en {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--a-text-tertiary);
  margin-left: 0.5em;
}

.career-role {
  color: var(--a-text-secondary);
  margin-bottom: var(--space-xs);
}

.career-period {
  font-size: var(--text-sm);
  color: var(--a-text-tertiary);
  margin-bottom: var(--space-lg);
}

.career-summary {
  margin-bottom: var(--space-md);
}

/* ---- Education ---- */
.education-item {
  margin-bottom: var(--space-lg);
}

.education-item:last-child {
  margin-bottom: 0;
}

.education-school {
  font-size: var(--text-base);
  font-weight: 550;
  color: var(--a-text);
}

.education-school-en {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--a-text-tertiary);
  margin-left: 0.5em;
}

.education-degree {
  color: var(--a-text-secondary);
}

.education-period {
  font-size: var(--text-sm);
  color: var(--a-text-tertiary);
}

/* ---- Projects ---- */
.projects {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4xl) var(--content-gutter) 0;
}

.projects-legend {
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  margin-top: calc(-1 * var(--space-lg));
  margin-bottom: var(--space-2xl);
}

.legend-invested { color: var(--a-text); }

.track {
  margin-bottom: var(--space-2xl);
}

.track-name {
  display: flex;
  align-items: baseline;
  font-size: var(--text-base);
  font-weight: 550;
  color: var(--a-text);
  margin-bottom: var(--space-sm);
}

.track-count {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--a-text-tertiary);
  margin-left: var(--space-sm);
}

.track-featured {
  margin-bottom: var(--space-xs);
}

/* Project line: level symbol + name. Rows get a quiet "well" so the
   hover affordance extends slightly past the text. */
.project-head {
  display: flex;
  align-items: baseline;
  padding: var(--space-xs) var(--space-sm);
  margin: 0 calc(-1 * var(--space-sm));
  border-radius: var(--radius-md);
}

.project-name {
  font-weight: 550;
  color: var(--a-text);
}

.project-level {
  font-size: var(--text-xs);
  margin-left: var(--space-sm);
  white-space: nowrap;
}

.project--invested .project-level {
  color: var(--a-text);
}

/* Expandable lines (have a note): click to unfold */
.project--expandable .project-head {
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.project--expandable .project-head:hover {
  background: var(--a-bg-subtle);
}

.project--expandable .project-head::after {
  content: '›';
  margin-left: auto;
  color: var(--a-text-tertiary);
  transition: transform var(--dur-fast) var(--ease-out);
}

.project--expandable[open] .project-head::after {
  transform: rotate(90deg);
}

.project-note {
  font-size: var(--text-sm);
  color: var(--a-text-secondary);
  padding: 0 var(--space-sm) var(--space-xs);
}

details[open] .project-note {
  animation: note-in var(--dur-normal) var(--ease-out);
}

@keyframes note-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* Native accordion resets */
summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

/* 接触&跟踪: the whole archive behind one collapsed line */
.tracking-fold {
  margin-top: var(--space-xs);
}

.tracking-summary {
  display: inline-flex;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--a-text-tertiary);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  margin-left: calc(-1 * var(--space-sm));
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.tracking-summary:hover {
  background: var(--a-bg-subtle);
}

.tracking-summary::after {
  content: '›';
  margin-left: var(--space-xs);
  transition: transform var(--dur-fast) var(--ease-out);
}

.tracking-fold[open] > .tracking-summary::after {
  transform: rotate(90deg);
}

/* Sub-industry: nested one level under 接触&跟踪 */
.subtrack {
  margin-left: var(--space-md);
}

.subtrack-summary {
  display: inline-flex;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--a-text-secondary);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.subtrack-summary:hover {
  background: var(--a-bg-subtle);
}

.subtrack-summary::after {
  content: '›';
  margin-left: var(--space-xs);
  transition: transform var(--dur-fast) var(--ease-out);
}

.subtrack[open] > .subtrack-summary::after {
  transform: rotate(90deg);
}

/* The cloud of company names — nests a breath under whatever folds it out */
.track-reviewed {
  font-size: var(--text-sm);
  color: var(--a-text-tertiary);
  line-height: 2;
  padding: var(--space-xs) var(--space-sm) 0;
}

.subtrack .track-reviewed {
  margin-left: var(--space-md);
}

/* ---- Deep Think / My Manifesto ---- */
.deep-think {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4xl) var(--content-gutter) 0;
}

.deep-think-subtitle {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--a-text-tertiary);
  margin-top: calc(-1 * var(--space-lg));
  margin-bottom: var(--space-xl);
}

/* The manifesto: the one moment of voice on the A-side. Large enough to
   hold the room, never shouting. */
.deep-think-statement {
  font-family: var(--font-en);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--a-text);
}

/* Section tracklist on the A-side: an ink hairline draws itself on hover */
.side-a .toc-item::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--a-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-normal) var(--ease-out);
}

.side-a .toc-item:hover {
  color: var(--a-text);
}

.side-a .toc-item:hover::after {
  transform: scaleX(1);
}

/* ---- Deep Think: the growing set of viewpoints below the lead ----
   The lead stays the large, declarative key; entries accumulate beneath,
   grouped by a user-authored tag. Each thesis is one visible line — the
   "诱导" — with an optional collapsed expansion for those who bite. */
.dt-entries {
  margin-top: var(--space-2xl);
}

.dt-group {
  margin-bottom: var(--space-xl);
}

.dt-group-tag {
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--a-text);
  margin-bottom: var(--space-xs);
}

.dt-entry {
  border-bottom: 1px solid var(--a-border);
}

.dt-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.dt-title {
  font-weight: 500;
  color: var(--a-text);
}

.dt-date {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--a-text-tertiary);
  white-space: nowrap;
}

/* Expandable theses (have a body): click to unfold */
.dt-entry--expandable .dt-head {
  cursor: pointer;
}

.dt-entry--expandable .dt-head::after {
  content: '›';
  color: var(--a-text-tertiary);
  transition: transform var(--dur-fast) var(--ease-out);
}

.dt-entry--expandable[open] .dt-head::after {
  transform: rotate(90deg);
}

.dt-body {
  font-size: var(--text-sm);
  color: var(--a-text-secondary);
  padding: 0 0 var(--space-sm);
}

details[open] .dt-body {
  animation: note-in var(--dur-normal) var(--ease-out);
}

/* ---- Transition lyric: the invitation ----
   An interlude, not a section: same column, no label, no index entry.
   The first three lines stay plain; the last line carries the A-side's
   only color — the spectrum, arriving exactly where you cross over. */
.transition-lyric {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4xl) var(--content-gutter) 0;
}

.lyric-block {
  font-family: var(--font-en);
  font-style: italic;
  line-height: 1.9;
  color: var(--a-text-secondary);
}

.lyric-line--trigger {
  margin-top: var(--space-sm);
}

/* The invitation: the sentence itself is a small spectrum, running
   red -> violet left to right like the fan leaving the prism. */
.lyric-link {
  position: relative;
  font-weight: 600;
  background-image: linear-gradient(90deg,
    var(--spectrum-red),
    var(--spectrum-orange),
    var(--spectrum-yellow),
    var(--spectrum-green),
    var(--spectrum-blue),
    var(--spectrum-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* On hover, a matching spectrum hairline draws itself underneath */
.lyric-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background-image: inherit;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-normal) var(--ease-out);
}

.lyric-link:hover::after {
  transform: scaleX(1);
}

.lyric-attribution {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--a-text-tertiary);
  margin-top: var(--space-md);
}

/* ---- A-side Footer: Contact ---- */
.side-a-footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4xl) var(--content-gutter) var(--space-3xl);
}

/* Editorial ledger: thin rules, quiet labels, no decoration */
.contact-list {
  list-style: none;
  border-top: 1px solid var(--a-border);
}

.contact-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-lg);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--a-border);
}

.contact-label {
  flex-shrink: 0;
  width: 4.5em;
  font-size: var(--text-sm);
  color: var(--a-text-tertiary);
}

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

/* A hairline that draws itself on hover — noticed only in retrospect */
.contact-link {
  position: relative;
}

.contact-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--a-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-normal) var(--ease-out);
}

.contact-link:hover::after {
  transform: scaleX(1);
}

/* ---- Side index: album tracklist ---- */
.side-index {
  position: fixed;
  top: 50%;
  right: var(--space-xl);
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out);
}

.side-index.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.index-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--a-text-tertiary);
  transition: color var(--dur-fast) var(--ease-out);
}

.index-no {
  font-family: var(--font-en);
  letter-spacing: 0.05em;
}

.index-item.is-active {
  color: var(--a-text);
}

/* The index yields to small screens — touch layouts get their own pass later */
@media (max-width: 900px) {
  .side-index {
    display: none;
  }
}

/* ---- Reveal on scroll ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-xslow) var(--ease-out),
              transform var(--dur-xslow) var(--ease-out);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
