/**
* Template Name: SnapFolio
* Template URL: https://bootstrapmade.com/snapfolio-bootstrap-portfolio-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
* Custom astrophysics adaptation for Tanmay Singh.
*/

:root {
  --bg: #03050b;
  --bg-soft: #080d18;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.14);
  --glass-bg: rgba(8, 13, 24, 0.58);
  --glass-bg-strong: rgba(13, 20, 36, 0.72);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.18);
  --glow-cyan: rgba(125, 211, 252, 0.34);
  --glow-violet: rgba(167, 139, 250, 0.3);
  --text: #f8fafc;
  --muted: #9aa7bb;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --accent-3: #f5c2e7;
  --accent-4: #93c5fd;
  --gold: #f8d477;
  --magenta: #f0abfc;
  --green: #93e6c4;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  --header-width: 310px;
  color-scheme: dark;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 30px;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% 8%, rgba(167, 139, 250, 0.26), transparent 34rem),
    radial-gradient(circle at 12% 24%, rgba(125, 211, 252, 0.19), transparent 32rem),
    linear-gradient(135deg, var(--bg) 0%, #060a13 42%, #090e1c 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  content: "";
  background-image:
    radial-gradient(circle at 22% 18%, rgba(125, 211, 252, 0.08), transparent 26rem),
    radial-gradient(circle at 78% 36%, rgba(167, 139, 250, 0.08), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: auto, auto, 86px 86px, 86px 86px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  animation: gridDrift 42s linear infinite;
}

.cosmic-image-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../../images/TNG50_protocluster_z1_dm_gasvel_4k.png") center / cover no-repeat;
  opacity: 0.9;
  filter: brightness(1.35) contrast(1.15) saturate(1.12);
  mix-blend-mode: screen;
}

.cosmic-image-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(3, 5, 11, 0.22), rgba(3, 5, 11, 0.76) 58%, rgba(3, 5, 11, 0.94) 100%),
    linear-gradient(90deg, rgba(3, 5, 11, 0.82), rgba(3, 5, 11, 0.48), rgba(3, 5, 11, 0.82)),
    linear-gradient(180deg, rgba(3, 5, 11, 0.6), rgba(3, 5, 11, 0.88));
}

body::after {
  position: fixed;
  inset: -14%;
  z-index: 4;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse at 25% 32%, rgba(125, 211, 252, 0.07), transparent 34rem),
    radial-gradient(ellipse at 74% 18%, rgba(245, 194, 231, 0.055), transparent 30rem),
    radial-gradient(ellipse at 62% 74%, rgba(167, 139, 250, 0.055), transparent 36rem);
  filter: blur(18px);
  opacity: 0.9;
  transform: translate3d(calc(var(--parallax-x, 0) * -0.35px), calc(var(--parallax-y, 0) * -0.35px), 0);
  animation: nebulaDrift 34s ease-in-out infinite alternate;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

a:hover {
  color: var(--accent-3);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(125, 211, 252, 0.7);
  outline-offset: 4px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.04;
  letter-spacing: 0;
}

p {
  color: var(--muted);
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 14px;
  color: #06121f;
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

#galaxy-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.94;
  mix-blend-mode: screen;
}

.cosmic-vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 45%), rgba(255, 255, 255, 0.065), transparent 3.8rem),
    radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 45%), rgba(125, 211, 252, 0.12), transparent 15rem),
    repeating-radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 45%), rgba(167, 139, 250, 0.018) 0 1px, transparent 1px 118px),
    radial-gradient(ellipse at 65% 18%, rgba(245, 194, 231, 0.08), transparent 34rem),
    linear-gradient(180deg, transparent, rgba(3, 5, 11, 0.68));
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 0, 0 0, 86px 86px, 86px 86px;
  }
}

