/* The abilities page keeps its own visual and interaction styles. */
.abilities-page .personal-main { max-width: 1160px; padding-top: 52px; }
.abilities-page button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.abilities-page button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.abilities-page [hidden] { display: none !important; }
.abilities-page .ability-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; margin-bottom: 42px; }
.abilities-page h1 { font-size: clamp(36px, 4.3vw, 54px); line-height: 1.25; }
.abilities-page .title-dot { color: var(--accent); padding-left: .06em; }
.abilities-page .personal-article .ability-intro .intro-caption { margin: 16px 0 0; font-size: 15px; color: var(--accent); }
.abilities-page .personal-article .ability-intro .intro-bio { margin: 0; font-size: 14px; line-height: 1.95; }
.ability-selectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding-top: 5px; }
.ability-selectors button { position: relative; display: grid; grid-template-columns: 1fr auto; min-width: 0; padding: 15px 18px 18px; text-align: left; background: #efe4d8; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; transition: transform 200ms, background 200ms, color 200ms; }
.selector-number { font: italic 18px Georgia, serif; color: #8d706c; margin-bottom: 8px; }
.selector-title { grid-column: 1 / -1; font-size: 16px; font-weight: 600; line-height: 1.5; }
.selector-arrow { position: absolute; top: 15px; right: 17px; font-size: 20px; opacity: .6; transition: transform 200ms; }
.ability-selectors button[aria-pressed="true"] { background: var(--accent); color: #fff6ec; transform: translateY(-5px); box-shadow: 0 5px 0 var(--accent); }
.ability-selectors button[aria-pressed="true"] .selector-number { color: #f2dedb; }
.ability-selectors button[aria-pressed="true"] .selector-arrow { transform: rotate(45deg); opacity: 1; }
@media (hover: hover) {
  .ability-selectors button:hover { transform: translateY(-5px); }
  .ability-selectors button:not([aria-pressed="true"]):hover { background: #e8d8ca; }
  .scene-trigger:hover { box-shadow: inset 0 0 0 1px #844b6066; }
}
.ability-panel { --scene-paper: #ede6d9; display: grid; grid-template-columns: .95fr 1.15fr; gap: 34px; padding: 32px; background: #fcf7ef; border: 1px solid #d9c7bc; box-shadow: 0 8px 18px -17px #674438; }
.ability-panel + .ability-panel { margin-top: 24px; }
.is-enhanced .ability-panel + .ability-panel { margin-top: 0; }
.is-enhanced .ability-panel:not([hidden]) { animation: ability-arrive 300ms ease-out both; }
.ability-copy { align-self: center; padding: 8px 0; }
.abilities-page .ability-copy h2 { margin: 0 0 20px; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; }
.abilities-page .personal-article .ability-copy p { margin: 0; font-size: 15px; line-height: 1.95; }
.ability-playground { min-width: 0; }
.mini-scene { position: relative; height: 282px; overflow: hidden; background-color: var(--scene-paper); background-image: radial-gradient(#b8a89555 .7px, transparent .7px); background-size: 12px 12px; isolation: isolate; }
.scene-caption { position: absolute; top: 16px; left: 18px; z-index: 3; color: #685950; font: 10px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: .12em; }
.scene-art { display: contents; }
.scene-trigger { position: absolute; inset: 0; z-index: 5; display: block; width: 100%; height: 100%; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; transition: box-shadow 180ms; }
.scene-trigger:active { box-shadow: inset 0 0 0 2px #844b6088; }
.abilities-page .scene-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
/* Announce changes to assistive technology without a visible caption row. */
.scene-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Small, tactile studies: each demo responds once to an explicit action. */
.idea-note { position: absolute; width: 34%; height: 126px; padding: 16px 11px; box-shadow: 2px 6px 8px -5px #705a4555; }
.idea-note::before { content: ''; position: absolute; top: -6px; left: 35%; width: 30%; height: 14px; background: #faf1d6ad; transform: rotate(-4deg); }
.idea-note > span { display: block; font: 8px/1.4 Georgia, serif; letter-spacing: .04em; }
.idea-note strong { display: block; margin-top: 13px; font-family: var(--heading-font); font-size: clamp(17px, 1.9vw, 23px); font-weight: 400; white-space: nowrap; }
.idea-note i { display: block; margin-top: 7px; font-size: 10px; line-height: 1.5; font-style: normal; }
.note-one { top: 82px; left: 8%; background: #f5e6b9; transform: rotate(-12deg); z-index: 3; }
.note-two { top: 61px; left: 34%; background: #e6bfb6; transform: rotate(8deg); z-index: 2; }
.note-three { top: 116px; left: 56%; background: #cdd7c5; transform: rotate(-5deg); z-index: 4; }
.plan-track { position: absolute; left: 8%; right: 8%; top: 152px; border-top: 1px dashed #927c66; transform: scaleX(0); transition: transform 450ms; }
.pencil-mark { position: absolute; bottom: 14px; left: 18px; font: 12px var(--heading-font); color: #786257; }
.is-transformed .idea-note { width: 29%; top: 87px; transform: rotate(0); }
.is-transformed .note-one { left: 4%; }
.is-transformed .note-two { left: 35.5%; }
.is-transformed .note-three { left: 67%; }
.is-transformed .plan-track { transform: scaleX(1); }
.is-transformed .idea-note i { font-size: 9px; }

.design-scene { --scene-paper: #e6e4df; }
.layout-print { position: absolute; width: 76%; height: 203px; left: 12%; top: 45px; background: #f9f3e8; box-shadow: 3px 6px 8px -4px #5f4e4140; transform: rotate(-4deg); transition: transform 550ms; }
.print-index { position: absolute; top: 10px; left: 14px; font: 8px Georgia, serif; letter-spacing: .1em; }
.print-art { position: absolute; top: 30px; left: 12px; bottom: 16px; width: 44%; background: #c9d0bd; overflow: hidden; }
.print-art span { position: absolute; width: 110px; height: 110px; background: #bc765f; border-radius: 50%; bottom: -15px; left: -22px; }
.print-art i { position: absolute; width: 75px; height: 150px; background: #f0dcab; transform: rotate(35deg); top: -12px; right: -25px; border-radius: 60px; }
.print-copy { position: absolute; left: 53%; right: 10px; top: 37px; }
.print-copy small { font: 6px Georgia, serif; letter-spacing: .06em; }
.print-copy strong { display: block; font: 22px/1.35 var(--heading-font); margin-top: 10px; white-space: nowrap; }
.print-rule { display: block; width: 24px; height: 2px; background: #a66c55; margin: 12px 0 8px; }
.print-line { display: block; width: 85%; border-top: 2px solid #c8b9a8; margin-top: 5px; }
.print-line.short { width: 65%; }
.print-copy b { display: block; font: 9px sans-serif; margin-top: 14px; color: #76584d; }
.layout-measure { position: absolute; bottom: 12px; left: 18px; font: 11px var(--heading-font); color: #6d6559; }
.is-transformed .layout-print { transform: rotate(2deg); }
.is-transformed .print-art { left: 60%; top: 26px; width: 35%; height: 145px; }
.is-transformed .print-copy { left: 7%; right: 43%; top: 30px; }

.ai-scene { --scene-paper: #e7dde6; }
.idea-seed { position: absolute; top: 72px; left: 50%; width: 132px; height: 147px; padding: 13px 9px; background: #f6edf1; border: 1px solid #bba2b2; text-align: center; box-shadow: 3px 5px 8px -5px #69506466; transform: translateX(-50%) rotate(-5deg); z-index: 2; }
.idea-seed > span { display: block; color: #8b5974; font-size: 43px; line-height: 1.4; }
.idea-seed strong { display: block; font: 20px/1.7 var(--heading-font); }
.idea-seed small { font-size: 10px; color: #806477; }
.ai-orbit { position: absolute; left: 50%; top: 54px; width: 204px; height: 204px; border: 1px dashed #ab8aa3; border-radius: 50%; transform: translateX(-50%); }
.possibility { position: absolute; width: 31%; top: 130px; padding: 13px 9px; background: #f9f0e6; box-shadow: 2px 5px 8px -5px #68536766; opacity: 0; transform: translateY(35px) rotate(-5deg); transition: opacity 350ms, transform 550ms; z-index: 3; }
.possibility > span { display: block; font: italic 12px/1.2 Georgia, serif; color: #99768c; }
.possibility strong { display: block; font: 17px/1.8 var(--heading-font); white-space: nowrap; }
.possibility small { display: block; font-size: 9px; line-height: 1.5; color: #806b77; }
.possibility-one { left: 2%; }
.possibility-two { left: 34.5%; top: 147px; transition-delay: 70ms; }
.possibility-three { left: 67%; transition-delay: 140ms; }
.ai-footnote { position: absolute; bottom: 12px; left: 18px; font: 11px var(--heading-font); color: #806477; }
.is-transformed .idea-seed { top: 25px; transform: translateX(-50%) scale(.66); }
.is-transformed .possibility { opacity: 1; transform: translateY(0) rotate(0); }
.is-transformed .ai-orbit { top: 80px; width: 75%; height: 130px; }

.content-scene { --scene-paper: #e6e1d0; }
.story-sheet { position: absolute; top: 47px; left: 19%; width: 65%; height: 205px; padding: 20px 22px; background: #faf2df; box-shadow: 2px 6px 8px -4px #66563b55; transform: rotate(3deg); transition: transform 500ms; }
.story-sheet > span:first-child { font-size: 10px; color: #7b6b51; }
.story-sheet strong { display: block; position: relative; margin-top: 7px; font: 27px/1.35 var(--heading-font); }
.story-sheet em { position: relative; z-index: 1; color: #6b5744; font-style: normal; }
.story-sheet em::before { content: ''; position: absolute; z-index: -1; left: -4px; right: -4px; bottom: 0; height: 12px; background: #dba191; transform-origin: left; transform: scaleX(0); transition: transform 500ms; }
.story-lines { margin-top: 18px; transition: opacity 500ms; }
.story-lines i { display: block; width: 95%; border-top: 2px solid #cebe9e; margin: 6px 0; }
.story-lines i:last-child { width: 64%; }
.story-sign { position: absolute; left: 22px; bottom: 12px; font-size: 8px; color: #807259; }
.edit-label { position: absolute; padding: 3px 10px; font-size: 12px; background: #d9b2a7; transform: rotate(-8deg); box-shadow: 1px 2px 4px #6c51491a; transition: transform 500ms; }
.label-title { top: 54px; left: 4%; }
.label-image { right: 3%; bottom: 27px; background: #c4cdb2; transform: rotate(6deg); }
.story-circle { position: absolute; width: 49%; height: 72px; left: 24%; top: 116px; border: 2px solid #aa6657; border-radius: 50%; transform: rotate(-7deg) scale(.7); opacity: 0; transition: opacity 350ms, transform 500ms; }
.is-transformed .story-sheet { transform: rotate(-2deg); }
.is-transformed .story-sheet em::before { transform: scaleX(1); }
.is-transformed .story-circle { transform: rotate(-7deg) scale(1); opacity: 1; }
.is-transformed .story-lines { opacity: .45; }
.is-transformed .label-title { transform: rotate(-3deg) translateY(-8px); }
.is-transformed .label-image { transform: rotate(0) translateY(8px); }

.ability-connection { display: grid; grid-template-columns: .95fr 1.15fr; gap: 66px; margin-top: 58px; }
.abilities-page .ability-connection h2 { font-size: 31px; line-height: 1.5; margin: 8px 0 0; }
.abilities-page .ability-connection p:not(.page-label):not(.page-action) { font-size: 14px; line-height: 1.95; margin-bottom: 16px; }
.abilities-page .ability-connection .page-action { margin-top: 18px; }
.ability-connection .page-action a { text-decoration: none; border-bottom: 1px solid var(--accent); font-size: 14px; }
.ability-connection .page-action a span { margin-left: 18px; }
.abilities-page .page-footer { margin-top: 40px; }
@keyframes ability-arrive { from { opacity: .3; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .abilities-page .ability-intro { grid-template-columns: 1fr; gap: 22px; margin-bottom: 30px; }
  .abilities-page .intro-bio { max-width: 690px; }
  .ability-panel { gap: 24px; padding: 26px 22px; grid-template-columns: .9fr 1.1fr; }
  .ability-selectors button { padding: 12px 13px 14px; }
  .selector-title { font-size: 14px; }
  .selector-arrow { right: 12px; }
  .idea-note { padding: 15px 8px; }
  .idea-note i { font-size: 9px; }
  .print-copy strong { font-size: 19px; }
  .ability-connection { gap: 34px; }
}
@media (max-width: 700px) {
  .abilities-page .personal-main { padding-top: 30px; }
  .ability-selectors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .ability-selectors button { border-radius: 4px; border: 1px solid #dbcbbf; padding: 12px 14px; }
  .ability-selectors button[aria-pressed="true"] { transform: none; box-shadow: none; }
  .selector-number { margin-bottom: 4px; font-size: 15px; }
  .selector-title { font-size: 15px; }
  .selector-arrow { top: 9px; }
  .ability-panel { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .ability-copy { padding: 0; }
  .abilities-page .ability-copy h2 { font-size: 29px; margin: 0 0 14px; }
  .mini-scene { max-width: 460px; margin: 0 auto; }
  .idea-note strong { font-size: clamp(11px, 3.2vw, 17px); }
  .possibility strong { font-size: clamp(11px, 3.4vw, 17px); }
  .print-copy strong { font-size: clamp(12px, 4vw, 19px); }
  .ability-connection { grid-template-columns: 1fr; gap: 25px; margin-top: 40px; }
  .abilities-page .ability-connection h2 { font-size: 29px; }
}
@media (max-width: 380px) {
  .abilities-page h1 { font-size: 34px; }
  .abilities-page .personal-article .ability-intro .intro-caption { font-size: 13px; }
  .ability-panel { padding: 20px 14px; }
  .ability-selectors button { padding: 10px 12px; }
  .selector-title { font-size: 13px; }
  .idea-note { padding-left: 6px; padding-right: 6px; }
  .idea-note i { font-size: 8px; }
  .idea-note > span { font-size: 7px; }
  .story-sheet { left: 15%; width: 72%; padding-left: 18px; }
  .story-sheet strong { font-size: 24px; }
  .possibility small { font-size: 8px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .abilities-page .personal-header { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .abilities-page .ability-workbench *, .abilities-page .ability-workbench *::before { animation: none !important; transition: none !important; }
}
@media print {
  .ability-selectors, .scene-trigger, .scene-status { display: none !important; }
  .abilities-page .ability-panel[hidden] { display: grid !important; }
  .ability-panel { break-inside: avoid; margin-top: 20px !important; box-shadow: none; animation: none !important; }
  .abilities-page .ability-intro { grid-template-columns: 1fr; }
}
