/* Education composition: four cards and a single tools panel. */
html body #education{--card-bg:#ededed;--card-deep:#e0e0e0;--card-ink:#26212d;--card-muted:#51475d;--card-accent:#315fcd;--chip-bg:#d6dbe6}
:root[data-theme="dark"] body #education{--card-bg:#1b191f;--card-deep:#141217;--card-ink:#f7f7f7;--card-muted:#ccc5d3;--card-accent:#cbcbcb;--chip-bg:#302b37}
html body #education>.wrap{grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:0 16px;border-top:0;padding-top:24px}
html body #education .education-block{display:block;grid-column:1;grid-row:2}
html body #education .education-intro{margin:0 0 20px}
html body #education .education-intro h3{font-size:clamp(25px,2.5vw,34px)}
html body #education .education-intro>p{font-size:16px}
html body #education .education-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html body #education .education-item{position:relative;overflow:hidden;display:flex;flex-direction:column;gap:0;min-width:0;min-height:292px;padding:22px;border:0;border-radius:24px;background:var(--card-bg);color:var(--card-ink);box-shadow:none}
html body #education .education-item.education-card--puzzles{background:var(--card-deep)}
html body #education .education-art{display:grid;place-items:center;width:80px;height:80px;margin-bottom:24px;border-radius:19px;background:var(--chip-bg)}
html body #education .education-art img{display:block;width:80px;height:80px;object-fit:contain}
html body #education .education-card--puzzles .education-art{position:absolute;z-index:0;top:-20px;right:-22px;align-self:auto;width:176px;height:144px;margin:0;background:none;transform:rotate(12deg)}
html body #education .education-card--puzzles .education-art img{width:176px;height:144px}
html body #education .education-card-meta{position:relative;z-index:1;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:auto;margin-bottom:8px}
html body #education .education-year{padding:0;color:var(--card-ink);font-size:17px;font-weight:750;line-height:1.4}
html body #education .education-tag{display:inline-flex;align-items:center;font-family:inherit;font-size:10px;font-style:normal;font-weight:700;line-height:1.5;letter-spacing:.05em;color:var(--card-ink)}
html body #education .education-copy{position:relative;z-index:1}.education-copy h4{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;font-size:20px;line-height:1.2;font-weight:650;color:var(--card-ink);margin:0 0 9px;overflow-wrap:break-word}
html body #education .education-copy p{font-size:15px;line-height:1.5;color:var(--card-muted);margin:0}
html body #education .education-copy .education-provider{font-size:13px;margin-top:8px}
html body #education .tool-group{display:flex;flex-direction:column;grid-column:2;grid-row:2;align-self:stretch;position:relative;margin:0;padding:24px;border:0;border-radius:24px;background:var(--card-bg);color:var(--card-ink);overflow:hidden}
html body #education .resume-butterfly{position:absolute;z-index:0;top:-62px;right:-86px;display:block;width:78%;height:340px;margin:0;pointer-events:none;overflow:hidden}
html body #education .resume-butterfly img{display:block;width:100%;height:100%;object-fit:contain;transform:rotate(23deg)}
html body #education .tool-group h3{position:relative;z-index:1;color:var(--card-ink);font-size:clamp(27px,2.7vw,38px);line-height:1.1;margin:164px 0 22px;padding:0;max-width:11em}
html body #education .tool-group .tools.resume-tools{position:relative;z-index:1;display:flex;flex-direction:column;flex-wrap:nowrap;gap:9px;margin-top:0;align-items:stretch}
html body #education .resume-tool-row{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
html body #education .tool-group .resume-tools .tool{flex:1 1 42%;min-width:0;min-height:56px;padding:9px;gap:8px;border:0!important;border-radius:14px;background:var(--chip-bg);color:var(--card-ink);font-size:14px;line-height:1.35;box-shadow:none!important}
html body #education .tool-group .resume-tools .tool--agents{flex:1 1 100%}
html body #education .tool-group .resume-tools .tool>span:last-child{min-width:0;overflow-wrap:anywhere}
@media(min-width:1550px){html body #education .education-item{min-height:310px}}
@media(max-width:1100px){html body #education>.wrap{grid-template-columns:1fr}html body #education .tool-group{grid-column:1;grid-row:3;margin-top:16px}html body #education .resume-butterfly{top:-58px;right:-48px;width:46%;height:270px}html body #education .resume-butterfly img{height:100%}html body #education .tool-group h3{min-height:0;max-width:50%;display:block;margin-top:122px}html body #education .tool-group .resume-tools .tool{flex:1 1 28%}}
@media(max-width:600px){html body #education>.wrap{padding-top:20px}html body #education .education-list{gap:10px}html body #education .education-item{padding:17px;min-height:280px;border-radius:20px}html body #education .education-art{width:64px;height:64px;margin-bottom:20px}html body #education .education-art img{width:64px;height:64px}html body #education .education-copy h4{font-size:18px}html body #education .education-copy p{font-size:14px}html body #education .education-copy .education-provider{font-size:12px}html body #education .education-year{font-size:16px}html body #education .education-card--puzzles .education-art{width:100px;height:80px;margin:0 -5px 10px 0}html body #education .education-card--puzzles .education-art img{width:110px;height:90px}html body #education .tool-group{padding:20px}html body #education .tool-group h3{font-size:28px;min-height:0;margin-top:108px;margin-bottom:16px}html body #education .resume-butterfly{width:56%;height:226px;top:-34px;right:-45px}html body #education .resume-butterfly img{height:100%}html body #education .tool-group .resume-tools .tool{flex-basis:42%;font-size:13px}}
@media(max-width:390px){html body #education .education-list{grid-template-columns:1fr}html body #education .education-item{min-height:250px}html body #education .education-art{margin-bottom:22px}}

html body #education .education-kicker,html body #education .serious-intro h2 span{color:var(--card-ink)!important}

@media(max-width:600px){html body #education .education-item.education-card--puzzles{overflow:hidden}html body #education .education-card--puzzles .education-art{top:-10px;right:-14px;width:132px;height:108px;transform:rotate(13deg)}html body #education .education-card--puzzles .education-art img{width:132px;height:108px}}

/* Align the tools panel with the four education cards. */
html body #education .education-block{display:contents}
html body #education .education-intro{grid-column:1;grid-row:2}
html body #education .education-list{grid-column:1;grid-row:3}
html body #education .tool-group{grid-column:2;grid-row:3;align-self:stretch}
html body #education .resume-butterfly img{transform:scaleX(-1) rotate(23deg)}
html body #education .tool-group h3{margin-top:100px}
html body #education .resume-tool-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px}
html body #education .tool-group .tools.resume-tools{gap:9px}
html body #education .tool-group .resume-tools .tool{width:100%;box-sizing:border-box;flex:none;min-height:48px}
@media(max-width:1100px){
 html body #education .education-intro{grid-column:1;grid-row:2}
 html body #education .education-list{grid-column:1;grid-row:3}
 html body #education .tool-group{grid-column:1;grid-row:4;margin-top:16px}
 html body #education .tool-group h3{margin-top:100px}
}
@media(max-width:600px){
 html body #education .resume-tool-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 html body #education .tool-group .resume-tools .tool{min-height:46px}
}

/* Unified rows and a separate illustration area, following the reference. */
html body #education>.wrap{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
html body #education .education-item{min-height:310px}
html body #education .education-copy{min-height:116px}
html body #education .education-copy h4{align-items:baseline;min-height:0}
html body #education .education-copy h4 .education-tag{color:var(--card-ink)!important;align-self:baseline;margin:0;padding:0;font-family:inherit;font-style:normal;font-size:11px;line-height:1.5}
html body #education .tool-group{padding-top:210px;isolation:isolate}
html body #education .resume-butterfly{top:-64px;right:-45px;width:76%;height:250px;overflow:visible}
html body #education .resume-butterfly img{transform:scaleX(-1) rotate(12deg)}
html body #education .tool-group h3{margin:0 0 22px;max-width:none;font-size:clamp(28px,2.6vw,38px);line-height:1.08;min-height:0}
html body #education .tool-group .tools.resume-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0}
html body #education .resume-tool-row{display:contents}
html body #education .tool-group .resume-tools .tool{min-height:48px;align-items:center}
html body #education .tool-group .resume-tools .tool--agents{grid-column:auto;font-size:13px}
@media(max-width:1100px){
 html body #education>.wrap{grid-template-columns:minmax(0,1fr)}
 html body #education .tool-group{padding-top:180px}
 html body #education .resume-butterfly{width:45%;height:220px;top:-40px;right:-24px}
 html body #education .tool-group h3{margin-top:0}
}
@media(max-width:600px){
 html body #education .education-item{min-height:295px}
 html body #education .education-copy{min-height:132px}
 html body #education .tool-group{padding-top:160px}
 html body #education .resume-butterfly{width:68%;height:190px;top:-35px;right:-35px}
 html body #education .tool-group h3{margin:0 0 20px;max-width:none}
}

/* Reference composition: cropped upper-right butterfly, with its own flow area. */
html body #education .tool-group{padding-top:24px}
html body #education .resume-butterfly{position:relative;inset:auto;display:block;flex:none;align-self:stretch;width:calc(100% + 48px);height:auto;min-height:0;aspect-ratio:2.4;margin:-24px -24px 24px;overflow:hidden}
html body #education .resume-butterfly img{position:absolute;top:-18%;right:-16%;display:block;width:74%;max-width:none;height:auto;object-fit:contain;transform:scaleX(-1);transform-origin:center}
html body #education .tool-group h3{margin-top:0}
@media(max-width:600px){
 html body #education .tool-group{padding-top:20px}
 html body #education .resume-butterfly{width:calc(100% + 40px);aspect-ratio:2.25;margin:-20px -20px 20px}
 html body #education .resume-butterfly img{top:-12%;right:-16%;width:74%;height:auto;transform:scaleX(-1)}
}

/* User-approved neutral surfaces and upper-right butterfly composition. */
:root[data-theme="dark"] body #education{--card-bg:#1c1c1c;--card-deep:#141414;--chip-bg:#303030;--card-ink:#f7f7f7;--card-muted:#cccccc}
html body #education .resume-butterfly{aspect-ratio:2.05;margin-bottom:12px}
html body #education .resume-butterfly img{top:-18%;right:-9%;width:78%;height:auto;transform:scaleX(-1)}
@media(max-width:600px){
 html body #education .resume-butterfly{aspect-ratio:2.05;margin-bottom:16px}
 html body #education .resume-butterfly img{top:-18%;right:-9%;width:78%;height:auto;transform:scaleX(-1)}
}

/* Match the panel edges and equal education rows shown in the user's layout. */
html body #education .education-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;align-self:stretch}
html body #education .education-item{box-sizing:border-box;height:100%;min-height:310px;margin:0;padding:22px;align-self:stretch}
html body #education .education-card-meta{margin-top:auto}
html body #education .education-copy{min-height:116px}
html body #education .tool-group{box-sizing:border-box;align-self:stretch;height:100%;margin:0;padding-bottom:22px}
html body #education .tool-group .tools.resume-tools{margin-top:auto}
@media(max-width:1100px){
 html body #education .tool-group{height:auto;margin-top:16px}
 html body #education .tool-group .tools.resume-tools{margin-top:0}
}
@media(max-width:600px){
 html body #education .education-item{min-height:295px;padding:17px}
 html body #education .education-copy{min-height:132px}
}
@media(max-width:390px){
 html body #education .education-list{grid-template-columns:1fr;grid-template-rows:none;grid-auto-rows:auto}
 html body #education .education-item{height:auto}
}

/* Compact content flow: remove the marked empty vertical areas. */
html body #education .education-list{grid-template-rows:repeat(2,auto);align-content:start;align-self:start}
html body #education .education-item{height:auto;min-height:0;padding:22px;display:flex;flex-direction:column;justify-content:flex-start}
html body #education .education-art{margin-bottom:20px}
html body #education .education-card-meta{margin-top:0;margin-bottom:8px}
html body #education .education-copy{min-height:0}
html body #education .education-card--puzzles{padding-top:124px}
html body #education .tool-group{height:auto;align-self:start;padding-bottom:22px}
html body #education .resume-butterfly{aspect-ratio:3.1;margin-bottom:12px}
html body #education .resume-butterfly img{width:59%;right:-6%;top:-24%}
html body #education .tool-group h3{margin-bottom:18px}
html body #education .tool-group .tools.resume-tools{margin-top:0;gap:8px}
html body #education .tool-group .resume-tools .tool{min-height:44px;padding:6px 9px}
@media(max-width:600px){
 html body #education .education-item{min-height:0;padding:17px}
 html body #education .education-copy{min-height:0}
 html body #education .education-card--puzzles{padding-top:108px}
 html body #education .resume-butterfly{aspect-ratio:2.8;margin-bottom:12px}
 html body #education .resume-butterfly img{width:65%;right:-7%;top:-22%}
 html body #education .tool-group{height:auto}
}

/* Bring the tools panel down to the compact four-card group's height. */
html body #education .tool-group{align-self:stretch;height:100%;min-height:0;display:grid;grid-template-rows:minmax(105px,1fr) auto auto;gap:0;padding-bottom:18px}
html body #education .resume-butterfly{position:relative;width:calc(100% + 48px);height:100%;min-height:105px;aspect-ratio:auto;margin:-24px -24px 0;overflow:hidden}
html body #education .resume-butterfly img{top:-42%;right:-4%;width:55%;height:auto;transform:rotate(-18deg) scaleX(-1);transform-origin:center}
html body #education .tool-group h3{font-size:clamp(27px,2.2vw,34px);line-height:1.08;margin:8px 0 14px}
html body #education .tool-group .tools.resume-tools{margin:0;gap:6px}
html body #education .tool-group .resume-tools .tool{min-height:40px;padding:4px 8px;font-size:13px}
html body #education .tool-group .resume-tools .tool--agents{font-size:12px}
@media(max-width:1100px){
 html body #education .tool-group{height:auto;grid-template-rows:145px auto auto}
 html body #education .resume-butterfly img{top:-40%;right:-3%;width:46%}
}
@media(max-width:600px){
 html body #education .tool-group{height:auto;grid-template-rows:120px auto auto;padding-bottom:20px}
 html body #education .resume-butterfly{width:calc(100% + 40px);margin:-20px -20px 0;min-height:120px}
 html body #education .resume-butterfly img{top:-25%;right:-5%;width:65%;transform:rotate(-18deg) scaleX(-1)}
 html body #education .tool-group .resume-tools .tool{min-height:44px}
}

/* Smaller course icons and their neutral tiles. */
html body #education .education-item:not(.education-card--puzzles) .education-art{width:56px;height:56px;border-radius:15px;margin-bottom:16px}
html body #education .education-item:not(.education-card--puzzles) .education-art img{width:56px;height:56px}
@media(max-width:600px){
 html body #education .education-item:not(.education-card--puzzles) .education-art{width:48px;height:48px;border-radius:13px;margin-bottom:14px}
 html body #education .education-item:not(.education-card--puzzles) .education-art img{width:48px;height:48px}
}

/* Keep the rotated butterfly completely inside its illustration area. */
html body #education .resume-butterfly{height:100%;min-height:120px;overflow:visible;margin-top:0}
html body #education .resume-butterfly img{top:50%;right:3%;width:52%;height:100%;max-height:100%;object-fit:contain;transform:translateY(-50%) rotate(-18deg) scaleX(-1) scale(.78);transform-origin:center}
@media(max-width:1100px){
 html body #education .resume-butterfly img{top:50%;right:3%;width:48%;height:100%;transform:translateY(-50%) rotate(-18deg) scaleX(-1) scale(.78)}
}
@media(max-width:600px){
 html body #education .resume-butterfly{margin-top:0;overflow:visible}
 html body #education .resume-butterfly img{top:50%;right:4%;width:65%;height:100%;transform:translateY(-50%) rotate(-18deg) scaleX(-1) scale(.78)}
}

/* Butterfly placement from the latest supplied composition. */
html body #education .tool-group{grid-template-rows:minmax(140px,1fr) auto auto}
html body #education .resume-butterfly{width:calc(100% + 48px);min-height:140px;height:100%;margin:-24px -24px 8px;overflow:hidden}
html body #education .resume-butterfly img{top:50%;right:-3%;width:57%;height:112%;max-height:none;object-fit:contain;transform:translateY(-50%) scaleX(-1);transform-origin:center}
html body #education .tool-group h3{font-size:clamp(25px,2.2vw,34px);line-height:1.12;white-space:normal;margin:8px 0 18px}
@media(max-width:1100px){
 html body #education .tool-group{grid-template-rows:175px auto auto}
 html body #education .resume-butterfly img{top:50%;right:-2%;width:55%;height:112%;transform:translateY(-50%) scaleX(-1)}
}
@media(max-width:600px){
 html body #education .tool-group{grid-template-rows:145px auto auto}
 html body #education .resume-butterfly{width:calc(100% + 40px);min-height:145px;margin:-20px -20px 8px;overflow:hidden}
 html body #education .resume-butterfly img{top:50%;right:-4%;width:72%;height:110%;transform:translateY(-50%) scaleX(-1)}
 html body #education .tool-group h3{font-size:25px}
}

/* Geometry measured from the supplied 1423 x 576 reference. */
html body #education .tool-group{container-type:inline-size;display:flex;flex-direction:column;padding:20px;min-height:0;height:auto;align-self:stretch}
html body #education .resume-butterfly{position:relative;inset:auto;flex:0 0 auto;width:calc(100% + 40px);height:auto;min-height:0;aspect-ratio:1423 / 470;margin:-20px -20px 20px;overflow:hidden}
html body #education .resume-butterfly img{position:absolute;top:-6%;right:-2%;width:52%;max-width:none;height:auto;max-height:none;object-fit:initial;transform:scaleX(-1);transform-origin:center}
html body #education .tool-group h3{display:block;flex:none;max-width:none;min-height:0;font-size:clamp(25px,5.35cqw,76px);line-height:1.08;letter-spacing:-.035em;margin:0 0 18px;white-space:normal}
html body #education .tool-group .tools.resume-tools{flex:none;margin:0}
@media(max-width:600px){
 html body #education .tool-group{height:auto}
 html body #education .resume-butterfly{height:auto;min-height:0;aspect-ratio:1423 / 470;margin:-20px -20px 20px}
 html body #education .resume-butterfly img{top:-6%;right:-2%;width:52%;height:auto;max-height:none;transform:scaleX(-1)}
 html body #education .tool-group h3{font-size:clamp(23px,5.35cqw,32px)}
}

/* Lift the tools content to the lower edge of the education cards. */
@media(min-width:1101px){
 html body #education .tool-group{align-self:start}
 html body #education .resume-butterfly{aspect-ratio:1423 / 365;overflow:visible}
 html body #education .resume-butterfly img{top:-10%;right:-2%;width:48%;height:auto;transform:scaleX(-1)}
}

/* Align the lower pair's years and titles below their artwork. */
html body #education .education-item.education-card--megaphone .education-art{margin-bottom:46px}
@media(max-width:600px){html body #education .education-item.education-card--megaphone .education-art{margin-bottom:43px}}

/* With the resume divider removed, start courses and cards at the section top. */
html body #education .education-intro{grid-row:1}
html body #education .education-list{grid-row:2}
html body #education .tool-group{grid-row:2}
@media(max-width:1100px){
 html body #education .education-intro{grid-row:1}
 html body #education .education-list{grid-row:2}
 html body #education .tool-group{grid-row:3}
}