@keyframes nebulaDrift {
  from {
    opacity: 0.72;
    transform: translate3d(calc(var(--parallax-x, 0) * -0.35px), calc(var(--parallax-y, 0) * -0.35px), 0) rotate(-1deg) scale(1);
  }

  to {
    opacity: 0.95;
    transform: translate3d(calc(var(--parallax-x, 0) * -0.55px), calc(var(--parallax-y, 0) * -0.55px), 0) rotate(1deg) scale(1.04);
  }
}

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 997;
  display: flex;
  align-items: center;
  width: var(--header-width);
  padding: 24px 18px;
}

.header-container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 48px);
  padding: 18px;
  overflow-y: auto;
  background: rgba(5, 7, 13, 0.78);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform-origin: center center;
  transition:
    transform 2s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 620ms ease,
    background 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease;
  will-change: transform, opacity;
}

body.intro-active {
  overflow: hidden;
}

body.intro-hold .header-container,
body.intro-moving .header-container {
  background: rgba(5, 7, 13, 0.9);
  border-color: rgba(125, 211, 252, 0.24);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.62), 0 0 70px rgba(125, 211, 252, 0.12);
}

body.intro-hold .header-container {
  transform: translate3d(calc(50vw - (var(--header-width) / 2)), 0, 0) scale(1.12);
}

body.intro-moving .header-container,
body.intro-complete .header-container {
  transform: translate3d(0, 0, 0) scale(1);
}

body.intro-skipped .header-container {
  transition-duration: 560ms;
}

body.intro-active .main,
body.intro-active .site-footer {
  pointer-events: none;
  opacity: 0;
  filter: blur(3px);
  transform: translateY(24px);
  transition:
    opacity 1.25s ease,
    filter 1.25s ease,
    transform 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.intro-moving .main,
body.intro-moving .site-footer {
  pointer-events: auto;
  opacity: 1;
  filter: none;
  transform: none;
  transition-delay: 520ms;
}

body.intro-complete .main,
body.intro-complete .site-footer {
  pointer-events: auto;
  opacity: 1;
  filter: none;
  transform: none;
}

body.intro-skipped .main,
body.intro-skipped .site-footer {
  transition-duration: 420ms;
  transition-delay: 120ms;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--text);
  transition: transform 620ms cubic-bezier(0.19, 1, 0.22, 1), margin 620ms cubic-bezier(0.19, 1, 0.22, 1);
}

.brand-lockup:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #041019;
  font-weight: 850;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 14px;
}

.brand-mark.image-mark {
  position: relative;
  overflow: hidden;
  padding: 2px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.75), rgba(167, 139, 250, 0.7)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 28px rgba(125, 211, 252, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-mark.image-mark::after {
  position: absolute;
  inset: -32%;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 24%, rgba(255, 255, 255, 0.22), transparent 62%);
  transform: translateX(-80%) rotate(12deg);
  transition: transform 520ms ease;
}

.brand-lockup:hover .brand-mark.image-mark::after {
  transform: translateX(72%) rotate(12deg);
}

.brand-mark.image-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 0.75rem;
}

.navmenu ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.navmenu,
.social-links {
  transition: opacity 360ms ease, transform 360ms ease, max-height 520ms ease, margin 360ms ease, padding 360ms ease;
}

.navmenu a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  margin: 4px 0;
  color: rgba(248, 250, 252, 0.72);
  border: 1px solid transparent;
  border-radius: 12px;
}

.navmenu a:hover,
.navmenu a.active {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--border);
}

.navicon {
  width: 20px;
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 8px;
  padding-top: 18px;
  margin-top: auto;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.social-links a:hover {
  color: #041019;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.header-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--text);
  background: rgba(5, 7, 13, 0.86);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.main,
.site-footer {
  position: relative;
  z-index: 5;
  margin-left: var(--header-width);
  transition: opacity 520ms ease, filter 520ms ease, transform 520ms ease;
}

.section {
  position: relative;
  padding: 104px 0;
}

.container {
  max-width: 1160px;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 36px;
}

.section-heading h2 {
  max-width: 780px;
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 4.4vw, 4.7rem);
}

.section-heading p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 1.06rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 30px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.eyebrow a,
.hero-subtitle a,
.about-text a,
.personal-copy a,
.link-section a {
  color: #93e5ff;
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.45);
  text-underline-offset: 4px;
}

