/* ===========================================================
   page-profile.css — profile page
   Layout: sticky section index (desktop only) + one reading
   column. The one visual flourish is the before/after ledger;
   everything else stays quiet.
   =========================================================== */

.profile {
  max-width: 68rem;
  margin: 0 auto;
  padding: 4.5rem 1.75rem 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.profile__main { max-width: 44rem; min-width: 0; }

/* --- Section index (desktop) --- */
.profile__index { display: none; }

@media (min-width: 1080px) {
  .profile {
    grid-template-columns: 10rem minmax(0, 44rem);
    gap: 5rem;
    justify-content: center;
  }
  .profile__index {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 2.75rem);
    align-self: start;
  }
}

.profile__index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  border-left: 1px solid var(--line);
}
.profile__index a {
  display: block;
  padding: 0.4rem 0 0.4rem 1rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.profile__index a:hover { color: var(--paper); }
.profile__index a.is-active {
  color: var(--paper);
  border-left-color: var(--signal);
}

/* --- Hero --- */
.hero-profile { margin-bottom: 4.5rem; }

.hero-profile h1 {
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
}
.hero-profile .statement {
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 3.2vw, 1.8rem);
  line-height: 1.35;
  max-width: 30ch;
  margin: 0 0 1.8rem;
}
.hero-profile .intro {
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 38rem;
  margin: 0 0 1.1rem;
}
.hero-profile .intro:last-of-type { margin-bottom: 2rem; }

.availability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--paper-dim);
  margin: 1.4rem 0 0;
}
.availability::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}

.hire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  padding: 0.75rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--paper);
  transition: border-color 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn:hover { border-color: var(--paper-dim); }
.btn--primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
  font-weight: 500;
}
.btn--primary:hover { opacity: 0.88; border-color: var(--signal); }

/* --- Sections --- */
.profile-section { margin-bottom: 4rem; }
.profile-section:last-child { margin-bottom: 0; }

.profile-section h2 {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--paper-dim);
  letter-spacing: 0.01em;
  margin: 0 0 1.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.section-lede {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.8rem;
  max-width: 38rem;
}

/* --- Before / after ledger --- */
.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.ledger__row:first-child { padding-top: 0; }
.ledger__metric {
  font-size: 1.02rem;
  line-height: 1.4;
  margin: 0;
}
.ledger__where {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--paper-dim);
  margin-top: 0.2rem;
}
.ledger__vals {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  white-space: nowrap;
  align-self: start;
  text-align: right;
}
.ledger__vals .before { color: var(--paper-dim); }
.ledger__vals .to { color: var(--paper-dim); margin: 0 0.45rem; }
.ledger__vals .after { color: var(--signal); font-weight: 500; }

/* Bar: filled length = after value, tick = where it started.
   Both scaled so the larger of the two values is 100%. */
.ledger__bar {
  grid-column: 1 / -1;
  position: relative;
  height: 4px;
  margin-top: 0.7rem;
  background: var(--line);
  border-radius: 2px;
}
.ledger__bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--a) * 1%);
  background: var(--signal);
  border-radius: 2px;
  transition: width 1.1s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delay, 0s);
}
.ledger__bar::before {
  content: "";
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: calc(var(--b) * 1% - 1px);
  width: 2px;
  background: var(--paper);
  opacity: 0.55;
  z-index: 1;
}
/* JS arms the ledger at the "before" values, then releases it
   once it scrolls into view. Without JS the final state shows. */
.ledger.is-armed .ledger__bar::after { width: calc(var(--b) * 1%); }
.ledger.is-armed.is-live .ledger__bar::after { width: calc(var(--a) * 1%); }

.ledger__note {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--paper-dim);
  margin: 1rem 0 0;
}

/* --- Build log --- */
.build-log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.build-log__row {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  gap: 0.3rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.build-log__row:first-child { padding-top: 0; }
.build-log__row:last-child { border-bottom: none; }
.build-log__phase {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--paper-dim);
}
.build-log__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.3rem;
}
.build-log__desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--paper-dim);
  margin: 0;
}
.build-log__status {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
  align-self: start;
}
.build-log__row--done .build-log__status { color: var(--signal); font-weight: 500; }
.build-log__row--active .build-log__status { color: var(--paper); font-weight: 500; }
.build-log__row--upcoming .build-log__status { color: var(--paper-dim); }

@media (max-width: 639.98px) {
  .build-log__row { grid-template-columns: 1fr; gap: 0.2rem; }
  .build-log__status { text-align: left; }
}

/* --- Row lists (what I do, work with me, toolkit) --- */
.rows {
  margin: 0;
  padding: 0;
}
.rows__item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.4rem 1.75rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.rows__item:first-child { padding-top: 0; }
.rows__item:last-child { border-bottom: none; }
.rows dt {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
}
.rows dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
}
.rows--mono dd {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--paper-dim);
}

/* --- Experience timeline --- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stop {
  position: relative;
  padding: 0 0 2.75rem 1.9rem;
  border-left: 1px solid var(--line);
}
.stop:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.stop::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.3rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--paper-dim);
}
.stop--current::before {
  background: var(--signal);
  border-color: var(--signal);
}
.stop__when {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--paper-dim);
  margin: 0 0 0.45rem;
}
.stop__tenure {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  color: var(--paper);
}
@media (max-width: 639.98px) {
  .stop__tenure { display: block; margin: 0.2rem 0 0; padding: 0; border: 0; }
}
.stop__role {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.25rem;
}
.stop__org {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--signal);
  margin: 0 0 0.9rem;
}
.stop__context {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--paper-dim);
  margin: 0 0 0.9rem;
}
.stop__work {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.stop__work li::marker { color: var(--paper-dim); }
.stop__work li {
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.stop__work li:last-child { margin-bottom: 0; }

.stop--interlude .stop__role { font-weight: 500; }
.stop--interlude .stop__org { color: var(--paper-dim); }

/* --- Simple list (recognition) --- */
.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.simple-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.simple-list li:first-child { padding-top: 0; }
.simple-list li:last-child { border-bottom: none; }
.simple-list .item-title { font-size: 0.98rem; line-height: 1.55; }
.simple-list .item-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--paper-dim);
  white-space: nowrap;
  padding-top: 0.15rem;
}

/* --- Prose + closing --- */
.prose p {
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 1rem;
  max-width: 38rem;
}
.prose p:last-child { margin-bottom: 0; }

.closing {
  padding: 2.25rem 0 0;
  border-top: 1px solid var(--line);
}
.closing p {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.4;
  max-width: 32ch;
  margin: 0 0 1.5rem;
}

/* --- Small screens --- */
@media (max-width: 639.98px) {
  .profile { padding: 3.25rem 1.25rem 4rem; }
  .hero-profile { margin-bottom: 3.5rem; }
  .rows__item { grid-template-columns: 1fr; }
  .ledger__row { grid-template-columns: 1fr; }
  .ledger__vals { text-align: left; }
  .stop { padding-left: 1.4rem; }
  .simple-list li { flex-direction: column; gap: 0.2rem; }
}
