/* Optical glass over an original, locally served interior photograph.
   Geometry and interaction rules remain in glass.css. No animated backdrop. */
body.cm-frosted {
  background: #403930;
  isolation: isolate;
  --glass-text: #faf8f4;
  --glass-muted: #eeebe6;
  --glass-accent: #efe7d9;
  --glass-button: #e7e0d5;
  --glass-dark: #302b26;
  --glass-line: rgba(247, 242, 234, .24);
  --glass-inner: rgba(235, 226, 212, .07);
}
body.cm-frosted::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(rgba(20, 18, 16, .2), rgba(20, 18, 16, .2)),
    url('../assets/study-interior.webp') center center / cover no-repeat;
  box-shadow: none;
}
body.cm-frosted::after, .cm-frosted .glass-shell::before { content: none; }
.cm-frosted .glass-panel {
  background: rgba(43, 38, 32, .30);
  border-color: rgba(247, 242, 232, .3);
  border-top-color: rgba(255, 250, 242, .56);
  border-left-color: rgba(255, 250, 242, .38);
  -webkit-backdrop-filter: blur(28px) saturate(1.18) brightness(.8);
  backdrop-filter: blur(28px) saturate(1.18) brightness(.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12),
    inset 1px 0 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(255,255,255,.04),
    0 16px 44px rgba(20,16,12,.23), 0 2px 5px rgba(20,16,12,.12);
}
.cm-frosted .glass-hero {
  background: rgba(49, 43, 36, .14);
  -webkit-backdrop-filter: blur(20px) saturate(1.18) brightness(.84);
  backdrop-filter: blur(20px) saturate(1.18) brightness(.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2),
    inset 30px 30px 60px -50px rgba(255,244,222,.24),
    0 20px 50px rgba(20,16,12,.25);
}
.cm-frosted #about {
  background:rgba(43,38,32,.20);
  -webkit-backdrop-filter:blur(24px) saturate(1.18) brightness(.84);
  backdrop-filter:blur(24px) saturate(1.18) brightness(.84);
}
.cm-frosted .glass-sidebar {
  background: rgba(34, 31, 28, .44);
  -webkit-backdrop-filter: blur(28px) saturate(1.12) brightness(.75);
  backdrop-filter: blur(28px) saturate(1.12) brightness(.75);
}
.cm-frosted :is(.glass-page-label,.glass-eyebrow,.glass-role-line,.glass-brand small,.glass-sidebar-footer a,.glass-footer) { color: #f1eee9; }
.cm-frosted :is(.glass-page-label,.glass-eyebrow,.glass-role-line,h1,h2,h3) { text-shadow: 0 1px 3px rgba(20,16,12,.22); }
.cm-frosted .glass-nav-link { color: #f4f0e9!important; }
.cm-frosted .glass-nav-link:hover, .cm-frosted .glass-nav-link[aria-current] {
  background: rgba(239,232,219,.16);
  border-color: rgba(245,237,222,.4);
  color: #faf7f0!important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 3px 9px rgba(24,21,18,.08);
}
.cm-frosted .glass-hero .social-icons a { color: #f6f2ec; background: rgba(235,228,217,.07); }
.cm-frosted :is(.cm-cap-card,.cm-tech-card,.cm-cert-card,.cm-orcid-item) {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08),0 5px 16px rgba(20,16,12,.08)!important;
}
.cm-frosted .cm-cap-card:hover,.cm-frosted .cm-tech-card:hover { background: rgba(237,231,220,.12); }
.cm-frosted .cm-tech-tag, .cm-frosted .wpcf7 label { color: #f3efe9; }
.cm-frosted .wpcf7 input:not([type=hidden]):not([type=submit]), .cm-frosted .wpcf7 textarea {
  background: rgba(31,29,26,.35);
  border-color: #c4bfb7;
}
.cm-frosted .wpcf7 input::placeholder, .cm-frosted .wpcf7 textarea::placeholder { color: #e3dfd8; }
.cm-frosted .wpcf7-response-output { background: rgba(32,30,27,.9); }
.cm-frosted .glass-menu-toggle { background: rgba(20,18,16,.22); border-color: #c4bfb7; }
.cm-frosted .glass-menu-toggle .fa-times::before { content:"\f00d"; }
/* Neutral controls, including plugin-rendered links; original badge artwork stays intact. */
.cm-frosted :focus-visible { outline-color:#f4e9d7; }
.cm-frosted ::selection { background:#e7e0d5; color:#302b26; }
.cm-frosted .glass-sidebar { scrollbar-color:#b6aea2 transparent; }
.cm-frosted :is(.glass-button,.btn-default,input[type=submit],button[type=submit]) {
  background:#e7e0d5!important; color:#302b26!important; border-color:#f2eade!important;
  box-shadow:inset 0 1px 0 #fff8,0 4px 16px #201b171a;
}
.cm-frosted :is(.glass-button,.btn-default,input[type=submit],button[type=submit]):hover {
  background:#faf4e9!important; box-shadow:inset 0 1px 0 #fff9,0 5px 20px #e7ded42b;
}
.cm-frosted .social-icons a { color:#f3eee6; }
.cm-frosted .social-icons a:hover { background:rgba(235,227,213,.16);color:#fff8eb; }
.cm-frosted :is(.cm-cap-card,.cm-tech-card):hover { border-color:rgba(239,230,215,.48); }
.cm-frosted .cm-tech-tag { background:rgba(236,228,215,.06); }
.cm-frosted .timeline-container { border-left-color:rgba(232,222,205,.4); }
.cm-frosted .timeline-container::before { background:#ded3c2; }
.cm-frosted .cm-cert-logo { background:#e9e4db!important; }
.cm-frosted .cm-cert-fallback { color:#302b26!important; }
.cm-frosted :is(.cm-orcid-pill,.cm-orcid-btn) { background:rgba(236,228,215,.08)!important; }
.cm-frosted .cm-orcid-btn:hover { background:rgba(236,228,215,.18)!important; }
.cm-frosted .glass-skip { background:#e7e0d5;color:#302b26!important; }
.cm-frosted .wpcf7-response-output { background:#332e28; border-color:#d6cbb8!important; }
.cm-frosted .wpcf7-not-valid-tip { color:#fff0cc; }
.cm-frosted .glass-portrait img { width:190px; max-width:100%; height:auto; }
.cm-frosted .glass-hero { grid-template-columns:minmax(190px,.72fr) minmax(0,1.28fr); }
.cm-frosted #about .glass-biography { display:grid;grid-template-columns:1fr 1fr;gap:38px; }
.cm-frosted #about .glass-bio-column { min-width:0;max-width:70ch; }
.cm-frosted #about .glass-biography p { max-width:70ch;margin-bottom:30px;font-size:15.5px;line-height:1.9;letter-spacing:.005em; }
.cm-frosted #about .glass-biography p:last-child { margin-bottom:0; }
.cm-frosted #about .btn-default { margin-top:28px; }
@media(max-width:1200px) {
  .cm-frosted #about { padding-inline:clamp(24px,5vw,64px); }
  .cm-frosted #about .glass-about-inner { max-width:70ch;margin-inline:auto;font-size:15px; }
  .cm-frosted #about .glass-biography { display:block; }
  .cm-frosted #about .glass-bio-column + .glass-bio-column { margin-top:30px; }
}
@media(max-width:1050px) {
  .cm-frosted .glass-hero { grid-template-columns:150px minmax(0,1fr); }
  .cm-frosted .glass-portrait img { width:150px; }
  .cm-frosted .glass-menu-toggle { min-width:87px; }
  .cm-frosted .glass-sidebar nav {
    display:grid;visibility:hidden;opacity:0;transform:translateY(-8px);pointer-events:none;
    transition:opacity .18s ease,transform .18s ease,visibility 0s linear .18s;
    background: rgba(41,37,32,.92);
    border-color: rgba(247,242,232,.42);
    box-shadow:inset 0 1px 0 #fff2,0 18px 40px #1b1713a0;
    -webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);
  }
  .cm-frosted.glass-menu-open .glass-sidebar nav {
    visibility:visible;opacity:1;transform:translateY(0);pointer-events:auto;transition-delay:0s;
  }
}
@media(max-width:640px) {
  body.cm-frosted::before { background-position: center, 100% center; }
  .cm-frosted .glass-panel { -webkit-backdrop-filter: blur(22px) saturate(1.12) brightness(.8); backdrop-filter: blur(22px) saturate(1.12) brightness(.8); }
  .cm-frosted .glass-hero { -webkit-backdrop-filter: blur(18px) saturate(1.12) brightness(.8); backdrop-filter: blur(18px) saturate(1.12) brightness(.8); }
  .cm-frosted .glass-hero { grid-template-columns:minmax(0,1fr); }
  .cm-frosted .glass-portrait img { width:110px; }
  .cm-frosted #about { padding-inline:22px; }
  .cm-frosted #about .glass-biography p { font-size:14.5px;line-height:1.9; }
}
@media(prefers-reduced-motion:reduce) {
  .cm-frosted .glass-sidebar nav { transition:none!important;transform:none!important; }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .cm-frosted .glass-panel, .cm-frosted #about { background:#39332d; }
}
@media(prefers-reduced-transparency:reduce), (prefers-contrast:more) {
  .cm-frosted .glass-panel, .cm-frosted #about { background:#39332d; -webkit-backdrop-filter:none; backdrop-filter:none; }
}
@media(forced-colors:active) {
  body.cm-frosted::before { display:none; }
  .cm-frosted .glass-panel, .cm-frosted #about { background:Canvas; color:CanvasText; border:1px solid CanvasText; -webkit-backdrop-filter:none; backdrop-filter:none; }
}

/* Final owner-requested refinement: preserve the approved glass and layout. */
.cm-frosted .glass-hero {
  min-height:360px;padding-block:34px;gap:32px;
  border:1px solid rgba(247,242,232,.24);
  border-top-color:rgba(255,250,242,.42);
  background:rgba(49,43,36,.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 16px 40px rgba(20,16,12,.22);
}
/* A programmatically focused section should not acquire a second thick frame.
   Interactive links/buttons retain their keyboard focus rings. */
.cm-frosted .glass-hero:focus { outline:none; }
.cm-frosted .glass-intro .profile-name { margin-bottom:12px; }
.cm-frosted .glass-role-line { min-height:48px;margin-bottom:14px; }
.cm-frosted .glass-hero .social-icons { margin-bottom:18px; }
.cm-frosted .social-icons { gap:9px;align-items:center; }
.cm-frosted .social-icons a { width:40px;height:40px;font-size:17px; }
.cm-frosted .social-icons :is(svg,.cm-social-icon) { display:block;width:18px;height:18px;flex:none; }
.cm-frosted :is(.glass-biography p,.cm-narrative) { text-align:justify;text-align-last:start;hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word;line-height:1.85;word-spacing:normal;letter-spacing:normal; }
.cm-frosted .cm-narrative { max-width:72ch;margin-block:0 1.5em; }
@media(max-width:1200px) and (min-width:1051px) {
 .cm-frosted .glass-hero { grid-template-columns:170px minmax(0,1fr);gap:24px;min-height:340px; }
 .cm-frosted .glass-portrait img { width:170px; }
}
@media(max-width:640px) {
 .cm-frosted .glass-hero { min-height:0;padding-block:26px;gap:18px; }
 .cm-frosted .glass-hero .social-icons { gap:7px; }
 .cm-frosted .social-icons a { width:38px;height:38px; }
 .cm-frosted :is(.glass-biography p,.cm-narrative) { text-align:left;hyphens:manual;-webkit-hyphens:manual; }
 .cm-frosted .glass-role-line { min-height:46px; }
}