.eyebrow a:hover,
.hero-subtitle a:hover,
.about-text a:hover,
.personal-copy a:hover,
.link-section a:hover {
  color: var(--accent-3);
  text-decoration-color: rgba(245, 194, 231, 0.7);
}

.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 92px 0;
  overflow: hidden;
}

.hero::before,
.hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 50%;
  transform: translate3d(calc(var(--parallax-x, 0) * 0.65px), calc(var(--parallax-y, 0) * 0.65px), 0) rotate(-14deg);
}

.hero::before {
  top: 11%;
  right: -8%;
  width: min(58vw, 720px);
  aspect-ratio: 1.9;
  box-shadow: 0 0 90px rgba(125, 211, 252, 0.07), inset 0 0 70px rgba(167, 139, 250, 0.045);
}

.hero::after {
  top: 17%;
  right: 5%;
  width: min(42vw, 520px);
  aspect-ratio: 1.8;
  border-color: rgba(167, 139, 250, 0.12);
  transform: translate3d(calc(var(--parallax-x, 0) * 0.45px), calc(var(--parallax-y, 0) * 0.45px), 0) rotate(-19deg);
}

.hero-nebula {
  position: absolute;
  inset: 2% 0 auto auto;
  z-index: -1;
  width: min(70vw, 900px);
  aspect-ratio: 1.25;
  background:
    radial-gradient(ellipse at 54% 48%, rgba(245, 194, 231, 0.26), transparent 0 12%, transparent 24%),
    radial-gradient(ellipse at 46% 52%, rgba(125, 211, 252, 0.28), transparent 0 28%, transparent 58%),
    radial-gradient(ellipse at 70% 32%, rgba(167, 139, 250, 0.32), transparent 0 26%, transparent 62%);
  filter: blur(22px);
  opacity: 0.9;
  transform: translate3d(calc(var(--parallax-x, 0) * -0.9px), calc(var(--parallax-y, 0) * -0.9px), 0) rotate(-10deg);
  animation: heroNebulaPulse 12s ease-in-out infinite alternate;
}

@keyframes heroNebulaPulse {
  from {
    filter: blur(22px) saturate(1);
    opacity: 0.74;
  }

  to {
    filter: blur(28px) saturate(1.2);
    opacity: 0.98;
  }
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 46px;
  align-items: center;
}

.hero-copy,
.about-text,
.project-body,
.publication-card,
.timeline-content,
.contact-panel,
.contact-tile {
  min-width: 0;
}

.hero h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
}

.hero-role {
  margin-bottom: 18px;
  color: var(--accent-3);
  font-size: clamp(1.2rem, 2.8vw, 2.15rem);
  font-weight: 700;
}

.hero-subtitle {
  max-width: 760px;
  margin-bottom: 28px;
  color: #d6deea;
  font-size: clamp(1.02rem, 1.45vw, 1.28rem);
}

.hero-actions,
.hero-links,
.tag-cloud,
.publication-actions {
  display: flex;
  flex-wrap: wrap;
}

.hero-actions {
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  overflow: hidden;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.btn::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.32) 48%, transparent 100%);
  opacity: 0;
  transform: translateX(-120%);
  transition: transform 520ms ease, opacity 220ms ease;
}

.btn:hover::before {
  opacity: 1;
  transform: translateX(120%);
}

.btn i,
.btn span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  color: #041019;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  box-shadow: 0 20px 44px rgba(125, 211, 252, 0.2);
}

.btn-primary:hover {
  color: #041019;
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(125, 211, 252, 0.28), 0 0 28px rgba(167, 139, 250, 0.18);
}

.btn-outline {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  color: var(--text);
  background: var(--surface-strong);
  border-color: rgba(125, 211, 252, 0.46);
  box-shadow: 0 18px 44px rgba(125, 211, 252, 0.14);
}

