/* Title-first records and visuals. Each role, paper, education entry and project is a native details
   element. Its summary shows one visual and the title; the body holds the detail and opens on click.
   Opening works without JavaScript. Visuals are aria-hidden SVG, or the existing project images. */

.role-record,.paper-record,.education-entry,.project-record{display:block;min-width:0}
.role-record,.paper-record,.education-entry{padding:0;border-top:1px solid var(--rule)}
.record-disclosure{min-width:0}
.record-disclosure>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:18px;padding:22px 0;list-style:none;cursor:pointer;color:var(--ink)}
.record-disclosure>summary::-webkit-details-marker{display:none}
.record-disclosure>summary:focus-visible{outline:2px solid var(--accent);outline-offset:6px;border-radius:4px}
.record-disclosure>summary::after{content:"";grid-column:3;grid-row:1;justify-self:end;width:14px;height:14px;color:var(--accent);background:linear-gradient(currentColor,currentColor) center/14px 2px no-repeat,linear-gradient(currentColor,currentColor) center/2px 14px no-repeat}
.motion-on .record-disclosure>summary::after{transition:transform 280ms var(--ease-arrive)}
.record-disclosure[open]>summary::after{transform:rotate(45deg)}
.record-disclosure>summary>h3{grid-column:2;grid-row:1;margin:0;font-size:clamp(1.25rem,2.1vw,1.65rem);font-weight:500;line-height:1.16;letter-spacing:-.02em;overflow-wrap:anywhere}
.record-disclosure>summary>h3 a{color:var(--ink);text-decoration:none}
.record-disclosure>summary:hover>h3,.record-disclosure>summary:focus-visible>h3{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.2em}
.record-disclosure>summary>.record-meta{grid-column:2;display:block;margin-top:6px;font-size:14px;line-height:1.5;color:var(--muted)}
.record-disclosure>summary>.ledger-date{grid-column:2;justify-self:start;display:inline-block;margin-top:10px;padding:3px 12px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:14px;line-height:1.5}
/* The title link is a label inside the summary. The summary is the control, so the click passes through. */
.summary-link{pointer-events:none}
.record-body{padding:0 0 26px}

/* Roles and education: a fixed tile on the left, title beside it, body aligned under the title. */
.record-disclosure.is-tiled{--tile-w:120px;--tile-h:84px}
.record-disclosure.is-tiled>.record-body{padding-left:calc(var(--tile-w) + 18px)}
.record-tile{grid-column:1;grid-row:1 / span 3;display:grid;grid-template-rows:minmax(0,1fr);place-items:center;box-sizing:border-box;width:var(--tile-w);height:var(--tile-h);padding:10px;background:var(--surface);border:1px solid var(--rule);border-radius:4px;overflow:hidden}
.record-tile .record-logo{display:block;width:72%;height:auto;max-height:64%;overflow:visible}
.record-tile .record-icon{display:block;width:40%;height:auto;aspect-ratio:1/1;overflow:visible}
.record-disclosure.is-scene{--tile-w:200px}
.record-tile.is-scene{width:var(--tile-w);height:auto;aspect-ratio:8/5;padding:0;border:0;background:none;overflow:hidden}
.record-tile.is-scene .skill-scene{width:100%;height:100%;max-width:none;margin:0}
.record-tile.is-scene .scene-cloud{fill:var(--accent-soft)}
.record-logo{color:var(--ink)}
.record-icon{color:var(--accent)}

/* Projects and papers: a framed image on top, the title below. Every frame has the same ratio and surface. */
.record-disclosure.is-framed>summary{grid-template-columns:minmax(0,1fr) auto;align-items:start;row-gap:0;padding:0 0 12px}
.record-disclosure.is-framed>summary>.record-frame{grid-column:1 / -1;grid-row:1}
.record-disclosure.is-framed>summary>h3{grid-column:1;grid-row:2;margin-top:16px}
.record-disclosure.is-framed>summary>.record-meta{grid-column:1;margin-top:6px}
.record-disclosure.is-framed>summary::after{grid-column:2;grid-row:2;margin-top:22px}
.record-frame{position:relative;display:block;height:clamp(180px,22vw,300px);overflow:hidden;margin:0;background:var(--surface);border:1px solid var(--rule);border-radius:3px}
.record-frame>.project-figure{position:absolute;inset:0;display:block;margin:0}
.record-frame>.skill-scene{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0}
#projects .record-frame .project-image{position:absolute;inset:10px;width:calc(100% - 20px);height:calc(100% - 20px);max-width:none;object-fit:contain;transform:none}
.record-frame .logo-image{position:absolute;top:50%;left:50%;translate:-50% -50%;width:auto;height:auto;max-width:50%;max-height:50%;object-fit:contain}
#projects .record-frame>.item-object{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0;padding:14px;border:0;border-radius:0;background:none;box-sizing:border-box}
.record-frame>.skill-scene{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0}

