/* CSI JCET — public student profile: liquid-glass finish (layered over the template's own styles) */
:root { --ac: #728ef7; --ac2: #9fb2ff; --gr: #30d158; --glass-hi: rgba(255,255,255,.42); }

/* living background: the original artwork plus a slow aurora */
.csi-bg-fixed::after { content: ""; position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(40% 35% at 15% 10%, rgba(60,85,214,.35), transparent 70%),
    radial-gradient(35% 30% at 90% 35%, rgba(138,63,216,.28), transparent 70%),
    radial-gradient(40% 35% at 30% 95%, rgba(19,163,184,.22), transparent 70%);
  filter: blur(30px); animation: pfAurora 24s ease-in-out infinite alternate; }
@keyframes pfAurora { from { transform: translate(0,0) scale(1); } to { transform: translate(4%, -3%) scale(1.08); } }

/* header as a floating glass bar */
.csi-header { position: sticky; top: 0; z-index: 20; border-bottom: 0 !important; background: rgba(8,8,12,.55); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); box-shadow: 0 .5px 0 rgba(255,255,255,.08); }
.csi-header-action { background: rgba(255,255,255,.06); box-shadow: inset 0 1px .5px rgba(255,255,255,.25); border-color: rgba(255,255,255,.14) !important; transition: background .2s; }
.csi-header-action:hover { background: rgba(255,255,255,.12); }
.csi-main { padding-top: 26px; }

/* liquid glass cards */
.csi-card { position: relative; overflow: hidden; isolation: isolate; border: 0 !important; border-radius: 26px !important; margin-bottom: 16px !important;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.025) 45%, rgba(255,255,255,.05)) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important; backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow: inset 0 1px .5px var(--glass-hi), inset 0 -1px .5px rgba(255,255,255,.07), inset 0 0 0 .5px rgba(255,255,255,.13), 0 24px 50px -28px rgba(0,0,0,.85); }
.csi-card::before { content: ""; position: absolute; top: -60%; bottom: -60%; width: 34%; left: -70%; z-index: 0; pointer-events: none; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07) 45%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.07) 55%, transparent);
  animation: pfSweep 8s cubic-bezier(.4,0,.2,1) infinite; animation-delay: var(--sd, 1.5s); }
.csi-card:nth-of-type(2) { --sd: 2.4s; } .csi-card:nth-of-type(3) { --sd: 3.3s; } .csi-card:nth-of-type(4) { --sd: 4.2s; } .csi-card:nth-of-type(n+5) { --sd: 5.1s; }
@keyframes pfSweep { 0% { left: -70%; } 26%, 100% { left: 150%; } }
/* specular highlight that follows the pointer (desktop, set by profile.js) */
.csi-card::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.09), transparent 45%); }
.csi-card:hover::after { opacity: 1; }
.csi-card > * { position: relative; z-index: 1; }

