@charset "utf-8";
/* Motion layer: entrance and scroll-reveal animations plus hover micro-
   interactions, on top of the original theme. It is all progressive
   enhancement: nothing is hidden unless JS has marked <html> with .js, and
   prefers-reduced-motion switches the movement off (see the end of file). */

:root {
    --accent: #007bff;
    --accent-rgb: 0, 123, 255;
    --accent-strong: #007bff;   /* filled backgrounds behind white text */
    --accent-text: #0062cc;     /* small text on accent-tinted backgrounds (AA contrast) */
    --accent-2: #17a2b8;
    --ease-out: cubic-bezier(.2, .7, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

html { scroll-behavior: smooth; }

/* -- Scroll reveal ---------------------------------------------------------- */
.js [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .7s var(--ease-out), transform .8s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible,
.motion-fallback [data-reveal] {
    opacity: 1;
    transform: none;
}

/* -- Name: per-letter entrance ----------------------------------------------- */
.split-word { display: inline-block; white-space: nowrap; }
.split-char {
    display: inline-block;
    animation: char-in .9s var(--ease-spring) both;
    animation-delay: calc(var(--i) * 45ms + 120ms);
}
@keyframes char-in {
    from { opacity: 0; transform: translate3d(0, .5em, 0) rotate(8deg); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* -- Bio: highlighter sweep under the research keywords ---------------------- */
.text-profile-bio strong {
    background-image: linear-gradient(transparent 62%, rgba(192, 57, 43, .16) 62%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
.js .text-profile-bio strong {
    background-size: 0% 100%;
    transition: background-size 1s var(--ease-out);
    transition-delay: var(--hl-delay, 0ms);
}
.js .text-profile-bio strong.in-view,
.motion-fallback .text-profile-bio strong { background-size: 100% 100%; }

/* -- Divider: draws itself in ------------------------------------------------ */
.js .profile-divider {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.1s var(--ease-out) .25s;
}
.js .profile-divider.in-view,
.motion-fallback .profile-divider { transform: none; }

/* -- Contact links as pills ---------------------------------------------------- */
.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
}
.profile-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .95rem;
    border: 1px solid rgba(var(--accent-rgb), .16);
    border-radius: 999px;
    color: var(--accent-text);
    background-color: rgba(var(--accent-rgb), .06);
    line-height: 1.35;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .3s var(--ease-spring), color .2s, background-color .2s,
                border-color .2s, box-shadow .25s;
}
.profile-link i { transition: transform .4s var(--ease-spring); }
/* Touch screens keep :hover after a tap, so hover-only looks live in
   (hover: hover) blocks; here the pill only drops Bootstrap's a:hover underline. */
.profile-link:hover { color: var(--accent-text); text-decoration: none; }
.profile-link:focus-visible {
    color: #fff;
    background-color: var(--accent-strong);
    border-color: var(--accent-strong);
    text-decoration: none;
    box-shadow: 0 8px 18px -6px rgba(var(--accent-rgb), .55);
}
@media (hover: hover) {
    .profile-link:hover {
        color: #fff;
        background-color: var(--accent-strong);
        border-color: var(--accent-strong);
        transform: translateY(-2px);
        box-shadow: 0 8px 18px -6px rgba(var(--accent-rgb), .55);
    }
    .profile-link:hover i { transform: scale(1.18) rotate(-10deg); }
}
.profile-link:active { transform: translateY(0) scale(.96); }

/* -- Portrait ------------------------------------------------------------------ */
.profile-portrait .img-thumbnail { transition: box-shadow .4s var(--ease-out); }
.profile-portrait.is-tilting .img-thumbnail { box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .35); }

@property --ring-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}
.profile-avatar-ring {
    display: block;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from var(--ring-angle), var(--accent), var(--accent-2), #6f42c1, var(--accent));
    box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), .6);
    animation: ring-spin 7s linear infinite;
}
.profile-avatar-ring img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid #fff;
}
@keyframes ring-spin { to { --ring-angle: 360deg; } }
.js .profile-avatar { animation: pop-in .9s var(--ease-spring) .1s both; }
@keyframes pop-in {
    from { opacity: 0; transform: scale(.6); }
    to   { opacity: 1; transform: none; }
}

/* -- Cards: deeper shadow and a cursor spotlight on hover ---------------------- */
@property --spot {
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
}
.spotlight { transition: box-shadow .35s var(--ease-out), --spot .35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    .spotlight {
        background-image: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%),
                                          rgba(var(--accent-rgb), calc(.055 * var(--spot))), transparent 70%);
    }
    .spotlight:hover {
        --spot: 1;
        box-shadow: 0 .8rem 2rem rgba(33, 37, 41, .08) !important;
    }
}

/* -- Section headings ---------------------------------------------------------- */
.exp-heading i { width: 1.15em; text-align: center; }

/* -- Education / experience rows ------------------------------------------------ */
.exp-logo { width: 30px; transition: transform .45s var(--ease-spring); }
.exp-name { transition: color .2s; }
@media (hover: hover) {
    .exp-item:hover .exp-logo { transform: scale(1.14) rotate(-5deg); }
    .exp-item:hover .exp-name { color: var(--accent); }
}