/* Skill areas and papers: one drawn board per area. Ink and accent only, from the page tokens. */
.skill-scene{display:block;width:100%;max-width:420px;height:auto;margin:0 0 22px}
.skill-scene .scene-board{fill:var(--surface);stroke:var(--rule);stroke-width:1.5}
.skill-scene .scene-cloud{fill:var(--accent-soft)}
.skill-scene .scene-ink{color:var(--ink)}
.skill-scene .scene-accent{color:var(--accent)}

/* Credentials: one icon per entry, with the text beside it. Issuer logos sit in the group summary. */
.cred-item{display:grid;grid-template-columns:24px minmax(0,1fr);gap:0 14px;align-items:start}
.cred-icon{display:block;padding-top:2px}
.cred-icon svg{display:block;width:20px;height:20px;color:var(--accent)}
.cred-text{min-width:0}
.group-logo{display:inline-block;width:auto;height:18px;max-width:96px;margin-right:12px;vertical-align:-3px;color:var(--ink)}

/* Decorative clouds at the top of a section. They sit behind the heading and never take a pointer. */
.section-sky{position:absolute;top:0;right:0;z-index:0;width:clamp(180px,30vw,340px);height:auto;pointer-events:none;overflow:visible}
.section-sky .sky-cloud{fill:var(--accent-soft)}
.section-heading{position:relative;z-index:1}

@media(max-width:700px){
  .record-disclosure.is-tiled>.record-body{padding-left:0}
  .record-disclosure.is-tiled>summary{grid-template-columns:minmax(0,1fr) auto}
  .record-disclosure.is-tiled>summary>.record-tile{grid-column:1;grid-row:1;margin-bottom:14px}
  .record-disclosure.is-tiled>summary>h3,.record-disclosure.is-tiled>summary>.record-meta,.record-disclosure.is-tiled>summary>.ledger-date{grid-column:1}
  .record-disclosure.is-tiled>summary::after{grid-column:2;grid-row:2}
  .record-disclosure.is-tiled>summary>h3{grid-row:2}
  .record-disclosure.is-tiled>summary>.record-meta{grid-row:3}
  .record-disclosure.is-tiled>summary>.ledger-date{grid-row:4}
  .record-disclosure.is-tiled{--tile-w:96px;--tile-h:72px}
  .record-disclosure.is-scene{--tile-w:150px}
  .record-disclosure>summary{column-gap:14px;padding:18px 0}
  .record-disclosure>summary>h3{font-size:1.2rem}
  .record-disclosure.is-framed>summary>h3{margin-top:12px}
  .section-sky{width:150px}
  .cred-item{grid-template-columns:20px minmax(0,1fr);gap:0 10px}
}

@media print{
  .section-sky{display:none}
}

/* The original artwork link stays in the DOM with its href and label. Pointer events pass through it, so a
   click on the photo opens the record. Keyboard users still reach the link. */
.record-frame .project-image-link{position:absolute;inset:0;display:block;margin:0;pointer-events:none}
/* The focus ring sits inside the frame, because the frame clips anything drawn outside its edge. */
.record-frame .project-image-link:focus-visible{outline:3px solid var(--accent);outline-offset:-3px;border-radius:3px}
@media print{
  .record-disclosure>summary::after{display:none}
}

/* Experience detail lists. The grid resets the native marker, so each bullet is a filled dot in the accent, drawn
   with a pseudo-element and centred on the first line of text. The dot is a circle rather than the glyph, so it
   keeps the same size and weight in every font. */
.role-record .ledger-list>li{position:relative;padding-left:1.45em}
.role-record .ledger-list>li::before{content:"";position:absolute;left:.15em;top:.625em;width:.46em;height:.46em;border-radius:50%;background:var(--accent)}
