/* ==========================================================
   Dr. Shibashis Mukherjee | Academic Website
   ========================================================== */

:root {
  --navy: #0F172A;
  --navy-2: #1E293B;
  --amber: #D97706;
  --bronze: #B45309;
  --bg: #FAFAFA;
  --bg-alt: #F4F3F0;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --text: #1E293B;
  --muted: #64748B;
  --soft: #94A3B8;
  --gold-tint: #FEF3E2;

  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  font-size: 112.5%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: var(--gold-tint); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute; left: 16px; top: -120px;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
  z-index: 100; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(250, 250, 250, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(250, 250, 250, .92); }

.nav {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.01em;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  display: block;
  padding: 8px 10px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px;
  height: 1.5px; background: var(--amber);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a.active::after, .nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--navy);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 72px 0 40px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 10%, transparent 70%);
  opacity: .55;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: center;
}

.role-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem; font-weight: 500; color: var(--navy-2);
  box-shadow: var(--shadow);
}
.role-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .15);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(217, 119, 6, .15); }
  50% { box-shadow: 0 0 0 7px rgba(217, 119, 6, .05); }
}

.hero-name {
  margin-top: 28px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.7rem, 5.8vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--navy);
}
.hero-name em { font-style: normal; font-weight: 600; color: var(--bronze); }

.hero-tagline {
  margin-top: 24px;
  max-width: 34rem;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.12rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--navy-2);
}

.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: .88rem; font-weight: 500;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .6); }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: var(--card); color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--amber); color: var(--bronze); }

/* Arched portrait: echoes the Gothic doorway in the photograph */
.hero-photo { margin: 0; position: relative; isolation: isolate; justify-self: end; width: min(100%, 400px); }
.hero-photo .arch {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 18px 18px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .45);
}
.hero-photo .arch img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 44% 30%;
  transform: scale(1.04);
  transition: transform 1.2s var(--ease);
}
.hero-photo:hover .arch img { transform: scale(1.08); }
.hero-photo::before {
  content: "";
  position: absolute; inset: 0;
  transform: translate(18px, 18px);
  border: 1.5px solid var(--amber);
  border-radius: 999px 999px 18px 18px;
  z-index: -1;
}
.hero-photo figcaption {
  position: absolute; left: -28px; bottom: 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: .82rem; font-weight: 500; color: var(--navy);
  box-shadow: var(--shadow);
  line-height: 1.4;
}
.caption-kicker {
  display: block;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 2px;
}


/* ---------------- Sections ---------------- */
.section { padding: 112px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-num {
  display: inline-block;
  font-family: var(--display); font-weight: 600; letter-spacing: .08em;
  font-size: .85rem; color: var(--amber);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--amber);
}
.section-label h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--navy);
}
.section-label p { margin-top: 14px; color: var(--muted); font-size: .95rem; max-width: 22rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; }
.about-copy { max-width: 44rem; display: grid; gap: 20px; color: var(--navy-2); }
.about-copy .lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.5;
  letter-spacing: -.005em;
  color: var(--navy);
}
.about-copy em { color: var(--bronze); }
.about-copy .lead em { font-style: normal; font-weight: 600; }
.about-copy p:not(.lead) { color: var(--muted); font-size: 1.02rem; }

