/*==========================================================================
  sections.css — page content
  Hero · sections & blocks · entries (left rail + body) · clickable rows ·
  experience + timeline · testimonials · sub-nav · filters · talks ·
  writing by year · contact
==========================================================================*/

/*--------------------------------------------------------------------------
  1. HERO (home)
--------------------------------------------------------------------------*/

.hero { padding-block: clamp(56px, 11vw, 112px) clamp(48px, 8vw, 80px); }

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 40px;
  align-items: start;
}
.hero-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }

.hero-name {
  font-size: clamp(26px, 4.4vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.024em;
}
.hero-name span { display: block; color: var(--text-low); font-weight: 500; }

.hero-lede {
  margin-top: 20px;
  max-width: 58ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-mid);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-mid);
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--live);
  animation: live 2.8s ease-out infinite;
}
@keyframes live {
  0%        { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--live) 0%, transparent); }
}
.page-meta .status { margin-top: 0; font-size: 13.5px; }

.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

.facts {
  margin-top: clamp(40px, 6vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.facts .entry-aside { font-size: 14px; padding-top: 0; }
.facts dd { color: var(--text-hi); }

.inline-list { display: flex; flex-wrap: wrap; row-gap: 2px; }
.inline-list li:not(:last-child)::after {
  content: "·";
  margin-inline: 8px;
  color: var(--text-low);
}

/*--------------------------------------------------------------------------
  2. SECTIONS & BLOCKS
--------------------------------------------------------------------------*/

.section {
  padding-block: clamp(48px, 7vw, 64px);
  border-top: 1px solid var(--line);
  /* on anchor jumps the rule lands under the bar's own hairline, not below it */
  scroll-margin-top: -1px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 28px;
}

.block + .block { margin-top: clamp(44px, 6vw, 56px); }
.page-body > .block + .block {
  margin-top: clamp(44px, 6vw, 56px);
  padding-top: clamp(40px, 6vw, 48px);
  border-top: 1px solid var(--line);
}
/* when a block is jumped to, its rule lands on the sub-nav's own rule
   (bar is covered by scroll-padding; 46px sub-nav, 1px overlap) */
.page-body > .block[id] { scroll-margin-top: 45px; }
.page-body > .block[id]:first-child { scroll-margin-top: 77px; }

.block-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-low);
  margin-bottom: 20px;
}
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 24px;
}
.block-head h2 { font-size: 17px; }
.block-count {
  font-size: 13px;
  color: var(--text-low);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.prose p { font-size: 16px; line-height: 1.75; color: var(--text-mid); }
.prose p + p { margin-top: 16px; }

/* shared empty / loading line */
.state-line { font-size: 14px; color: var(--text-low); padding-block: 8px; }

/*--------------------------------------------------------------------------
  3. ENTRIES — left rail (date / label) + body
--------------------------------------------------------------------------*/

.entries { display: grid; gap: 28px; }

.entry {
  display: grid;
  grid-template-columns: var(--aside) minmax(0, 1fr);
  column-gap: var(--col-gap);
  row-gap: 2px;
}
.entry-aside {
  font-size: 13px;
  line-height: 1.6;
  padding-top: 1px;
  color: var(--text-low);
  font-variant-numeric: tabular-nums;
}
.entry-title { font-size: 15px; font-weight: 500; line-height: 1.5; }
.entry-sub { font-size: 14px; color: var(--text-low); }
.entry-text { margin-top: 4px; font-size: 14.5px; line-height: 1.65; color: var(--text-mid); }
.entry-text a:not(.link) { color: var(--text-hi); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.entry-text a:not(.link):hover { text-decoration-color: var(--text-hi); }
.entry-link { display: inline-block; margin-top: 6px; font-size: 14px; }

/* definition-style entries: the rail holds the term, not a date */
.defs .entry-aside { font-size: 14px; font-weight: 500; color: var(--text-hi); padding-top: 0; }
.defs .entry-text { margin-top: 0; }

/* content that should start where the entry body starts */
.offset { padding-left: calc(var(--aside) + var(--col-gap)); }

/*--------------------------------------------------------------------------
  4. ROWS — whole-row links (projects, writing)
--------------------------------------------------------------------------*/

.rows { display: grid; }

.row {
  display: grid;
  grid-template-columns: var(--aside) minmax(0, 1fr) auto;
  column-gap: var(--col-gap);
  align-items: start;
  padding: 14px 12px;
  margin-inline: -12px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.row:hover { background: var(--bg-hover); }

.row-aside { font-size: 13px; line-height: 1.6; padding-top: 1px; color: var(--text-low); }
.row-title { font-size: 15px; font-weight: 500; line-height: 1.5; }
.row-meta { font-size: 13px; color: var(--text-low); margin-bottom: 2px; }
.row-meta .sep { margin-inline: 6px; }
.row-text {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-arrow {
  padding-top: 1px;
  font-size: 14px;
  color: var(--text-low);
  transition: color 0.15s, transform 0.2s var(--ease);
}
.row:hover .row-arrow { color: var(--text-hi); transform: translateX(3px); }
.row:hover .row-arrow.ext { transform: translate(2px, -2px); }

.row-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.row:hover .row-thumb img { transform: scale(1.04); }
.row-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-low);
}

.tag { color: var(--text-mid); }

.hidden { display: none !important; }

/*--------------------------------------------------------------------------
  5. EXPERIENCE
--------------------------------------------------------------------------*/

.xp-list { display: grid; gap: 40px; }
.xp-head { margin-bottom: 16px; }
.xp-company-name { font-size: 15px; font-weight: 600; }
.xp-company-meta { font-size: 13.5px; color: var(--text-low); margin-top: 1px; }

.xp-roles { display: grid; gap: 22px; }
.xp-role { position: relative; }
.xp-role.current .entry-aside { color: var(--text-hi); }

/* timeline: a dot per role in the gap between date and body, joined by a line */
.xp-role::before {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(var(--aside) + var(--col-gap) / 2 - 4px);
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--text-low);
  background: var(--bg);
}
.xp-role:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  bottom: -30px;
  left: calc(var(--aside) + var(--col-gap) / 2 - 1px);
  width: 1px;
  background: var(--line-strong);
}
.xp-role.current::before {
  border-color: var(--live);
  background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 20%, transparent);
}

