/* ===== Research & Teaching: intro row with the 3D coin ===== */
.rt-intro{display:flex;align-items:flex-start;gap:36px}
.rt-intro .rt-text>p:last-child{margin-bottom:0}
.rt-intro .rt-text{flex:1 1 auto;min-width:0}
.rt-coin{--d:170px;order:2;flex:0 0 var(--d);width:var(--d);position:relative}
.rt-stage{width:var(--d);height:var(--d);cursor:pointer;position:relative}
.rt-stage canvas{display:block;position:relative;z-index:1}
/* desktop: spans the title and first paragraph, beside them (positioned by the script in coin.html) */
#research-teaching{position:relative}
.rt-coin.rt-span{position:absolute;right:0;margin:0}
.rt-coin.rt-span .rt-shadow{margin-top:calc(var(--d) * -0.06)}
/* placeholder (and fallback without WebGL): a quiet gold disc until the 3D coin is ready */
.rt-stage::before{content:"";position:absolute;inset:11%;border-radius:50%;
  background:radial-gradient(circle at 38% 34%,#f6e5a8 0,#dcb456 60%,#b88d32 100%);box-shadow:inset 0 0 0 4px #e7c46c,inset 0 0 0 5px #9c772a;
  transition:opacity .4s ease}
.rt-coin.rt-ready .rt-stage::before{opacity:0}
.rt-shadow{display:block;width:58%;height:8px;margin:4px auto 0;border-radius:50%;background:rgba(0,0,0,.18);filter:blur(4px);will-change:transform,opacity}
body.dark-mode .rt-shadow{background:rgba(0,0,0,.55)}
/* keyboard links: hidden until focused, then shown under the coin */
.rt-links a{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rt-links a:focus{position:static;width:auto;height:auto;clip:auto;display:inline-block;margin:6px 4px 0;font-size:12px}
.rt-links{text-align:center}
/* page transition: gold fills the screen */
.rt-burst{position:fixed;z-index:9999;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 38% 34%,#f6e5a8 0,#dcb456 58%,#b88d32 100%)}
/* phone: the coin floats in the top-right corner and the paragraph wraps around it */
@media (max-width:550px){
  .rt-intro{display:block}
  .rt-intro::after{content:"";display:table;clear:both}
  .rt-coin{--d:92px;float:right;margin:2px 0 4px 14px}
  .rt-shadow{height:5px;margin-top:2px}
}
