/* CV Online — page styles on top of /assets/ds (tokens + base). Colours only through tokens.
   1. Intro   2. Hero   3. Sections   4. Read more and Alan   5. Summary mode   6. Responsive */

/* ===================== 1. Intro ===================== */
/* the intro is the one shared by every site (/assets/ds/intro.css + intro.js); here only what is the CV's own */
.hero-panel.reveal { --d: .36s; }
.print-head, .print-foot { display: none; }
/* the PDF, one click away from the bar: a small gold chip; on hover it fills softly and the arrow drops */
.pdf-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; margin-left: 2px; align-self: center;
  border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-text); font: 600 12px/1 var(--font-sans); letter-spacing: .08em;
  text-decoration: none; transition: background .25s ease, box-shadow .25s ease, transform .2s var(--ease-out); }
.pdf-chip svg { flex: none; width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.pdf-chip:hover { background: rgba(200, 149, 63, .14); box-shadow: 0 6px 16px rgba(200, 149, 63, .18); }
.pdf-chip:hover svg { transform: translateY(2px); }
.pdf-chip:active { transform: scale(.97); }
.pdf-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===================== 2. Hero ===================== */
.hero { position: relative; overflow: hidden; padding: 72px 0 80px; }
.hero > .container { position: relative; z-index: 1; }
/* the portrait (/assets/ds/portrait.css) heads the right column, with the name and the two roles */
.hero-id { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.hero-portrait { --portrait-size: 112px; padding: 5px; }
.hero-id-name { margin: 0; font-size: 19px; font-weight: 600; color: var(--text); }
.hero-id-role { margin: 2px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; }
.hero h1 { margin-bottom: 18px; }
.h1-main { display: block; font-size: clamp(42px, 6.4vw, 72px); letter-spacing: -.035em; line-height: 1.02; }
.h1-sub { display: block; font-size: clamp(20px, 2.6vw, 28px); color: var(--gold-text); font-weight: 500; margin-top: 10px; }
.ticks.hero-facts { margin: 20px 0 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.eco-label { margin-bottom: 10px; }
.hero-panel .card p { color: var(--text-2); font-size: 15px; }
.panel-title { font-size: 22px; margin-bottom: 12px; }
.layers-title { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); margin: 26px 0 12px; }
.layers { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.layer { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.layer h3 { font-size: 16px; margin-bottom: 4px; }
.layer p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.node { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--gold); flex: none; }

/* lists with a gold tick, used across the page */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }

/* ===================== 3. Sections ===================== */
/* Read the overview first, then four contributions with equal visual weight. */
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.summary-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; margin-bottom: 28px; }
.card > p { color: var(--text-2); }
.summary-copy p { margin: 0; color: var(--text-2); font-size: 17px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 28px; }
.pillar { border-top: 2px solid var(--gold); padding-top: 14px; }
.pillar h3 { font-size: 17px; margin-bottom: 6px; }
.pillar p { color: var(--text-2); font-size: 15px; margin: 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 40px; align-items: center; }
.about-grid p { color: var(--text-2); }
.stats { display: grid; gap: 18px; }
.stat strong { display: block; color: var(--gold-text); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.stat p { margin: 0; color: var(--text); }
.story-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 32px; align-items: center; }
.story-copy p { color: var(--text-2); }
/* career ladder: first role at the bottom, current role at the top; it climbs when it enters the screen */
.ladder { list-style: none; position: relative; display: flex; flex-direction: column-reverse; gap: 16px; margin: 4px 0 24px; padding: 0 0 0 2px; }
.ladder::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: linear-gradient(0deg, rgba(200, 149, 63, .35), var(--gold)); transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform 1.1s var(--ease-out) .1s; }
.ladder.in::before { transform: scaleY(1); }
.rung { position: relative; display: flex; align-items: center; gap: 14px; opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .6s var(--ease-out); }
.ladder.in .rung { opacity: 1; transform: none; }
.ladder.in .rung[data-step="0"] { transition-delay: .1s; }
.ladder.in .rung[data-step="1"] { transition-delay: .45s; }
.ladder.in .rung[data-step="2"] { transition-delay: .8s; }
.rung-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--gold); background: var(--surface); flex: none; z-index: 1; }
.rung-name { font-weight: 500; color: var(--text-2); }
.rung-now .rung-dot { background: var(--gold); box-shadow: 0 0 0 5px rgba(200, 149, 63, .18); }
.rung-now .rung-name { color: var(--text); font-weight: 600; }
.rung-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold-text); }
.ladder.reveal { opacity: 1; transform: none; }
.focus-label { margin-top: 6px; }
.cases-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.case .ticks { margin-top: 12px; }
/* Timeline: the rail follows the reader; promotions start when their own track is visible.
   Each connector reaches the next node before it settles. Text is readable throughout. */