.journey {
  margin-top: 72px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.journey-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.journey-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--line);
}
.journey-track li { position: relative; padding-top: 28px; display: flex; flex-direction: column; gap: 2px; }
.journey-track li::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--soft);
}
.journey-track li.soc::before { border-color: var(--navy-2); }
.journey-track li.fac::before { border-color: var(--amber); }
.journey-track li.now::before { background: var(--amber); box-shadow: 0 0 0 5px rgba(217, 119, 6, .15); }
.journey-track .yr { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.journey-track .ev { font-size: .8rem; font-weight: 600; color: var(--navy-2); line-height: 1.35; }
.journey-track .pl { font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* Discipline layout */
.discipline { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.discipline > .section-label { position: sticky; top: calc(var(--header-h) + 40px); }
.discipline-body { display: grid; gap: 48px; min-width: 0; }

.block-title {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--sans);
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.block-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.block.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* Timeline */
.timeline { position: relative; display: grid; gap: 4px; }
.timeline li {
  position: relative;
  display: grid; grid-template-columns: 150px 1fr; gap: 20px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .25s, transform .3s var(--ease);
}
.timeline li:hover { border-color: #CBD5E1; transform: translateX(4px); }
.timeline li.current { border-left: 3px solid var(--amber); }
.tl-year { font-size: .85rem; font-weight: 600; color: var(--bronze); padding-top: 2px; font-variant-numeric: tabular-nums; }
.tl-role { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--navy); }
.tl-org { color: var(--muted); font-size: .93rem; }

/* Publication cards */
.pub {
  display: grid; grid-template-columns: 72px 1fr; gap: 20px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pub + .pub { margin-top: 14px; }
.pub:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 18px 36px -18px rgba(15,23,42,.22); }
.pub-year {
  font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.2; color: var(--amber);
  border-right: 1px solid var(--line);
}
.cite { font-size: .98rem; color: var(--navy-2); line-height: 1.7; }
.cite strong { color: var(--navy); font-weight: 600; }
.cite em { font-style: italic; color: var(--navy); font-weight: 500; }
.pub-note { margin-top: 8px; font-size: .78rem; color: var(--muted); font-style: italic; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: var(--navy-2);
  background: #F1F5F9;
  border: 1px solid var(--line);
}
.badge-gold { color: var(--bronze); background: var(--gold-tint); border-color: #FCD9A8; }
.badge-gold::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
}

/* Course list */
.courses { display: grid; gap: 10px; }
.courses li {
  position: relative;
  padding: 14px 18px 14px 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
}
.courses li::before {
  content: ""; position: absolute; left: 18px; top: 50%;
  width: 12px; height: 1.5px; background: var(--amber);
}

/* Degrees with accordions */
.degree {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s;
}
.degree + .degree { margin-top: 12px; }
.degree:hover { border-color: #CBD5E1; }
.degree-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px; }
.degree-name { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--navy); line-height: 1.3; }
.degree-inst { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.degree-year {
  font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--bronze);
  padding: 2px 12px; border: 1px solid #FCD9A8; background: var(--gold-tint); border-radius: 999px;
}

details { border-top: 1px dashed var(--line); }
summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  font-size: .82rem; font-weight: 500; color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color .2s, background .2s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; width: 8px; height: 8px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .3s var(--ease);
}
details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
summary:hover { color: var(--bronze); background: #FCFBF8; }
.detail-list { margin: 0; padding: 4px 22px 22px; display: grid; gap: 4px; }
.detail-list dt {
  margin-top: 10px;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze);
}
.detail-list dd { margin: 0; color: var(--navy-2); font-size: .95rem; }
.detail-list dd:first-of-type { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.08rem; line-height: 1.55; color: var(--navy); }

.degree-thesis { padding: 16px 22px 20px; border-top: 1px dashed var(--line); }
.degree-thesis span {
  display: block; margin-bottom: 4px;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bronze);
}
.degree-thesis p { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.08rem; line-height: 1.55; color: var(--navy); }

/* Note card (internship) */
.note-card {
  padding: 20px 22px;
  background: var(--navy);
  color: #E2E8F0;
  border-radius: var(--radius);
  font-size: .95rem;
}
.note-kicker {
  display: block; margin-bottom: 8px;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #FBBF24;
}