.bullets { margin-top: 6px; display: grid; gap: 6px; }
.bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-mid);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 5px;
  height: 1px;
  background: var(--text-low);
}

.fl-note { margin-bottom: 24px; font-size: 13.5px; line-height: 1.6; color: var(--text-low); }
.fl-cta { margin-top: 24px; font-size: 14px; }

/* testimonials */
.quotes { display: grid; gap: 28px; }
.quote blockquote {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-prose);
  text-indent: -0.4em;
}
.quote-by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-low);
}
.quote-avatar {
  display: grid;
  place-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  object-fit: cover;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-hi);
}
.quote-by a { color: var(--text-hi); font-weight: 500; }
.quote-by a:hover { text-decoration: underline; text-underline-offset: 3px; }

/*--------------------------------------------------------------------------
  6. ON-PAGE SUB-NAV (sticky under the top bar)
--------------------------------------------------------------------------*/

.subnav {
  position: sticky;
  top: var(--bar-h);
  z-index: 40;
  display: flex;
  gap: 22px;
  height: 46px;
  margin-bottom: clamp(28px, 4vw, 40px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 13.5px;
  color: var(--text-low);
  white-space: nowrap;
  transition: color 0.15s;
}
.subnav a:hover,
.subnav a.active { color: var(--text-hi); }
.subnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--text-hi);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.subnav a.active::after { transform: scaleX(1); }

/*--------------------------------------------------------------------------
  7. FILTER TABS
--------------------------------------------------------------------------*/

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  color: var(--text-low);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.tab:hover { color: var(--text-hi); }
.tab:active { transform: scale(0.97); }
.tab.active {
  color: var(--text-hi);
  background: var(--bg-elev);
  border-color: var(--line-strong);
}
.tab .count {
  font-size: 12px;
  color: var(--text-low);
  font-variant-numeric: tabular-nums;
}