.hero-links {
  gap: 16px;
}

.hero-links a {
  color: #dbe6f4;
  border-bottom: 1px solid rgba(125, 211, 252, 0.28);
  overflow-wrap: anywhere;
}

.hero-portrait {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 420px);
  margin: 0;
  padding: 14px;
  overflow: hidden;
  background:
    conic-gradient(from 130deg, rgba(125, 211, 252, 0.72), rgba(167, 139, 250, 0.58), rgba(245, 194, 231, 0.46), rgba(248, 212, 119, 0.32), rgba(125, 211, 252, 0.72)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(125, 211, 252, 0.2), rgba(167, 139, 250, 0.14), rgba(255, 255, 255, 0.05));
  background-size: 220% 220%, auto, auto;
  border: 1px solid var(--glass-border);
  border-radius: 34px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  transform: perspective(1000px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translate3d(calc(var(--parallax-x, 0) * 0.4px), calc(var(--parallax-y, 0) * 0.4px), 0);
  transition: transform 500ms cubic-bezier(0.19, 1, 0.22, 1), border-color 260ms ease, box-shadow 260ms ease, filter 260ms ease;
  animation: portraitRim 12s linear infinite;
}

.hero-portrait:hover {
  border-color: rgba(125, 211, 252, 0.32);
  box-shadow:
    var(--shadow),
    0 0 42px rgba(125, 211, 252, 0.18),
    0 0 82px rgba(167, 139, 250, 0.12),
    inset 0 1px 0 var(--glass-highlight);
  filter: saturate(1.04);
  transform: perspective(1000px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translate3d(calc(var(--parallax-x, 0) * 0.4px), calc(var(--parallax-y, 0) * 0.4px - 8px), 0) scale(1.015);
}

.hero-portrait::before {
  position: absolute;
  inset: 1px;
  z-index: 2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at var(--glow-x, 30%) var(--glow-y, 20%), rgba(255, 255, 255, 0.16), transparent 0 1.5px, transparent 2.5px),
    radial-gradient(circle at calc(var(--glow-x, 30%) + 18%) calc(var(--glow-y, 20%) + 16%), rgba(125, 211, 252, 0.17), transparent 0 1.5px, transparent 2.5px),
    linear-gradient(130deg, rgba(255, 255, 255, 0.16), transparent 22%, transparent 74%, rgba(245, 194, 231, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  opacity: 0.62;
  mix-blend-mode: screen;
  transition: opacity 260ms ease;
}

.hero-portrait:hover::before {
  opacity: 0.86;
}

.portrait-halo {
  position: absolute;
  inset: -34px;
  z-index: 0;
  background: conic-gradient(from 90deg, rgba(125, 211, 252, 0.18), rgba(167, 139, 250, 0.28), rgba(245, 194, 231, 0.16), rgba(125, 211, 252, 0.18));
  border-radius: 42px;
  filter: blur(20px);
  opacity: 0.8;
  transform: translate3d(calc(var(--parallax-x, 0) * -0.7px), calc(var(--parallax-y, 0) * -0.7px), 0);
}

.hero-portrait img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center center;
  border-radius: 24px;
}

.hero-portrait::after {
  position: absolute;
  inset: 14px;
  z-index: 3;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.18), transparent 0 1px, transparent 2px),
    radial-gradient(circle at 72% 28%, rgba(125, 211, 252, 0.2), transparent 0 1px, transparent 2px),
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 32%, transparent 70%, rgba(125, 211, 252, 0.06));
  border-radius: 24px;
  opacity: 0.68;
  mix-blend-mode: screen;
}

@keyframes portraitRim {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 100% 50%;
  }
}

.card-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-panel,
.contact-panel,
.research-card,
.project-card,
.publication-card,
.timeline-content,
.teaching-panel,
.personal-panel,
.link-section,
.contact-tile,
.fact-grid div,
.glass-panel,
.cosmic-card,
.education-card,
.personal-card,
.link-card,
.hover-lift {
  --card-accent: var(--accent);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 0%), color-mix(in srgb, var(--card-accent) 17%, transparent), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(145deg, var(--glass-bg-strong), var(--glass-bg));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform-style: preserve-3d;
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease, background 240ms ease;
}