.tl-wrap { position: relative; padding-left: 34px; }
.tl-rail { position: absolute; left: 10px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--line); }
.tl-rail i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(var(--gold), var(--gold-2));
  box-shadow: 0 0 10px var(--gold-glow); transform: scaleY(0); transform-origin: top; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; }
.tl-item { position: relative; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: opacity .6s var(--ease-out) var(--d, 0s), transform .6s var(--ease-out) var(--d, 0s),
    border-color var(--dur-base) ease, box-shadow var(--dur-base) ease; }
.tl-item.lit { border-color: color-mix(in srgb, var(--gold) 28%, var(--line)); }
/* Keep the stop on its rail: hover accents the surface without moving the whole card. */
@media (hover: hover) and (pointer: fine) { .tl-item.in:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); } }
.tl-stop { position: absolute; left: -30px; top: calc(50% - 6.5px); width: 13px; height: 13px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--line); transition: background .4s ease, border-color .4s ease, box-shadow .4s ease; }
.tl-item.lit .tl-stop { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px var(--gold-glow); }
.tl-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.tl-badge { font-size: 11.5px; padding: 3px 10px; }
.tl-steps { --career-beat: calc(var(--dur-base) + var(--dur-fast)); list-style: none; position: relative; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.tl-step { --step: 0; position: relative; min-width: 0; padding-top: 33px; }
.tl-step[data-step="1"] { --step: 1; }
.tl-step[data-step="2"] { --step: 2; }
.tl-step-link { position: absolute; top: 14px; left: 50%; width: calc(100% + 20px); height: 2px; background: var(--line); }
.tl-step-link i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transform-origin: left; }
.tl-step-dot { position: absolute; z-index: 1; top: 8px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--gold); }
.tl-step-copy { position: relative; display: grid; gap: 7px; padding: 10px 0; text-align: center; border-radius: var(--radius-sm); }
.tl-step-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: center; min-height: 22px; }
.tl-step-year { font-family: var(--font-mono); font-size: 12px; color: var(--gold-text); }
.tl-step-role { font-size: 15px; font-weight: 500; color: var(--text-2); line-height: 1.4; }
.tl-step-tag { padding: 2px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); }
.tl-step[aria-current="step"] .tl-step-role { color: var(--text); font-weight: 600; }
.tl-step[aria-current="step"] .tl-step-dot { box-shadow: 0 0 0 5px var(--gold-glow); }
/* Without JS the completed career is visible. Only observed tracks get a waiting state. */
.tl-steps.is-pending .tl-step-dot { background: var(--surface); border-color: var(--line); box-shadow: none; }
.tl-steps.is-pending .tl-step-link i { transform: scaleX(0); }
.tl-steps.steps-in .tl-step-dot { animation: tl-stage-settle var(--dur-base) calc(var(--step) * var(--career-beat)) var(--ease-out) both; }
.tl-steps.steps-in .tl-step-link i { animation: tl-link-fill var(--dur-base) calc(var(--dur-fast) + var(--step) * var(--career-beat)) var(--ease-in-out) both; }
.tl-steps.steps-in .tl-step[aria-current="step"] .tl-step-dot { animation: tl-current-arrive var(--dur-slow) calc(var(--step) * var(--career-beat)) var(--ease-out) both; }
@keyframes tl-link-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tl-stage-settle {
  from { background: var(--surface); border-color: var(--line); transform: scale(.85); box-shadow: none; }
  65% { transform: scale(1.15); }
  to { background: var(--gold); border-color: var(--gold); transform: scale(1); }
}
@keyframes tl-current-arrive {
  from { background: var(--surface); border-color: var(--line); transform: scale(.85); box-shadow: 0 0 0 0 var(--gold-glow); }
  45% { box-shadow: 0 0 0 9px var(--gold-glow); }
  to { background: var(--gold); border-color: var(--gold); transform: scale(1); box-shadow: 0 0 0 5px var(--gold-glow); }
}
.tl-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 8px; }
.tl-head h3 { font-size: 20px; }
.tl-role { margin: 2px 0 0; color: var(--gold-text); font-size: 14.5px; }
.tl-period { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.tl-item > p { color: var(--text-2); margin: 0; }
.creds-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
/* contact: the card shared with IsAcademy (/assets/ds/contact.css) */

/* ===================== 4. Read more and Alan ===================== */
/* long texts open on demand: a quiet gold link with a chevron that turns */
.more { margin-top: 12px; }
.more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gold-text);
  font-weight: 600; font-size: 15px; border-radius: 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease-out); }