/* Psychology rank card */
.psych-grid { display: grid; grid-template-columns: 1fr 240px; gap: 14px; align-items: stretch; }
.rank-card {
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px;
  background: var(--navy);
  color: #CBD5E1;
  border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.rank-card::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, .25);
  box-shadow: 0 0 0 20px rgba(251, 191, 36, .04), 0 0 0 40px rgba(251, 191, 36, .03);
}
.rank-num { font-family: var(--display); color: #fff; line-height: 1; display: flex; align-items: baseline; gap: 6px; }
.rank-num span { font-size: 3.6rem; font-weight: 700; letter-spacing: -.02em; color: #FBBF24; }
.rank-num small { font-size: 1.3rem; color: #94A3B8; }
.rank-text { margin-top: 12px; font-size: .9rem; color: #F1F5F9; font-weight: 500; line-height: 1.45; }
.rank-src { margin-top: 8px; font-size: .74rem; color: #94A3B8; line-height: 1.45; }

/* ---------------- Teaching hub ---------------- */
.hub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hub-head > p { color: var(--muted); max-width: 22rem; }

.filters { margin: 40px 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font: inherit; font-size: .84rem; font-weight: 500;
  color: var(--navy-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { border-color: var(--navy-2); }
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip .count {
  font-size: .72rem; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.16);
}
.chip:not(.is-active) .count { background: #F1F5F9; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.course-card {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 150px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: opacity .35s var(--ease), transform .35s var(--ease), border-color .25s, box-shadow .35s;
}
.course-card:hover { border-color: #CBD5E1; box-shadow: var(--shadow); transform: translateY(-3px); }
.course-card p { font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.35; color: var(--navy); margin-top: auto; }
.cc-tag {
  align-self: flex-start;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bronze);
}
.course-card.is-hidden { display: none; }
.course-card.is-entering { opacity: 0; transform: translateY(8px); }

/* ---------------- Music ---------------- */
.music-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; }

.player {
  padding: 28px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .6);
}
.player-top { display: flex; align-items: center; gap: 20px; }
.play-btn {
  flex: none;
  width: 64px; height: 64px; border-radius: 50%;
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--amber); color: var(--navy);
  box-shadow: 0 0 0 0 rgba(217, 119, 6, .5);
  transition: transform .25s var(--ease), background .25s;
}
.play-btn:hover { transform: scale(1.06); background: #F59E0B; }
.play-btn svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.play-btn .i-pause { display: none; }
.player.is-playing .play-btn .i-play { display: none; }
.player.is-playing .play-btn .i-pause { display: block; }
.player.is-playing .play-btn { animation: ring 2s ease-out infinite; }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .45); }
  100% { box-shadow: 0 0 0 18px rgba(217, 119, 6, 0); }
}
.track-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #FBBF24; }
.track-title { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.2; margin-top: 2px; }
.track-artist { font-size: .85rem; color: #94A3B8; }

.wave {
  margin-top: 28px;
  height: 64px;
  display: flex; align-items: center; gap: 3px;
  cursor: pointer;
  border-radius: 6px;
}
.wave .bar {
  flex: 1;
  min-width: 2px;
  border-radius: 2px;
  background: rgba(148, 163, 184, .35);
  transition: background .2s;
  transform-origin: center;
}
.wave .bar.played { background: #FBBF24; }
.player.is-playing .wave .bar { animation: bob 1.1s ease-in-out infinite alternate; }
@keyframes bob { from { transform: scaleY(1); } to { transform: scaleY(.72); } }

.player-time {
  margin-top: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: .78rem; color: #94A3B8; font-variant-numeric: tabular-nums;
}
.player-status { font-size: .76rem; color: #CBD5E1; text-align: center; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: #94A3B8; padding: 72px 0 28px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-name { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: #fff; }
.footer-sub { margin-top: 8px; line-height: 1.6; }
.footer-h { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #FBBF24; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer a { color: #CBD5E1; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #FBBF24; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .8rem;
}
.to-top {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .3);
}
.to-top svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.to-top:hover svg { transform: translateY(-3px); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  background: var(--navy); color: #fff;
  border-radius: 10px; font-size: .85rem;
  box-shadow: 0 16px 32px -12px rgba(15,23,42,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Reveal on scroll ---------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1320px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 20px;
    background: rgba(250, 250, 250, .98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(15, 23, 42, .2);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .4s var(--ease), visibility .4s;
  }
  .nav-links.open { clip-path: inset(0 0 0 0); visibility: visible; }
  .nav-links a { padding: 13px 4px; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--bronze); }
}

@media (max-width: 960px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-photo { justify-self: center; width: min(78%, 360px); }

  .about-grid, .discipline, .music-grid { grid-template-columns: 1fr; gap: 32px; }
  .discipline > .section-label { position: static; }
  .section { padding: 80px 0; }

  .journey { padding: 24px 0 24px 24px; }
  .journey-track {
    grid-template-columns: repeat(8, 150px);
    overflow-x: auto;
    padding: 0 24px 12px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .journey-track li { scroll-snap-align: start; }
  .journey-track::before { width: calc(8 * 158px); right: auto; }

  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero-name { margin-top: 22px; }
  .hero-actions .btn { flex: 1 1 calc(50% - 5px); justify-content: center; }
  .hero-actions .btn-primary { flex-basis: 100%; }
  .hero-photo { width: 84%; }
  .hero-photo::before { transform: translate(12px, 12px); }
  .hero-photo figcaption { left: -12px; bottom: 20px; }

  .journey { padding: 20px 0 20px 16px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .pub { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .pub-year { border-right: 0; font-size: 1.2rem; }
  .block.split, .psych-grid { grid-template-columns: 1fr; }
  .degree-head { padding: 18px; }
  .degree-thesis { padding: 14px 18px 18px; }
  summary { padding: 12px 18px; }
  .detail-list { padding: 4px 18px 18px; }
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: 0; }
  .player { padding: 22px; }
  .track-title { font-size: 1.35rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