.about-panel::before,
.contact-panel::before,
.research-card::before,
.project-card::before,
.publication-card::before,
.timeline-content::before,
.teaching-panel::before,
.personal-panel::before,
.link-section::before,
.contact-tile::before,
.fact-grid div::before,
.glass-panel::before,
.cosmic-card::before,
.education-card::before,
.personal-card::before,
.link-card::before,
.hover-lift::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 32%),
    radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 0%), color-mix(in srgb, var(--card-accent) 19%, rgba(255, 255, 255, 0.08)), transparent 35%);
  border-radius: inherit;
  opacity: 0.38;
  transition: opacity 240ms ease;
}

.about-panel:hover,
.contact-panel:hover,
.research-card:hover,
.project-card:hover,
.publication-card:hover,
.timeline-content:hover,
.teaching-panel:hover,
.personal-panel:hover,
.link-section:hover,
.contact-tile:hover,
.fact-grid div:hover,
.glass-panel:hover,
.cosmic-card:hover,
.education-card:hover,
.personal-card:hover,
.link-card:hover,
.hover-lift:hover {
  border-color: color-mix(in srgb, var(--card-accent) 44%, rgba(255, 255, 255, 0.16));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.58),
    0 0 42px color-mix(in srgb, var(--card-accent) 17%, transparent),
    0 0 70px rgba(167, 139, 250, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(-6px) scale(1.01);
}

.about-panel:hover::before,
.contact-panel:hover::before,
.research-card:hover::before,
.project-card:hover::before,
.publication-card:hover::before,
.timeline-content:hover::before,
.teaching-panel:hover::before,
.personal-panel:hover::before,
.link-section:hover::before,
.contact-tile:hover::before,
.fact-grid div:hover::before,
.glass-panel:hover::before,
.cosmic-card:hover::before,
.education-card:hover::before,
.personal-card:hover::before,
.link-card:hover::before,
.hover-lift:hover::before {
  opacity: 0.68;
}

.accent-cyan,
.research-card:nth-child(1),
.contact-tile:nth-child(1) {
  --card-accent: var(--accent);
}

.accent-violet,
.research-card:nth-child(2),
.publication-card,
.timeline-content {
  --card-accent: var(--accent-2);
}

.accent-blue,
.project-card:nth-child(2n),
.link-section:nth-child(2n) {
  --card-accent: var(--accent-4);
}

.accent-magenta,
.research-card:nth-child(3),
.personal-panel,
.contact-tile:nth-child(2) {
  --card-accent: var(--magenta);
}

.accent-gold,
.project-card:nth-child(2n + 1),
.teaching-panel,
.fact-grid div:nth-child(2n) {
  --card-accent: var(--gold);
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 28px;
  padding: clamp(24px, 4vw, 42px);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.fact-grid div {
  padding: 16px;
  border-radius: 14px;
}

.fact-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 700;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.research-card {
  min-height: 320px;
  padding: clamp(22px, 3vw, 34px);
}

.research-card.featured {
  grid-row: span 2;
  min-height: 660px;
}

.card-glow {
  position: absolute;
  inset: auto -20% -35% 18%;
  height: 300px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 68%);
  pointer-events: none;
}

.research-card h3,
.project-card h3,
.publication-card h3,
.timeline-content h3,
.contact-panel h3 {
  margin: 10px 0 14px;
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.tag-cloud {
  gap: 8px 9px;
  margin-top: 20px;
}

.tag-cloud span {
  --tag-accent: var(--accent);
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 700;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    color-mix(in srgb, var(--tag-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tag-accent) 32%, transparent);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.tag-cloud span:nth-child(2n) {
  --tag-accent: var(--accent-2);
}

.tag-cloud span:nth-child(3n) {
  --tag-accent: var(--green);
}

.tag-cloud span:nth-child(4n) {
  --tag-accent: var(--accent-3);
}

.project-card .tag-cloud span:nth-child(4n + 1) {
  --tag-accent: var(--gold);
}

.tag-cloud span:hover {
  color: #ffffff;
  border-color: color-mix(in srgb, var(--tag-accent) 54%, transparent);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--tag-accent) 18%, transparent);
  transform: translateY(-1px);
}