.more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.more summary:hover span { text-decoration: underline; text-underline-offset: 4px; }
.more-body { padding-top: 6px; }
.more-body p { color: var(--text-2); }
.case .more { margin-top: auto; }
.case { display: flex; flex-direction: column; }

/* the assistant section: Alan's avatar, what he is (local, beta, private) and the two ways to use him */

/* ecosystem: what I work with, grouped by what it solves */
.eco-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .eco-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .eco-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .eco-grid { grid-template-columns: 1fr; } }
.eco h3 { font-size: 17px; line-height: 1.25; margin-bottom: 12px; }
@media (min-width: 1101px) { .eco h3 { min-height: 2.5em; } }
.eco .chips li { background: transparent; }

/* ===================== 5. Summary mode ===================== */
/* a quiet notice under the bar says what is shown and how to go back */
.summary-notice { display: none; border-top: 1px solid var(--line); background: rgba(200, 149, 63, .10); }
body.summary-mode .summary-notice { display: block; animation: notice-in .35s var(--ease-out); }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }
.summary-notice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; }
.summary-notice p { margin: 0; font-size: 14px; color: var(--text); }
body.summary-mode .detail { display: none; }
/* the menu only lists what is on the page */
body.summary-mode .nav a[data-nav="story"], body.summary-mode .nav a[data-nav="cases"], body.summary-mode .nav a[data-nav="timeline"] { display: none; }

/* ===================== 6. Responsive ===================== */
@media (max-width: 1000px) {
  .hero-grid, .about-grid, .story-grid { grid-template-columns: 1fr; }
  .creds-grid, .cases-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .summary-grid, .summary-copy { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 56px; }
  .hero-portrait { --portrait-size: 84px; padding: 4px; }
  .cases-grid { grid-template-columns: 1fr; }
  .tools .view-btn { display: none; }
  .tl-head { flex-direction: column; gap: 4px; }
  .tl-wrap { padding-left: 26px; }
  .tl-rail { left: 6px; }
  .tl-stop { left: -26px; }
  .tl-side { justify-content: flex-start; }
  .tl-steps { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .tl-step { padding: 0 0 18px 30px; }
  .tl-step:last-child { padding-bottom: 0; }
  .tl-step-dot { top: 14px; left: 0; }
  .tl-step-link { top: 21px; left: 6px; width: 2px; height: 100%; }
  .tl-step-link i { background: linear-gradient(var(--gold), var(--gold-2)); transform-origin: top; }
  .tl-step-copy { padding: 8px 10px; margin-left: -10px; gap: 4px; text-align: left; }
  .tl-step-meta { justify-content: flex-start; }
  .tl-step-role { font-size: 14px; }
  .tl-steps.is-pending .tl-step-link i { transform: scaleY(0); }
  .tl-steps.steps-in .tl-step-link i { animation-name: tl-link-fill-vertical; }
  @keyframes tl-link-fill-vertical { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
@media (prefers-reduced-motion: reduce) {
  .tl-steps.is-pending .tl-step-dot { background: var(--gold); border-color: var(--gold); }
  .tl-steps.is-pending .tl-step-link i { transform: none; }
}

/* articles (articles/_template) */
.article { padding: 64px 0 80px; }
.article h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 14px; }
.article article p, .article article li { color: var(--text-2); line-height: 1.75; }

/* summary mode button: both labels are in the HTML (translated by i18n); the pressed state picks one */
.view-btn .when-on, .view-btn[aria-pressed="true"] .when-off { display: none; }
.view-btn[aria-pressed="true"] .when-on { display: inline; }