/* hero: the student's own photo glowing behind the cover */
.csi-cover { position: relative; overflow: hidden; height: min(34vw, 220px) !important; min-height: 140px !important;
  background-image: linear-gradient(135deg, #1b2a6b, #3b1d6e 55%, #0e4a5a) !important; }
.csi-cover-photo { position: absolute; inset: -30%; background-size: cover; background-position: center 20%; filter: blur(34px) saturate(170%); opacity: .75; transform: scale(1.1); animation: pfDrift 16s ease-in-out infinite alternate; }
@keyframes pfDrift { from { transform: scale(1.1) translate(-2%, -2%); } to { transform: scale(1.25) translate(2%, 3%); } }
.csi-cover-mesh { position: absolute; inset: 0; background:
  radial-gradient(60% 80% at 85% 10%, rgba(255,255,255,.18), transparent 60%),
  linear-gradient(180deg, rgba(3,3,3,0) 35%, rgba(12,12,18,.75)); }
.csi-identity-panel { text-align: center; padding-bottom: 28px !important; }
.csi-avatar { position: relative; margin: -78px auto 16px !important; width: 148px !important; height: 148px !important; border: 0 !important; border-radius: 48px !important;
  background-color: hsl(230 40% 30%) !important; background-position: center 15% !important;
  box-shadow: 0 0 0 4px rgba(12,12,18,.9), 0 24px 50px -12px rgba(0,0,0,.8); transition: transform .4s cubic-bezier(.3,1.5,.5,1); animation: pfPop .8s cubic-bezier(.2,1.3,.3,1) both; }
@keyframes pfPop { from { opacity: 0; transform: scale(.8) translateY(14px); } to { opacity: 1; transform: none; } }
.csi-avatar::before { content: ""; position: absolute; inset: -7px; border-radius: 55px; padding: 3px; pointer-events: none;
  background: conic-gradient(from var(--pfang, 0deg), #728ef7, #ffffff, rgba(255,255,255,0) 40%, #bf5af2 70%, #ffffff, #728ef7);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: pfRing 5s linear infinite; }
@property --pfang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes pfRing { to { --pfang: 360deg; } }
.csi-avatar.has-photo { cursor: zoom-in; }
.csi-avatar.has-photo:active { transform: scale(.96); }
.csi-avatar.has-photo::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(20,20,26,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center/15px no-repeat;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3); }
.csi-identity-panel h1 { font-size: clamp(26px, 6.5vw, 34px) !important; letter-spacing: -.03em !important; font-weight: 700 !important;
  background: linear-gradient(100deg, #fff 0%, #fff 40%, #b9c6ff 50%, #fff 60%, #fff 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important;
  animation: pfText 7s ease-in-out 1.5s infinite; }
@keyframes pfText { 0% { background-position: 100% 0; } 35%, 100% { background-position: -50% 0; } }
.csi-badges, .csi-action-row { justify-content: center; }
.csi-identity-panel .csi-meta { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: rgba(114,142,247,.12); box-shadow: inset 0 0 0 .5px rgba(114,142,247,.35); margin-bottom: 20px !important; }
.csi-badge-pill { box-shadow: inset 0 1px .5px rgba(255,255,255,.2); }
.csi-action-btn { padding: 12px 24px !important; transition: transform .25s cubic-bezier(.3,1.5,.5,1), background .2s !important; }
.csi-action-btn:active { transform: scale(.95); }
.csi-action-btn.primary { box-shadow: 0 10px 26px -10px rgba(255,255,255,.45); }
.csi-action-btn.secondary { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.18) !important; box-shadow: inset 0 1px .5px rgba(255,255,255,.3); }

/* sections */
.csi-section h2 { display: flex; align-items: center; gap: 10px; font-size: 18px !important; letter-spacing: -.01em; }
.csi-section h2::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, #9fb2ff, #728ef7); box-shadow: 0 0 12px rgba(114,142,247,.6); }
.csi-row { border-bottom-color: rgba(255,255,255,.06) !important; }
.csi-skill-pill, .csi-link-chip { background: rgba(255,255,255,.07) !important; border: 0 !important; box-shadow: inset 0 1px .5px rgba(255,255,255,.22), inset 0 0 0 .5px rgba(255,255,255,.12); transition: transform .2s cubic-bezier(.3,1.5,.5,1), background .2s; }
.csi-skill-pill:hover, .csi-link-chip:hover { transform: translateY(-2px); background: rgba(255,255,255,.12) !important; }
.csi-entry { border-bottom-color: rgba(255,255,255,.06) !important; }
.csi-share-link-box input { border-radius: 14px !important; background: rgba(0,0,0,.25) !important; border: 0 !important; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14); }
.csi-share-copy-btn { border-radius: 14px !important; background: #fff !important; color: #000 !important; border: 0 !important; }
.csi-qr-img { border-radius: 16px !important; box-shadow: 0 12px 30px -10px rgba(0,0,0,.7); }

/* CSI Journey */
.csi-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.csi-stat { padding: 14px 8px 12px; border-radius: 18px; text-align: center; background: rgba(0,0,0,.25); box-shadow: inset 0 1px .5px rgba(255,255,255,.14), inset 0 0 0 .5px rgba(255,255,255,.08); }
.csi-stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.csi-stat span { display: block; margin-top: 3px; font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.csi-ev-list { display: grid; gap: 8px; }
.csi-ev { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; text-decoration: none !important; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.08); transition: transform .25s cubic-bezier(.2,1,.3,1), background .2s; }
.csi-ev:hover { background: rgba(255,255,255,.08); transform: translateY(-1px); }
.csi-ev-ps { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; background: #1a1a24 center/cover; box-shadow: 0 8px 18px -8px rgba(0,0,0,.7); }
.csi-ev-tx { flex: 1; min-width: 0; }
.csi-ev-tx b { display: block; color: #fff; font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.csi-ev-tx em { display: block; font-style: normal; font-size: 12px; color: rgba(255,255,255,.45); margin-top: 2px; }
.csi-ev-tag { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.csi-ev-tag.ok { background: rgba(48,209,88,.16); color: #6be58e; }
.csi-ev-tag.up { background: rgba(114,142,247,.16); color: #b9c6ff; }
.csi-ev-tag.missed { background: rgba(255,255,255,.07); color: rgba(255,255,255,.55); }
.csi-ev-empty { margin: 0; font-size: 14px; color: rgba(255,255,255,.5); }
.csi-ev-empty a { color: #b9c6ff !important; }

/* reveal: softer, with a touch of blur */
.csi-reveal { filter: blur(6px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1), filter .8s !important; }
.csi-reveal.is-visible { filter: none; }

/* photo viewer */
.pf-lbx { position: fixed; inset: 0; z-index: 100; cursor: zoom-out; touch-action: none; }
.pf-lbx-bg { position: absolute; inset: 0; background: rgba(0,0,0,.9); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); opacity: 0; transition: opacity .4s; }
.pf-lbx.on .pf-lbx-bg { opacity: 1; }
.pf-lbx img { position: absolute; object-fit: cover; object-position: 50% 15%; transition: transform .46s cubic-bezier(.2,.9,.25,1), clip-path .46s cubic-bezier(.2,.9,.25,1); box-shadow: 0 30px 80px rgba(0,0,0,.6); will-change: transform; }
.pf-lbx.on img { object-fit: contain; }
.pf-lbx-name { position: absolute; left: 0; right: 0; top: calc(16px + env(safe-area-inset-top, 0px)); text-align: center; font-weight: 700; color: #fff; opacity: 0; transition: opacity .3s .15s; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.pf-lbx.on .pf-lbx-name { opacity: 1; }
.pf-toast { position: fixed; z-index: 110; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -160%); padding: 11px 18px; border-radius: 999px; background: rgba(36,36,46,.92); color: #fff; font-size: 14px; font-weight: 600; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.18); transition: transform .45s cubic-bezier(.2,1.2,.3,1); }
.pf-toast.on { transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .csi-card { border-radius: 22px !important; }
  .csi-avatar { width: 124px !important; height: 124px !important; border-radius: 40px !important; margin-top: -64px !important; }
  .csi-avatar::before { border-radius: 47px; }
  .csi-stat b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .csi-bg-fixed::after, .csi-card::before, .csi-cover-photo, .csi-avatar::before, .csi-identity-panel h1 { animation: none !important; }
  .csi-reveal { filter: none !important; }
}