.project-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.project-card {
  grid-column: span 3;
}

.project-card.large {
  grid-column: span 6;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}

.project-visual {
  min-height: 230px;
  background-color: var(--bg-soft);
  background-position: center;
  background-size: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.project-card:hover .project-visual {
  filter: saturate(1.16) contrast(1.06);
  transform: scale(1.045);
}

.visual-site {
  background-image: linear-gradient(135deg, rgba(3, 5, 11, 0.12), rgba(125, 211, 252, 0.18)), url("../../images/milky_way.jpg");
}

.visual-solar {
  background-image: linear-gradient(135deg, rgba(3, 5, 11, 0.16), rgba(245, 194, 231, 0.12)), url("../../images/galaxy3.jpg");
}

.visual-qkd {
  background:
    radial-gradient(circle at 28% 30%, rgba(125, 211, 252, 0.36), transparent 25%),
    radial-gradient(circle at 74% 60%, rgba(167, 139, 250, 0.32), transparent 30%),
    linear-gradient(145deg, #05101c, #141827);
}

.visual-waves {
  background-image: linear-gradient(135deg, rgba(3, 5, 11, 0.1), rgba(147, 230, 196, 0.12)), url("../../images/galaxy6.jpg");
}

.visual-fano {
  background:
    radial-gradient(circle at 44% 44%, rgba(245, 194, 231, 0.38), transparent 18%),
    radial-gradient(circle at 62% 50%, rgba(125, 211, 252, 0.22), transparent 26%),
    linear-gradient(145deg, #080c18, #151023);
}

.project-body {
  padding: clamp(22px, 3vw, 32px);
}

.publication-tools {
  margin-bottom: 18px;
}

.publication-list {
  display: grid;
  gap: 18px;
}

.publication-card {
  padding: clamp(22px, 3vw, 34px);
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publication-meta span {
  padding: 6px 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  background: rgba(125, 211, 252, 0.09);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
  text-transform: uppercase;
}

.publication-card p {
  margin-bottom: 0;
  color: #cdd8e7;
}

.publication-actions {
  gap: 10px;
  margin-top: 22px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  color: #06121f;
  font-size: 0.85rem;
  font-weight: 850;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(125, 211, 252, 0.16);
}

.chip-link:hover {
  color: #06121f;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  transform: translateY(-2px);
}

.timeline {
  position: relative;
  display: grid;
  gap: 34px;
  padding-left: 190px;
}

.timeline-track {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 148px;
  width: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.08);
}

.timeline-fill {
  width: 100%;
  height: var(--timeline-progress, 0%);
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 52%, #5eead4 100%);
  border-radius: inherit;
  box-shadow: 0 0 22px rgba(125, 211, 252, 0.62), 0 0 48px rgba(167, 139, 250, 0.42);
  transition: height 120ms linear;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 40px;
  margin-left: -190px;
}

.timeline-item::before {
  position: absolute;
  top: 20px;
  left: 141px;
  z-index: 1;
  width: 20px;
  height: 20px;
  content: "";
  background: radial-gradient(circle, #ffffff 0 18%, var(--accent) 42%, rgba(125, 211, 252, 0.3) 72%);
  border: 4px solid rgba(8, 13, 24, 0.96);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(125, 211, 252, 0.1), 0 0 22px rgba(125, 211, 252, 0.24);
  opacity: 0.66;
  transition: transform 240ms ease, box-shadow 240ms ease, opacity 240ms ease, background 240ms ease;
}

.timeline-item.is-past::before,
.timeline-item.is-active::before {
  opacity: 1;
}

.timeline-item.is-active::before {
  background: radial-gradient(circle, #ffffff 0 18%, var(--accent-3) 38%, var(--accent) 72%);
  box-shadow: 0 0 0 10px rgba(125, 211, 252, 0.16), 0 0 34px rgba(125, 211, 252, 0.64), 0 0 60px rgba(167, 139, 250, 0.36);
  transform: scale(1.12);
}

.timeline-date {
  padding-top: 16px;
  color: var(--accent-3);
  font-size: 0.92rem;
  font-weight: 850;
}

.timeline-content {
  padding: 24px;
  overflow: hidden;
}

.timeline-item.is-active .timeline-content {
  border-color: rgba(167, 139, 250, 0.34);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.58),
    0 0 44px rgba(167, 139, 250, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.timeline-org {
  color: #d5dfeb;
  font-weight: 700;
}

.teaching-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 18px 30px;
  margin-top: 32px;
  padding: clamp(22px, 3vw, 30px);
}

.teaching-panel .eyebrow {
  margin-bottom: 10px;
}

.teaching-panel h3 {
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
}

.teaching-panel p {
  margin-bottom: 10px;
}

.personal-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 42px);
  padding: clamp(24px, 4vw, 42px);
}

.interest-grid {
  display: grid;
  gap: 12px;
  align-content: start;
}

.interest-grid span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 11px 14px;
  color: #eaf6ff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.interest-grid i {
  color: var(--gold);
}

.personal-copy p:last-child {
  margin-bottom: 0;
}

.useful-main {
  min-height: 100vh;
}

.useful-hero {
  padding-top: 112px;
}

.useful-hero h1 {
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 900;
}

.useful-links-grid {
  display: grid;
  gap: 18px;
}

.link-section {
  padding: clamp(22px, 3vw, 34px);
}

.link-section h2 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 2.4vw, 2.45rem);
}

