/* The book is an entrance, not a reading container. */
@view-transition { navigation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }

body.chapter-page { background: #f7f5ed; color: #233a40; }
body.chapter-page .nav { background: #0b202a; border-bottom-color: rgba(222,234,227,.13); }
body.chapter-page .nav .brand,
body.chapter-page .nav nav a,
body.chapter-page .nav-social a { color: #eff0e8; }
body.chapter-page .nav nav a.active,
body.chapter-page .nav nav a:hover,
body.chapter-page .nav-social a:hover { color: #f3ae8c; }
body.chapter-page .nav-social { border-color: rgba(222,234,227,.18); }
body.chapter-page footer { background: #0b202a; }
body.chapter-page footer .brand { color: #eff0e8; }
body.chapter-page main.chapter-main {
  flex: 1;
  min-height: calc(100svh - 70px);
  background: #f7f5ed;
  color: #233a40;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .34s ease, transform .46s cubic-bezier(.2,.8,.2,1);
  animation: none !important;
}
body.chapter-page.is-revealed main.chapter-main { opacity: 1; transform: none; }
body.chapter-page .chapter-topline {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding: 29px 0 14px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #cbd4c8;
  color: #778884;
  font: 10px/1.5 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.chapter-topline a { color: #a9654b; text-decoration: none; border-bottom: 1px solid #bc8d75; }
.chapter-topline a:hover { color: #234b50; }
body.chapter-page .section { width: min(100%, 1220px); max-width: 1220px; margin: 0 auto; padding: clamp(49px,6vw,86px) clamp(24px,5vw,65px) clamp(75px,8vw,120px); background: transparent; color: #233a40; animation: none !important; }
body.chapter-page .section-number { color: #ae654c; margin-bottom: 18px; }
body.chapter-page .section h2 { max-width: 980px; font-size: clamp(43px,5vw,76px); line-height: 1.02; letter-spacing: -.075em; color: #19343c; }
body.chapter-page .section-intro { max-width: 710px; color: #657875; font-size: 17px; margin: 0 0 43px; }
body.chapter-page .about-copy,
body.chapter-page .story-copy { color: #48615f; font-size: 17px; }
body.chapter-page .story h2 em,
body.chapter-page .about h2 em { color: #bb7257; }
body.chapter-page .story-steps { margin-top: 64px; border-color: #bdc8bd; }
body.chapter-page .story-steps > div { border-color: #bdc8bd; }
body.chapter-page .story-steps b { color: #254750; }
body.chapter-page .story-steps p { color: #637774; }
body.chapter-page .focus-tags span,
body.chapter-page .tags span { background: #e9eee5; border-color: #ccd8ca; color: #36565a; }
body.chapter-page .education-feature { background: #e4ebe2; border: 1px solid #c0d0c3; box-shadow: 7px 9px 0 #d7e0d5; }
body.chapter-page .education-feature p,
body.chapter-page .timeline p { color: #596f6d; }
body.chapter-page .timeline { border-top-color: #c6d2c7; }
body.chapter-page .timeline article { border-bottom-color: #c6d2c7; }

/* Projects unfold into a normal, full-width case-study layout. */
body.chapter-page .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
body.chapter-page .project { min-width: 0; min-height: 0; background: #fffdf7; border: 1px solid #cdd7cb; border-radius: 4px 15px 4px 4px; overflow: hidden; box-shadow: 7px 10px 0 #e2e7dc; }
body.chapter-page .project-image { height: clamp(220px,24vw,320px); background: radial-gradient(circle at center,#dce9df,#a9c8c3 68%,#668c8b); border-bottom: 1px solid #cbd8cc; }
body.chapter-page .project-security { background: radial-gradient(circle at center,#e7ece1,#adc8bd 68%,#718e90); }
body.chapter-page .project-robot { background: radial-gradient(circle at center,#e2edec,#a1c3c8 68%,#5e8a93); }
body.chapter-page .project-body { padding: 23px 23px 25px; }
body.chapter-page .project-body h3 { margin-top: 13px; color: #203d45; font-size: clamp(25px,2.4vw,34px); }
body.chapter-page .project-body p { color: #5e716f; font-size: 13px; line-height: 1.6; }
.project-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 23px; }
body.chapter-page .project-card-actions .button,
body.chapter-page .project-card-actions .mindjoy-link { display: inline-flex; align-items: center; margin: 0; padding: 10px 12px; font: 500 10px/1.4 var(--mono); border: 1px solid #23454e; border-radius: 3px; background: #193b43; color: #f7f5ed; text-decoration: none; }
body.chapter-page .project-card-actions .mindjoy-link { color: #23454e; background: transparent; }
body.chapter-page .project-card-actions a:hover { background: #bd7053; border-color: #bd7053; color: #fff9ed; }
.projects.is-detail-open > .section-number,
.projects.is-detail-open > h2,
.projects.is-detail-open > .section-intro,
.projects.is-detail-open > .project-grid { display: none; }
.project-chapter[hidden] { display: none !important; }
.project-chapter { padding: 0; scroll-margin-top: 100px; }
.project-back { color: #aa684f; font: 11px var(--mono); text-decoration: none; border-bottom: 1px solid #bc8d75; }
.project-chapter-kicker { color: #b16c52; margin: 41px 0 14px; font: 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
body.chapter-page .project-chapter h2 { margin: 0 0 18px; font-size: clamp(58px,8vw,110px); }
.project-chapter-question { max-width: 880px; color: #526967; font: 500 clamp(20px,2.5vw,30px)/1.35 var(--serif); margin: 0 0 47px; }
.project-chapter-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.9fr); gap: clamp(35px,6vw,84px); align-items: start; padding-top: 25px; border-top: 1px solid #c8d4c9; }
.project-chapter-visual { position: relative; min-height: 430px; display: grid; place-items: center; margin: 0; padding: 30px; background: radial-gradient(circle at center,#dcece1,#7da9a7 69%,#264b55); border: 1px solid #aac5bc; border-radius: 4px 18px 4px 4px; box-shadow: 10px 13px 0 #dce7dc; }
.project-chapter-visual.project-security { background: radial-gradient(circle at center,#e8f0e4,#8cb6a9 69%,#375c61); }
.project-chapter-visual.project-robot { background: radial-gradient(circle at center,#e5eeee,#83afb8 69%,#295964); }
.project-chapter-visual svg,
.project-chapter-visual .generated-media { width: min(68%,340px); height: 260px; fill: none; stroke: #173e47; stroke-width: 1.8; }
.project-chapter-visual figcaption { position: absolute; bottom: 19px; right: 22px; color: #315f63; font: 10px var(--mono); }
.project-chapter-meta { color: #b36e52; font: 10px/1.6 var(--mono); margin: 0 0 29px; }
.project-chapter-copy h3 { color: #20414a; font-size: 23px; letter-spacing: -.04em; margin: 26px 0 9px; }
.project-chapter-copy p:not(.project-chapter-meta) { color: #526a69; font-size: 16px; line-height: 1.65; margin: 0 0 18px; }
.project-chapter-copy .tags { margin-top: 29px; }
.project-chapter-actions { margin-top: 34px; }
.project-chapter-actions .button { background: #1d4049; color: #fff9ed; }

/* Research reads as two visual summaries, followed by open article pages. */
body.chapter-page .research-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; border: 0; }
body.chapter-page .research-item { display: block; min-width: 0; padding: 19px; border: 1px solid #cdd8cb; border-radius: 4px 15px 4px 4px; background: #fffdf7; box-shadow: 7px 10px 0 #e2e7dc; }
body.chapter-page .research-content { display: flex; flex-direction: column; }
body.chapter-page .research-card-image { order: -1; margin: 0 0 22px; padding: 13px; border: 1px solid #d7e0d4; border-radius: 3px; background: #edf1e9; }
body.chapter-page .research-card-image img { display: block; width: 100%; height: 225px; object-fit: contain; }
body.chapter-page .research-card-image figcaption { color: #69817d; font: 10px/1.4 var(--mono); margin-top: 9px; }
body.chapter-page .research-content h3 { color: #20404a; font-size: clamp(27px,2.6vw,38px); }
body.chapter-page .research-content > p:not(.item-meta) { color: #5d7370; font-size: 14px; line-height: 1.65; }
body.chapter-page .research-actions { margin: 13px 0 20px; gap: 9px; }
body.chapter-page .research-actions .button,
body.chapter-page .research-actions .button-outline { display: inline-flex; align-items: center; padding: 10px 13px; border: 1px solid #21444c; border-radius: 3px; background: #1c3e47; color: #fff9ed; font: 500 10px/1.35 var(--mono); text-decoration: none; }
body.chapter-page .research-actions .button-outline { background: transparent; color: #21444c; }
body.chapter-page .research-actions a:hover { background: #bf7456; color: #fff9ed; border-color: #bf7456; }

/* Full research analyses retain their complete figures, tables, and prose. */
body.chapter-page.page-research-detail main.chapter-main { background: #f7f5ed; color: #233a40; }
body.chapter-page.page-research-detail .detail-hero,
body.chapter-page.page-research-detail .detail-section,
body.chapter-page.page-research-detail .paper-figures { background: transparent; color: #233a40; box-shadow: none; }
body.chapter-page.page-research-detail .detail-tint { background: #eaf0e8; max-width: none; padding-left: max(6vw,calc((100vw - 1090px)/2)); padding-right: max(6vw,calc((100vw - 1090px)/2)); }
body.chapter-page.page-research-detail .detail-hero h1 { font-size: clamp(49px,6.2vw,88px); color: #193941; }
body.chapter-page.page-research-detail .detail-hero h1 em { color: #bd7054; }
body.chapter-page.page-research-detail .detail-section h2,
body.chapter-page.page-research-detail .paper-figures h2 { color: #1c3b43; }
body.chapter-page.page-research-detail .detail-lede,
body.chapter-page.page-research-detail .detail-copy,
body.chapter-page.page-research-detail .detail-columns p,
body.chapter-page.page-research-detail .detail-list { color: #556e6a; }
body.chapter-page.page-research-detail .metric-grid { border-color: #c6d4c7; }
body.chapter-page.page-research-detail .metric-grid > div { background: #fffdf7; border-color: #c6d4c7; box-shadow: none; }
body.chapter-page.page-research-detail .metric-grid strong { color: #b57054; }
body.chapter-page.page-research-detail .metric-grid span { color: #47625f; }
body.chapter-page.page-research-detail .result-grid article { background: #fffdf7; border-color: #cbd7ca; box-shadow: none; }
body.chapter-page.page-research-detail .result-grid h3 { color: #24454b; }
body.chapter-page.page-research-detail .result-grid p { color: #5a706d; }
body.chapter-page.page-research-detail .data-table { background: #fffdf8; color: #244149; }
body.chapter-page.page-research-detail .data-table th { background: #234650; color: #fff9ed; }
body.chapter-page.page-research-detail .data-table td { border-color: #cbd7cd; }
body.chapter-page.page-research-detail .paper-figure-grid figure { background: #eef2e9; border-color: #d4dfd2; box-shadow: none; }
body.chapter-page.page-research-detail .paper-figure-grid figcaption { color: #637a75; }
body.chapter-page.page-research-detail .detail-callout p { color: #315258; }
body.chapter-page.page-research-detail .detail-cta { display: flex; width: min(100% - 48px,1100px); max-width: 1100px; margin: 35px auto 70px; padding: 39px 43px; background: #173842; border-radius: 4px 16px 4px 4px; color: #fff9ed; }
body.chapter-page.page-research-detail .detail-cta h2 { color: #fff9ed; }
body.chapter-page.page-research-detail .detail-cta .text-link { color: #fff9ed; }

body.chapter-page.page-contact .contact { width: min(100% - 48px,1100px); max-width: 1100px; margin: 50px auto 90px; padding: clamp(44px,7vw,90px); border-radius: 4px 20px 4px 4px; background: #173842; color: #fff9ed; }
body.chapter-page.page-contact .contact h2 { color: #fff9ed; }
body.chapter-page.page-contact .contact > p { color: #ccd8d1; }
body.chapter-page.page-contact .contact-email,
body.chapter-page.page-contact .contact-linkedin,
body.chapter-page.page-contact .contact-github { color: #fff9ed; }

/* The brief mystery-book entrance. */
.mystery-intro { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 35%,#204550,#071923 67%); color: #f5e9d6; transition: opacity .28s ease; }
.mystery-intro::before { content: ""; position: absolute; inset: 0; opacity: .5; background: linear-gradient(rgba(201,231,219,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(201,231,219,.04) 1px,transparent 1px); background-size: 55px 55px; transform: perspective(700px) rotateX(63deg) translateY(44%); }
.mystery-intro.is-exiting { opacity: 0; pointer-events: none; }
.mystery-skip { position: absolute; top: 26px; right: 30px; z-index: 20; border: 1px solid rgba(232,208,177,.35); border-radius: 3px; background: rgba(20,48,55,.7); color: #f5dfc1; padding: 9px 12px; font: 10px var(--mono); cursor: pointer; }
.mystery-skip:hover { background: #b56b50; border-color: #b56b50; }
.mystery-stage { position: relative; width: min(100% - 28px,920px); display: grid; justify-items: center; padding-top: 15px; }
.mystery-book { position: relative; width: min(86vw,780px); aspect-ratio: 1.75; max-height: 460px; transform: perspective(1800px) rotateX(5deg) rotateZ(-1.2deg); filter: drop-shadow(0 38px 31px rgba(0,0,0,.46)); }
.mystery-page-edge { position: absolute; inset: 7px -13px -15px 7px; border-radius: 5px 13px 12px 5px; background: repeating-linear-gradient(0deg,#f4f0e2 0 2px,#b5b8ab 2px 3px); box-shadow: 13px 16px 0 #0c2630, 19px 22px 0 #06141c; }
.mystery-open-pages { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c5bfab; border-radius: 3px 9px 9px 3px; overflow: hidden; background: #f9f6ea; }
.mystery-left-page, .mystery-right-page { min-width: 0; padding: clamp(20px,4vw,49px); color: #27444b; background: linear-gradient(90deg,#f6f2e6,#fffdf4 80%,#e7e1d1); }
.mystery-right-page { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(90deg,#e4ddcc,#fffdf4 12%,#f9f6eb); }
.mystery-left-page span, .mystery-right-page span { display: block; border-bottom: 1px solid #c9cfbf; padding-bottom: 15px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.mystery-left-page small { display: block; margin-top: 22%; font: 500 clamp(15px,2.2vw,25px)/1.7 var(--serif); color: #51716f; }
.mystery-right-page strong { display: block; font: 600 clamp(30px,5.2vw,68px)/1.03 var(--sans); letter-spacing: -.07em; color: #1c3a42; opacity: 0; }
.mystery-right-page small { color: #a9634d; font: 10px var(--mono); margin-top: 18px; opacity: 0; }
.mystery-intro.is-playing .mystery-right-page strong,
.mystery-intro.is-playing .mystery-right-page small { animation: mystery-title .32s 1.03s both; }
.mystery-closed-left { position: absolute; top: 0; left: 0; width: 50%; height: 100%; z-index: 11; border-radius: 3px 0 0 3px; background: linear-gradient(130deg,#13323b,#0a202b); box-shadow: inset 0 0 0 2px rgba(231,191,145,.35); }
.mystery-intro.is-playing .mystery-closed-left { animation: mystery-left-open .38s .14s both; }
.mystery-cover { position: absolute; top: 0; right: 0; width: 50%; height: 100%; z-index: 12; transform-origin: left center; backface-visibility: hidden; border: 2px solid #a17e5e; border-radius: 2px 11px 11px 2px; background: radial-gradient(circle at 65% 45%,#214850,#0b2530 70%); box-shadow: inset 11px 0 25px rgba(0,0,0,.32), inset 0 0 0 11px #12303a, inset 0 0 0 12px rgba(224,177,121,.52), 6px 9px 15px rgba(0,0,0,.35); padding: clamp(28px,5vw,66px); display: flex; flex-direction: column; justify-content: center; color: #ebcfaa; }
.mystery-cover::after { content: "✦"; position: absolute; right: 13%; bottom: 13%; width: 45px; height: 45px; border: 1px solid rgba(230,187,135,.6); border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.mystery-cover span { font: 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.mystery-cover strong { font: 500 clamp(38px,6vw,82px)/.95 var(--serif); letter-spacing: -.06em; margin: 18px 0; }
.mystery-cover small { font: 11px var(--mono); color: #b5ccc2; }
.mystery-intro.is-playing .mystery-cover { animation: mystery-cover-open .49s .11s cubic-bezier(.47,.04,.23,1) both; }
.mystery-turn-sheet { position: absolute; top: 0; right: 0; width: 50%; height: 100%; transform-origin: left center; backface-visibility: hidden; border: 1px solid #d5cfbf; border-radius: 1px 8px 8px 1px; background: linear-gradient(90deg,#eee7d8,#fffdf2 10%,#f7f4e7 90%,#ddd5c2); box-shadow: inset 16px 0 21px rgba(60,47,31,.08), 3px 5px 10px rgba(0,0,0,.15); }
.mystery-turn-sheet i { display: block; margin: 20% 15%; height: 55%; background: repeating-linear-gradient(0deg,transparent 0 15px,rgba(89,106,98,.17) 16px 17px,transparent 18px 25px); opacity: .65; }
.mystery-intro.is-playing .mystery-turn-sheet { animation: mystery-flip .42s var(--delay) cubic-bezier(.56,.02,.32,1) both; }
.mystery-spine { position: absolute; top: 0; bottom: 0; left: calc(50% - 8px); z-index: 13; width: 16px; pointer-events: none; background: linear-gradient(90deg,transparent,rgba(30,39,35,.35) 47%,rgba(255,255,255,.55),transparent); }
.mystery-intro.is-playing .mystery-spine { animation: mystery-spine-fade .44s .18s both; }
.mystery-caption { color: #d7c5ac; margin: 43px 0 0; font: 11px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.mystery-caption strong { color: #f2b18e; font-weight: 500; }
@keyframes mystery-left-open { from { opacity: 1; } to { opacity: 0; } }
@keyframes mystery-cover-open { from { transform: rotateY(0); opacity: 1; } 90% { opacity: 1; } to { transform: rotateY(-172deg); opacity: 0; } }
@keyframes mystery-flip { from { transform: rotateY(0); opacity: 1; } 85% { opacity: 1; } to { transform: rotateY(-178deg); opacity: 0; } }
@keyframes mystery-title { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mystery-spine-fade { from { opacity: 1; } to { opacity: .6; } }

@media (max-width: 940px) {
  body.chapter-page .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.chapter-page .research-list { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  body.chapter-page .chapter-topline { width: min(100% - 36px,1180px); padding-top: 20px; }
  body.chapter-page .section { padding: 45px 6vw 74px; }
  body.chapter-page .section h2 { font-size: clamp(38px,9vw,58px); }
  body.chapter-page .project-grid { grid-template-columns: 1fr; }
  body.chapter-page .project-image { height: 200px; }
  .project-chapter-layout { grid-template-columns: 1fr; }
  .project-chapter-visual { min-height: 280px; }
  .project-chapter-visual svg,
  .project-chapter-visual .generated-media { height: 200px; }
  body.chapter-page.page-research-detail .detail-tint { padding-left: 6vw; padding-right: 6vw; }
  body.chapter-page.page-research-detail .detail-cta { display: block; padding: 30px 24px; }
  body.chapter-page.page-contact .contact { width: calc(100% - 32px); margin: 20px auto 70px; }
  .mystery-book { width: min(91vw,520px); aspect-ratio: 1.45; }
  .mystery-cover { padding: 23px; }
  .mystery-cover strong { font-size: clamp(32px,9vw,56px); }
  .mystery-cover small, .mystery-left-page small { font-size: 8px; }
  .mystery-right-page strong { font-size: clamp(24px,7vw,42px); }
  .mystery-caption { margin-top: 31px; }
}
@media (prefers-reduced-motion: reduce) {
  body.chapter-page main.chapter-main { opacity: 1; transform: none; transition: none; }
  .mystery-intro { display: none !important; }
}

/* About and Contact are immediate, human-scale stops on the route. */
body.chapter-page.chapter-direct main.chapter-main { animation: direct-page-arrive .44s cubic-bezier(.2,.8,.2,1) both !important; }
@keyframes direct-page-arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* A single About Me page holds both the introduction and the personal story. */
.meet-hero, .meet-story, .meet-approach { scroll-margin-top: 100px; }
.meet-hero {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding: clamp(64px,8vw,110px) 0 clamp(74px,9vw,120px);
  display: grid;
  grid-template-columns: minmax(0,1.18fr) minmax(290px,.82fr);
  gap: clamp(40px,7vw,95px);
  align-items: center;
}
.meet-eyebrow { color: #af6a51; font: 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .13em; }
.meet-hero h1 { margin: 23px 0 30px; color: #1c3a42; font: 700 clamp(70px,9vw,128px)/.88 var(--sans); letter-spacing: -.09em; }
.meet-hero h1 em { display: block; color: #bd765a; font: 500 .9em/.98 var(--serif); letter-spacing: -.08em; }
.meet-lede { max-width: 680px; margin: 0; color: #435d5d; font: 400 clamp(21px,2.2vw,29px)/1.5 var(--sans); letter-spacing: -.025em; }
.meet-hero-links { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; margin-top: 36px; }
.meet-hero-links .button { padding: 13px 19px; background: #1c4048; color: #fffaf0; }
.meet-text-link { color: #a9644d; font: 11px var(--mono); text-decoration: none; border-bottom: 1px solid #be8e79; }
.meet-hero-links a:hover, .meet-next a:hover { color: #d27551; }
.meet-lens { position: relative; width: 100%; aspect-ratio: 1; max-width: 420px; justify-self: center; border-radius: 50%; background: radial-gradient(circle at 42% 44%,#f6d9c5,#dcebe2 54%,#b9d5ce); box-shadow: 18px 22px 0 #e3e9df, inset 0 0 0 1px #c7d8ce; isolation: isolate; }
.meet-lens::before, .meet-lens::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(39,88,91,.38); }
.meet-lens::before { inset: 12%; }
.meet-lens::after { inset: 24%; border-style: dashed; }
.meet-lens-ring { position: absolute; border: 1px solid rgba(32,81,86,.65); border-radius: 50%; }
.meet-ring-one { inset: 9% 28%; transform: rotate(28deg); }
.meet-ring-two { inset: 27% 7%; transform: rotate(-22deg); }
.meet-ring-three { inset: 18%; transform: rotate(72deg); }
.meet-lens-core { position: absolute; z-index: 2; top: 50%; left: 50%; width: 34%; aspect-ratio: 1; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; background: #1c434a; color: #fff9eb; box-shadow: 0 9px 21px rgba(19,59,64,.22); text-align: center; font: 500 clamp(20px,2.4vw,31px)/.95 var(--serif); }
.meet-lens-label { position: absolute; z-index: 2; padding: 5px 9px; border-radius: 2px; background: #fffdf6; color: #38615d; box-shadow: 3px 4px 0 rgba(49,91,86,.13); font: 10px var(--mono); }
.meet-label-one { top: 15%; left: 8%; }.meet-label-two { right: 3%; top: 39%; }.meet-label-three { bottom: 13%; left: 20%; }
.meet-story { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(35px,7vw,100px); padding: clamp(70px,8vw,115px) max(24px,calc((100vw - 1180px)/2)); background: #173842; color: #f9f4e9; }
.meet-story .meet-eyebrow { color: #f1b393; }
.meet-story h2 { max-width: 550px; margin: 20px 0 29px; font: 700 clamp(47px,5vw,74px)/1.02 var(--sans); letter-spacing: -.075em; }
.meet-story h2 em { color: #f0b18f; font: 500 1em var(--serif); }
.meet-story-heading > p:last-child { max-width: 400px; color: #ccdbd4; font: 500 20px/1.4 var(--serif); }
.meet-story-path { position: relative; padding-left: 34px; border-left: 1px solid #70908d; }
.meet-story-path article { position: relative; padding: 4px 0 29px; }
.meet-story-path article + article { padding-top: 26px; border-top: 1px solid rgba(227,237,224,.14); }
.meet-path-dot { position: absolute; top: 10px; left: -40px; width: 11px; height: 11px; border-radius: 50%; background: #ecae8b; box-shadow: 0 0 0 6px #173842, 0 0 0 7px #71958f; }
.meet-story-path article + article .meet-path-dot { top: 32px; }
.meet-story-path h3 { margin: 0 0 11px; color: #fffaf0; font: 600 23px/1.2 var(--sans); letter-spacing: -.035em; }
.meet-story-path p { max-width: 610px; margin: 0; color: #c5d5d0; font: 15px/1.7 var(--sans); }
.meet-approach { width: min(100% - 48px, 1180px); margin: 0 auto; padding: clamp(68px,8vw,110px) 0 clamp(80px,9vw,125px); }
.meet-approach h2 { margin: 19px 0 36px; color: #1d3e46; font: 700 clamp(45px,5vw,72px)/1.05 var(--sans); letter-spacing: -.075em; }
.meet-approach-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.meet-approach-list p { display: flex; flex-direction: column; gap: 16px; min-height: 185px; margin: 0; padding: 26px; border: 1px solid #c9d8cc; border-radius: 3px 16px 3px 3px; background: #fffdf7; box-shadow: 5px 7px 0 #e6ebe1; }
.meet-approach-list strong { color: #b46d50; font: 500 29px var(--serif); }.meet-approach-list span { color: #536d68; font-size: 15px; }
.meet-next { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 35px; }
.meet-next a { color: #28535a; font: 11px var(--mono); text-decoration: none; border-bottom: 1px solid #8fb4a9; }

/* The same physical book changes to match the material inside. */
.mystery-intro { --scene-top:#204550; --scene-bottom:#071923; --cover-top:#214850; --cover-bottom:#0b2530; --cover-edge:#a17e5e; --cover-type:#ebcfaa; --intro-accent:#f2b18e; background: radial-gradient(ellipse at 50% 35%,var(--scene-top),var(--scene-bottom) 67%); }
.mystery-intro[data-theme="education"] { --scene-top:#385b51; --scene-bottom:#142c2b; --cover-top:#55755a; --cover-bottom:#233b35; --cover-edge:#d0ab73; --cover-type:#fff0ca; --intro-accent:#eacb93; }
.mystery-intro[data-theme="research"], .mystery-intro[data-theme="llm"] { --scene-top:#183f50; --scene-bottom:#091925; --cover-top:#315c70; --cover-bottom:#102f41; --cover-edge:#91b1b2; --cover-type:#e2f3ed; --intro-accent:#9fd7d2; }
.mystery-intro[data-theme="health"] { --scene-top:#315257; --scene-bottom:#10272d; --cover-top:#466e6b; --cover-bottom:#24464b; --cover-edge:#d2a189; --cover-type:#f6ead6; --intro-accent:#f1b69e; }
.mystery-intro[data-theme="projects"] { --scene-top:#4a3e3e; --scene-bottom:#201e27; --cover-top:#7d5751; --cover-bottom:#3c3339; --cover-edge:#d9ae79; --cover-type:#ffe6ca; --intro-accent:#ffc297; }
.mystery-intro[data-theme="mindjoy"] { --scene-top:#73555a; --scene-bottom:#332d39; --cover-top:#a87572; --cover-bottom:#6b454d; --cover-edge:#e1bf98; --cover-type:#fff0db; --intro-accent:#fbd1b7; }
.mystery-intro[data-theme="jobmaxxing"] { --scene-top:#315ca5; --scene-bottom:#112345; --cover-top:#376ec2; --cover-bottom:#19396c; --cover-edge:#b9c9ec; --cover-type:#f4f8ff; --intro-accent:#d7e7ff; }
.mystery-intro[data-theme="workbuddy"] { --scene-top:#789b82; --scene-bottom:#263e38; --cover-top:#b9825b; --cover-bottom:#6a6550; --cover-edge:#f2d9a5; --cover-type:#fff8e9; --intro-accent:#ffdfaa; }
.mystery-intro[data-theme="security"] { --scene-top:#283f54; --scene-bottom:#101d2c; --cover-top:#37546c; --cover-bottom:#1a3045; --cover-edge:#b4c0b9; --cover-type:#eaf1e8; --intro-accent:#b1d5ce; }
.mystery-intro[data-theme="underwater-robot"] { --scene-top:#235369; --scene-bottom:#071c2b; --cover-top:#356e80; --cover-bottom:#134254; --cover-edge:#a0c6c5; --cover-type:#ecf6e9; --intro-accent:#a6dedb; }
.mystery-intro .mystery-cover { border-color: var(--cover-edge); color: var(--cover-type); background: radial-gradient(circle at 65% 45%,var(--cover-top),var(--cover-bottom) 70%); }
.mystery-intro .mystery-cover small { color: var(--intro-accent); }
.mystery-intro .mystery-cover::after { display: none; }
.mystery-cover-mark { position: absolute; width: 72px; height: 72px; right: 10%; bottom: 10%; fill: none; stroke: var(--intro-accent); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; opacity: .78; }
.mystery-intro .mystery-caption strong { color: var(--intro-accent); }
.mystery-intro .mystery-right-page small { color: #a9664e; }
.mystery-intro[data-theme="research"] .mystery-turn-sheet i,
.mystery-intro[data-theme="llm"] .mystery-turn-sheet i,
.mystery-intro[data-theme="health"] .mystery-turn-sheet i { background: linear-gradient(rgba(65,110,123,.17) 1px,transparent 1px),linear-gradient(90deg,rgba(65,110,123,.17) 1px,transparent 1px); background-size: 15px 15px; }
.mystery-intro[data-theme="projects"] .mystery-turn-sheet i,
.mystery-intro[data-theme="jobmaxxing"] .mystery-turn-sheet i,
.mystery-intro[data-theme="security"] .mystery-turn-sheet i,
.mystery-intro[data-theme="underwater-robot"] .mystery-turn-sheet i { background: linear-gradient(rgba(55,103,116,.19) 1px,transparent 1px),linear-gradient(90deg,rgba(55,103,116,.19) 1px,transparent 1px); background-size: 22px 22px; }
.mystery-intro[data-theme="workbuddy"] .mystery-turn-sheet i { background: repeating-linear-gradient(0deg,transparent 0 17px,rgba(95,136,111,.2) 18px 19px,transparent 20px 28px); }
.mystery-intro[data-theme="education"] .mystery-turn-sheet i { background: repeating-linear-gradient(0deg,transparent 0 14px,rgba(71,107,91,.22) 15px 16px,transparent 17px 26px); }

/* Work cards and reading pages carry the same cues as their entrances. */
body.chapter-page .project-image.project-mindjoy,
body.chapter-page .project-chapter-visual.project-mindjoy { background: #fbfaf8; }
body.chapter-page .project-image.project-jobmaxxing,
body.chapter-page .project-chapter-visual.project-jobmaxxing { background: #1e56c5; }
body.chapter-page .project-image.project-jobmaxxing img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.chapter-page .project-chapter-visual.project-jobmaxxing { min-height: 0; height: auto; padding: 12px; }
body.chapter-page .project-chapter-visual.project-jobmaxxing img { display: block; width: 100%; height: auto; }
body.chapter-page .project-image.project-workbuddy,
body.chapter-page .project-chapter-visual.project-workbuddy { background: #fff3e0; }
body.chapter-page .project-image.project-workbuddy img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.chapter-page .project-chapter-visual.project-workbuddy { min-height: 0; height: auto; padding: 12px; }
body.chapter-page .project-chapter-visual.project-workbuddy img { display: block; width: 100%; height: auto; }
body.chapter-page .project-image.project-mindjoy img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.chapter-page .project-chapter-visual.project-mindjoy { min-height: 0; height: auto; padding: 12px 12px 38px; }
body.chapter-page .project-chapter-visual.project-mindjoy img { display: block; width: 100%; height: auto; }
body.chapter-page .project-image.project-security,
body.chapter-page .project-chapter-visual.project-security { background: radial-gradient(circle at 48% 40%,#7ba3a7,#345d69 66%,#183b50); }
body.chapter-page .project-image.project-robot,
body.chapter-page .project-chapter-visual.project-robot { background: radial-gradient(circle at 45% 27%,#d6eff0,#88bcc7 61%,#326b83); }
body.chapter-page .project-security svg { stroke: #e8f4ea; }
body.chapter-page .project-security svg circle { fill: #b9d9d2; }
body.chapter-page .project:nth-child(1) { border-top: 4px solid #c68a78; }
body.chapter-page .project:nth-child(2) { border-top: 4px solid #3d75d0; }
body.chapter-page .project:nth-child(3) { border-top: 4px solid #ddac74; }
body.chapter-page .project:nth-child(4) { border-top: 4px solid #467c8b; }
body.chapter-page .project:nth-child(5) { border-top: 4px solid #74aeba; }
@media (min-width: 701px) {
  body.chapter-page .project-grid > .project:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc((100% - 20px) / 2); justify-self: center; }
}
body.chapter-page .research-item:first-child { border-top: 4px solid #6da9b7; }
body.chapter-page .research-item:last-child { border-top: 4px solid #c68f7d; }
body.chapter-page .research-item:last-child .research-card-image { background: #f5ebe4; border-color: #e0c6b5; }
body.chapter-page.page-research-llm .detail-hero { border-top: 4px solid #75aeb6; }
body.chapter-page.page-research-health .detail-hero { border-top: 4px solid #c88e7b; }
body.chapter-page.page-research-health .detail-tint { background: #f3eae3; }

@media (max-width: 780px) {
  .meet-hero { width: min(100% - 38px,1180px); grid-template-columns: 1fr; gap: 52px; padding: 54px 0 80px; }
  .meet-hero h1 { font-size: clamp(65px,14vw,100px); }
  .meet-lens { max-width: 330px; }
  .meet-story { grid-template-columns: 1fr; gap: 36px; padding: 68px 7vw 78px; }
  .meet-approach { width: min(100% - 38px,1180px); }
  .meet-approach-list { grid-template-columns: 1fr; }
  .meet-approach-list p { min-height: 0; }
}
@media (max-width: 480px) {
  .meet-lede { font-size: 20px; }
  .meet-hero h1 { font-size: clamp(59px,16vw,78px); }
  .meet-story h2 { font-size: clamp(42px,11vw,55px); }
  .mystery-cover-mark { width: 44px; height: 44px; right: 7%; bottom: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  body.chapter-page.chapter-direct main.chapter-main { animation: none !important; }
}

/* Education lives within About Me; internships and activities open directly. */
.meet-learning { scroll-margin-top: 110px; padding: clamp(70px,8vw,112px) 24px; border-top: 1px solid #d1dbcf; background: #e9eee6; }
.meet-learning-inner { width: min(100%,1180px); margin: 0 auto; display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr); gap: clamp(34px,7vw,100px); }
.meet-learning-heading h2 { max-width: 490px; margin: 18px 0 22px; color: #1d3f47; font: 700 clamp(43px,4.8vw,70px)/1.04 var(--sans); letter-spacing: -.075em; }
.meet-learning-heading h2 em { color: #b87458; font: 500 .95em/1.02 var(--serif); }
.meet-learning-heading > p:last-child { max-width: 405px; color: #536d69; font: 17px/1.6 var(--sans); }
.meet-learning-list { border-top: 1px solid #b9cdbf; }
.meet-learning-list article { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 20px; padding: 29px 0 34px; border-bottom: 1px solid #b9cdbf; }
.meet-learning-years { color: #a7654c; font: 10px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.meet-learning-list h3 { margin: -4px 0 12px; color: #254850; font: 600 clamp(23px,2.4vw,32px)/1.2 var(--sans); letter-spacing: -.045em; }
.meet-learning-list article p:not(.meet-learning-distinction) { max-width: 530px; margin: 0; color: #55716d; font: 15px/1.7 var(--sans); }
.meet-learning-distinction { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 13px 0 0; padding-left: 12px; border-left: 2px solid #bc8d75; }
.meet-learning-distinction strong { color: #925b47; font: 500 12px/1.5 var(--mono); letter-spacing: .02em; }
.meet-learning-distinction span { max-width: 420px; color: #60746f; font: 11px/1.5 var(--sans); }
.meet-learning-source { margin: 17px 0 0; font: 10px/1.5 var(--mono); }
.meet-learning-source a { color: #27565b; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.meet-learning-source a:hover { color: #af684f; }

body.chapter-page .activity-page { width: min(100%,1100px); padding-top: clamp(56px,7vw,98px); }
.activity-page h1 { max-width: 950px; margin: 0 0 22px; color: #1c3d45; font: 700 clamp(45px,6.2vw,85px)/1.04 var(--sans); letter-spacing: -.075em; }
.activity-page h1 em { color: #b66f53; font: 500 .95em var(--serif); }
.activity-intro { max-width: 680px; margin: 0 0 52px; color: #526b68; font: 18px/1.65 var(--sans); }
.activity-group-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 25px; margin-bottom: 27px; }
.activity-group-heading span { color: #ae684f; font: 10px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
body.chapter-page .activity-group-heading h2 { margin: 0; color: #25464e; font: 600 clamp(25px,3.2vw,39px)/1.15 var(--sans); letter-spacing: -.055em; }
.activity-list { border-top: 1px solid #c5d5c8; }
.activity-entry { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 30px; padding: 32px 0 36px; border-bottom: 1px solid #c5d5c8; }
.activity-date { padding-top: 4px; color: #ae684f; font: 11px/1.5 var(--mono); }
.activity-organization { margin: 0 0 9px; color: #60827c; font: 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
body.chapter-page .activity-entry h3 { margin: 0 0 12px; color: #25464e; font: 600 clamp(27px,3.2vw,41px)/1.14 var(--sans); letter-spacing: -.055em; }
.activity-entry p:last-child { max-width: 640px; margin: 0; color: #586f6b; font: 16px/1.65 var(--sans); }
.activity-service { scroll-margin-top: 110px; margin-top: clamp(54px,7vw,90px); padding-top: 30px; border-top: 1px solid #c5d5c8; }
.activity-highlights { max-width: 740px; margin: 0; padding-left: 1.25em; color: #586f6b; font: 16px/1.65 var(--sans); }
.activity-highlights li + li { margin-top: 10px; }
.activity-highlights li::marker { color: #ae684f; }
.internship-page h1 em { color: #6c938e; }
.internship-page .activity-group-heading span,
.internship-page .activity-date { color: #5d817f; }
.internship-page .activity-highlights li::marker { color: #5d817f; }
.internship-page .activity-service { border-top-color: #a9c5c1; }

@media (max-width: 780px) {
  .meet-learning-inner { grid-template-columns: 1fr; gap: 27px; }
  .meet-learning-list article { grid-template-columns: 1fr; gap: 8px; }
  .activity-entry { grid-template-columns: 1fr; gap: 9px; }
  .activity-intro { margin-bottom: 36px; }
}

/* Linked covers open each live project from both the card and detail page. */
.project-cover-link { display: block; width: 100%; height: 100%; cursor: pointer; line-height: 0; }
.project-cover-link img { transition: filter .2s ease; }
.project-cover-link:hover img { filter: brightness(.96); }
.project-cover-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
body.chapter-page .project-chapter-visual .project-cover-link { height: auto; }


/* Security project cover: preserve the supplied 16:9 composition. */
body.chapter-page .project-image.project-security { background: #07100f; }
body.chapter-page .project-image.project-security img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.chapter-page .project-chapter-visual.project-security { min-height: 0; height: auto; padding: 12px; background: #07100f; }
body.chapter-page .project-chapter-visual.project-security img { display: block; width: 100%; height: auto; }
