/* ============================================================
   Career page — two-column CV layout.
   Loaded only by /career. Reuses the tokens and type scale from
   site.css; nothing here introduces a new font or color.
   ============================================================ */

/* Slightly wider measure on this page only, so the 2fr/1fr split
   leaves the project cards a readable line length. Header and grid
   share it so their left edges stay aligned. */
.shell--career{max-width:1280px}

/* ── Grid ───────────────────────────────────────────────────── */
/* DOM order is Experience, Education, Projects, Skills, which is also
   the one-column order. On desktop the sections are placed into two
   columns with named areas, so reading order stays logical. */
.career-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr);
  grid-template-areas:
    "exp  edu"
    "exp  skills"
    "proj skills";
  grid-template-rows:auto auto 1fr;
  column-gap:72px;
  padding-top:56px;padding-bottom:88px;
}
.career-grid > *{min-width:0;align-self:start}
.career-grid > .page-section{padding:0}
.career-grid .page-section + .page-section{padding-top:0}
#experience{grid-area:exp}
#education{grid-area:edu}
#projects{grid-area:proj;margin-top:64px}
#skills{grid-area:skills;margin-top:64px}

@media(max-width:959px){
  .career-grid{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"exp" "edu" "proj" "skills";
    grid-template-rows:auto;
  }
  #education{margin-top:64px}
}
@media(max-width:640px){
  .career-grid{padding-top:40px;padding-bottom:64px}
  #education,#projects,#skills{margin-top:48px}
}

/* ── Section headings ───────────────────────────────────────── */
/* Existing h2 type with a single rule under the heading. */
.career-grid .page-section-title{
  padding-bottom:12px;border-bottom:1px solid var(--ink);
}

/* ── Experience timeline ────────────────────────────────────── */
.career-timeline{
  position:relative;margin-top:28px;padding-left:32px;list-style:none;
}
/* The spine. Runs from the first node to the end of the list. */
.career-timeline::before{
  content:"";position:absolute;left:5px;top:10px;bottom:0;
  width:1px;background:var(--ink);
}
.career-item{position:relative;padding-bottom:30px}
.career-item:last-child{padding-bottom:0}
.career-node{
  position:absolute;left:-32px;top:9px;
  width:11px;height:11px;border-radius:50%;
  border:1.5px solid var(--ink);background:var(--paper);
}
.career-item.is-current .career-node{background:var(--ink)}

.career-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
}
.career-head .career-role{line-height:1.45}
.career-date-pill{
  flex-shrink:0;white-space:nowrap;
  padding:4px 10px;margin-top:2px;
  background:var(--paper-sunk);border-radius:999px;
}
.career-item .career-loc{margin-top:4px}

/* Toggle */
.career-toggle{
  display:inline-flex;align-items:center;margin-top:12px;
  font-family:var(--f-mono);font-size:10.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink);
  padding:2px 0;
}
.career-toggle:hover{color:var(--link)}

/* Collapsible body. Height animates via grid rows 0fr→1fr; visibility
   keeps collapsed text out of the accessibility tree. Without JS the
   toggles are hidden and every role stays open. */
html:not(.js) .career-toggle{display:none}
.career-details{
  display:grid;grid-template-rows:1fr;opacity:1;visibility:visible;
  transition:grid-template-rows .32s ease,opacity .24s ease,visibility 0s linear 0s;
}
.js .career-toggle[aria-expanded="false"] + .career-details{
  grid-template-rows:0fr;opacity:0;visibility:hidden;
  transition:grid-template-rows .32s ease,opacity .2s ease,visibility 0s linear .32s;
}
.career-details-inner{overflow:hidden;min-height:0}
.career-details .career-desc{margin-top:12px}

@media(max-width:640px){
  .career-timeline{padding-left:26px}
  .career-node{left:-26px}
  .career-head{flex-direction:column;gap:6px}
  .career-date-pill{margin-top:0}
}

/* ── Cards (projects + education share the frame) ───────────── */
.project-card,
.edu-card{
  border:1px solid var(--ink);border-radius:0;
  padding:24px;background:var(--paper);
}

/* Projects */
.project-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;margin-top:28px;align-items:stretch;
}
.project-card{
  display:flex;flex-direction:column;
  transition:box-shadow .18s ease;
}
.project-card:hover{box-shadow:3px 3px 0 var(--ink)}
.project-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.project-card-arrow{
  flex-shrink:0;font-size:18px;line-height:1;color:var(--ink);
  padding:2px 0 0 4px;transition:color .15s;
}
.project-card-arrow:hover{color:var(--link)}
.project-card .project-desc{max-width:none}
.project-card-foot{margin-top:auto;padding-top:6px}
.project-card .project-metrics{margin-top:12px}
.project-card .project-cta{margin-top:18px;padding-top:0;white-space:normal}

@media(max-width:640px){
  .project-grid{grid-template-columns:minmax(0,1fr)}
}

/* Education */
.edu-list{display:grid;gap:16px;margin-top:28px}
.edu-card .edu-school + .edu-detail{margin-top:10px}
.edu-year{
  font-family:var(--f-mono);font-size:11px;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-mid);
}
.edu-card .edu-focus{margin-top:10px}

/* ── Skills ─────────────────────────────────────────────────── */
.skill-groups{display:grid;gap:22px;margin-top:28px}
.skill-label{
  font-family:var(--f-mono);font-size:10px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--ink-mid);
}
.skill-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.skill-chip{
  font-family:var(--f-mono);font-size:10.5px;letter-spacing:.04em;
  text-transform:uppercase;color:var(--ink);line-height:1.4;
  border:1px solid var(--ink-mid);border-radius:0;
  padding:6px 12px;
}

/* ── Scroll reveal (added by JS only when motion is allowed) ── */
.reveal{opacity:0;transform:translateY(8px);transition:opacity .5s ease,transform .5s ease}
.reveal.is-visible{opacity:1;transform:none}

@media(prefers-reduced-motion:reduce){
  .career-details,
  .js .career-toggle[aria-expanded="false"] + .career-details,
  .project-card,
  .reveal{transition:none}
  .reveal{opacity:1;transform:none}
}