.link-section h3 {
  margin: 20px 0 10px;
  color: var(--accent-3);
  font-size: 1rem;
  text-transform: uppercase;
}

.link-section p {
  margin-bottom: 10px;
}

.link-section p:last-child {
  margin-bottom: 0;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 28px;
  padding: clamp(24px, 4vw, 42px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-tile {
  display: grid;
  gap: 6px;
  min-height: 148px;
  padding: 20px;
  color: var(--text);
  border-radius: 16px;
  overflow: hidden;
}

.contact-tile:hover {
  color: var(--text);
}

.contact-tile i {
  color: var(--accent);
  font-size: 1.35rem;
}

.contact-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-tile strong {
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 996;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #06121f;
  visibility: hidden;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.hero .reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1199px) {
  .site-header {
    width: min(86vw, 330px);
    pointer-events: none;
  }

  .site-header .header-container {
    pointer-events: auto;
    transform: translateX(calc(-100% - 42px));
    transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1), opacity 420ms ease, background 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
  }

  .site-header.header-show .header-container {
    transform: translateX(0) !important;
  }

  body:not(.intro-active) .site-header:not(.header-show) .header-container {
    opacity: 1;
    transform: translateX(calc(-100% - 42px)) !important;
  }

  body.intro-hold .site-header .header-container {
    opacity: 1;
    transform: translateX(calc(50vw - 50% - 18px)) scale(1.02) !important;
  }

  body.intro-moving .site-header .header-container {
    opacity: 0;
    transform: translateX(calc(-100% - 42px)) !important;
  }

  body.intro-complete .site-header .header-container {
    opacity: 1;
    transform: translateX(calc(-100% - 42px)) !important;
  }

  body.intro-complete .site-header.header-show .header-container {
    transform: translateX(0) !important;
  }

  .header-toggle {
    pointer-events: auto;
  }

  .main,
  .site-footer {
    margin-left: 0;
  }

  .hero-shell,
  .about-panel,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    justify-self: center;
    width: min(100%, 380px);
    max-width: 460px;
  }

  .section {
    padding: 84px 0;
  }
}