/*--------------------------------------------------------------------------
  8. TALKS — thumbnail grid
--------------------------------------------------------------------------*/

.talks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 24px;
}
.talk { display: block; }
.talk-thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.talk-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.talk:hover .talk-thumb img { transform: scale(1.04); }
.talk-title { margin-top: 14px; font-size: 15px; font-weight: 500; line-height: 1.45; }
.talk-title .ext {
  display: inline-block;
  color: var(--text-low);
  transition: color 0.15s, transform 0.2s var(--ease);
}
.talk:hover .talk-title .ext { color: var(--text-hi); transform: translate(2px, -2px); }
.talk-sub { margin-top: 2px; font-size: 14px; color: var(--text-mid); }

/*--------------------------------------------------------------------------
  9. WRITING — grouped by year
--------------------------------------------------------------------------*/

.year-group + .year-group { margin-top: 36px; }
.year {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.year-count { font-size: 13px; font-weight: 400; color: var(--text-low); }

/*--------------------------------------------------------------------------
  10. CONTACT
--------------------------------------------------------------------------*/

.form-title { font-size: 15px; font-weight: 500; }
.form-hint { font-size: 13.5px; color: var(--text-low); margin-top: 1px; }

.form { display: grid; gap: 12px; margin-top: 20px; }

.intent { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.intent input { position: absolute; opacity: 0; pointer-events: none; }
.intent label {
  cursor: pointer;
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--text-low);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.intent label:hover { color: var(--text-hi); }
.intent input:checked + label { color: var(--btn-fg); background: var(--btn-bg); border-color: var(--btn-bg); }
.intent input:focus-visible + label { outline: 2px solid var(--text-hi); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  font-size: 14px;
  color: var(--text-hi);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-low); }
.input:focus {
  border-color: var(--text-low);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-hi) 9%, transparent);
}
textarea.input { height: auto; min-height: 140px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:not(:placeholder-shown):invalid { border-color: #b4474b; }

.form-btn { justify-self: start; margin-top: 4px; }
.form-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.channels { display: grid; gap: 10px; font-size: 14px; }
.channels .entry-aside { font-size: 14px; padding-top: 0; }

.copy-btn {
  height: 22px;
  margin-left: 10px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--text-low);
  vertical-align: 1px;
  transition: color 0.15s, background 0.15s;
}
.copy-btn:hover { color: var(--text-hi); background: var(--bg-hover); }

.cal-frame {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
#my-cal-inline { width: 100%; min-height: 620px; overflow: auto; }

/*--------------------------------------------------------------------------
  11. RESPONSIVE
--------------------------------------------------------------------------*/

@media (max-width: 640px) {
  .hero-top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-photo { order: -1; width: 96px; }

  .entry { grid-template-columns: minmax(0, 1fr); }
  .facts .entry, .channels .entry { grid-template-columns: 132px minmax(0, 1fr); column-gap: 14px; }
  .facts .entry-aside, .channels .entry-aside { font-size: 13.5px; }
  .defs { gap: 20px; }
  .offset { padding-left: 0; }

  /* the rail collapses, so the timeline goes with it */
  .xp-role::before, .xp-role::after { display: none; }

  .row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
  .row > .row-aside { grid-column: 1; grid-row: 1; }
  .row > .row-main  { grid-column: 1; grid-row: 2; }
  .row > .row-arrow { grid-column: 2; grid-row: 1 / span 2; }

  .row--media { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; }
  .row--media > .row-thumb { grid-row: 1; }
  .row--media > .row-main  { grid-column: 2; grid-row: 1; }
  .row--media > .row-arrow { display: none; }

  .subnav { gap: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .form-btn { justify-self: stretch; }
  #my-cal-inline { min-height: 520px; }
}

@media (max-width: 560px) {
  .talks { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