/* -- News -------------------------------------------------------------------------- */
.news-item {
    margin-left: -.4rem;
    margin-right: -.4rem;
    padding: .05rem .4rem;
    border-radius: .3rem;
    transition: background-color .2s, transform .3s var(--ease-out);
}
@media (hover: hover) {
    .news-item:hover { background-color: rgba(var(--accent-rgb), .045); transform: translateX(4px); }
    .news-item:hover .news-date { color: var(--accent) !important; }
}

/* -- Publications ----------------------------------------------------------------- */
.pub-item { transition: background-color .25s, box-shadow .25s; }
@media (hover: hover) {
    .pub-item:hover {
        background-color: rgba(var(--accent-rgb), .025);
        box-shadow: inset 3px 0 0 var(--accent);
    }
}
.publication-title-link {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size .35s var(--ease-out), color .2s;
}
.publication-title-link:focus {
    text-decoration: none;
    background-size: 100% 1px;
}
@media (hover: hover) {
    .publication-title-link:hover {
        text-decoration: none;
        background-size: 100% 1px;
    }
}

/* Venue pills pop in one after another once their row has slid in. */
.pub-badge {
    transition: opacity .45s var(--ease-out), transform .55s var(--ease-spring);
    transition-delay: calc(var(--reveal-delay, 0ms) + 280ms + var(--badge-i, 0) * 90ms);
}
.pub-badge:nth-child(2) { --badge-i: 1; }
.pub-badge:nth-child(3) { --badge-i: 2; }
.js:not(.motion-fallback) .pub-item[data-reveal]:not(.is-visible) .pub-badge {
    opacity: 0;
    transform: translateY(6px) scale(.85);
}

/* -- Pointer tilt (covers, portrait) ------------------------------------------------ */
.tilt { perspective: 900px; }
.tilt-target {
    position: relative;
    display: block;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--tilt-scale, 1));
    transition: transform .6s var(--ease-out);
}
.tilt-target::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: .25rem;
    pointer-events: none;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .5), transparent 60%);
    opacity: 0;
    transition: opacity .4s;
}
.tilt.is-tilting .tilt-target {
    --tilt-scale: 1.04;
    transition: transform .15s linear;
}
.tilt.is-tilting .tilt-target::after { opacity: .7; }

/* -- Navbar: transparent at the top, frosted glass once scrolled ------------------- */
.site-navbar {
    opacity: 1;
    background-color: rgba(248, 249, 250, .85);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 .3rem 1rem rgba(0, 0, 0, .04);
    transition: background-color .3s, box-shadow .3s, transform .4s var(--ease-out);
}
.site-navbar.is-top {
    background-color: rgba(248, 249, 250, 0);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}
.site-navbar.is-hidden { transform: translate3d(0, -100%, 0); }
.site-navbar .navbar-brand strong {
    padding-bottom: 2px;
    background-image: linear-gradient(90deg, var(--accent), var(--accent-2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size .35s var(--ease-out);
}
.site-navbar .navbar-brand:focus-visible strong { background-size: 100% 2px; }
@media (hover: hover) {
    .site-navbar .navbar-brand:hover strong { background-size: 100% 2px; }
}

/* -- Reading progress hairline ------------------------------------------------------ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: 3px;
    pointer-events: none;
}
.scroll-progress span {
    display: block;
    height: 100%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* -- Back to top: a progress ring around an arrow ------------------------------------ */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--accent);
    background-color: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, .18);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.85);
    -webkit-tap-highlight-color: transparent;
    transition: opacity .3s, transform .45s var(--ease-spring), box-shadow .25s, visibility 0s linear .3s;
}
.back-to-top.is-shown {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
@media (hover: hover) {
    .back-to-top:hover { box-shadow: 0 10px 24px -6px rgba(var(--accent-rgb), .5); }
    .back-to-top:hover i { animation: nudge-up .7s var(--ease-out) infinite; }
}
.back-to-top:active { transform: scale(.92); }
.back-to-top:focus { outline: none; }
.back-to-top:focus-visible { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .35); }
@keyframes nudge-up {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}
.back-to-top-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.back-to-top-ring circle {
    fill: none;
    stroke-width: 2.5;
}
.back-to-top-ring .ring-track { stroke: rgba(var(--accent-rgb), .12); }
.back-to-top-ring .ring-fill {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 138.23;
    stroke-dashoffset: calc(138.23 * (1 - var(--progress, 0)));
}

#vercount_value_site_pv { font-variant-numeric: tabular-nums; }

/* -- Reduced motion: keep the layout, drop the movement ------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .split-char,
    .js .profile-avatar,
    .profile-avatar-ring,
    .back-to-top:hover i { animation: none; }
    .js .profile-divider { transform: none; transition: none; }
    .js .text-profile-bio strong { background-size: 100% 100%; transition: none; }
    .profile-link,
    .profile-link i,
    .pub-badge,
    .exp-logo,
    .news-item,
    .tilt-target,
    .back-to-top { transition: none; }
}