@media (max-width: 820px) {
  .cosmic-image-bg {
    opacity: 0.06;
  }

  .cosmic-image-shade {
    background:
      radial-gradient(circle at 50% 30%, rgba(3, 5, 11, 0.36), rgba(3, 5, 11, 0.9) 68%),
      linear-gradient(180deg, rgba(3, 5, 11, 0.82), rgba(3, 5, 11, 0.94));
  }

  body::after {
    opacity: 0.56;
  }

  .hero::before,
  .hero::after {
    opacity: 0.42;
  }

  .research-grid,
  .fact-grid,
  .contact-grid,
  .teaching-panel,
  .personal-panel {
    grid-template-columns: 1fr;
  }

  .research-card.featured {
    grid-row: auto;
    min-height: auto;
  }

  .project-mosaic {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card.large {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .timeline {
    gap: 22px;
    padding-left: 0;
  }

  .timeline-track,
  .timeline-item::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-left: 0;
  }

  .timeline-date {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  html,
  body,
  .main,
  .section,
  .hero,
  .container,
  .hero-shell,
  .hero-copy {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .hero {
    min-height: auto;
    padding-top: 118px;
  }

  .site-header {
    width: min(calc(100vw - 28px), 330px);
    padding: 16px 14px;
  }

  .site-header .header-container {
    max-height: min(82vh, 620px);
  }

  body.intro-hold .site-header .header-container {
    transform: translateX(calc(50vw - 50% - 14px)) scale(1) !important;
  }

  .container {
    max-width: 100vw !important;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-copy {
    width: min(calc(100vw - 36px), 354px);
    max-width: min(calc(100vw - 36px), 354px);
  }

  .hero-portrait {
    justify-self: start;
    width: min(calc(100vw - 36px), 320px);
    max-width: min(calc(100vw - 36px), 320px);
    padding: 10px;
    border-radius: 26px;
  }

  .hero-portrait img,
  .hero-portrait::after {
    border-radius: 18px;
  }

  .hero-portrait::before {
    border-radius: 22px;
  }

  .eyebrow {
    display: flex;
    width: min(calc(100vw - 36px), 330px);
    max-width: min(calc(100vw - 36px), 330px);
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .eyebrow::before {
    width: 22px;
    flex: 0 0 22px;
  }

  .hero h1 {
    max-width: min(calc(100vw - 36px), 354px);
    font-size: clamp(3.2rem, 16vw, 4.75rem);
  }

  .hero-role {
    max-width: min(calc(100vw - 36px), 330px);
    font-size: clamp(1.08rem, 7vw, 1.45rem);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-subtitle,
  .section-heading p:last-child {
    max-width: min(calc(100vw - 36px), 354px);
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .section-heading,
  .section-heading h2 {
    width: min(calc(100vw - 36px), 354px);
    max-width: min(calc(100vw - 36px), 354px);
    overflow-wrap: break-word;
    word-break: normal;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.05;
  }

  .hero-actions,
  .hero-actions .btn {
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  .hero-links {
    gap: 10px 16px;
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  .hero-links a {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  body::before,
  body::after,
  .hero-nebula,
  .hero-portrait {
    animation: none !important;
  }

  body.intro-active .site-header,
  body.intro-active .header-container,
  body.intro-active .brand-lockup,
  body.intro-active .main,
  body.intro-active .site-footer,
  body.intro-complete .main,
  body.intro-complete .site-footer {
    filter: none;
    opacity: 1;
    transform: none;
  }

  .about-panel:hover,
  .contact-panel:hover,
  .research-card:hover,
  .project-card:hover,
  .publication-card:hover,
  .timeline-content:hover,
  .teaching-panel:hover,
  .personal-panel:hover,
  .link-section:hover,
  .contact-tile:hover,
  .fact-grid div:hover,
  .glass-panel:hover,
  .cosmic-card:hover,
  .education-card:hover,
  .personal-card:hover,
  .link-card:hover,
  .hover-lift:hover,
  .hero-portrait:hover {
    transform: none;
  }
}
