/* ============================================================
   Kasun Dewage — kasundewage.com
   Palette: void black + graded silver. No chromatic accent;
   the only hue is a cold blue-steel glint borrowed from the
   point-cloud reference images.
   ============================================================ */

:root {
  --void:      #050507;
  --carbon:    #0A0B0E;
  --panel:     #101216;
  --panel-2:   #15181D;

  --steel:     #6B717C;
  --silver:    #B9BFC9;
  --platinum:  #EDF0F5;
  --glint:     #9DB2CC;

  --edge:      rgba(200, 208, 220, 0.10);
  --edge-soft: rgba(200, 208, 220, 0.055);
  --edge-hot:  rgba(200, 208, 220, 0.26);

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  background: var(--void);
  color: var(--silver);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: rgba(157, 178, 204, 0.28); color: var(--platinum); }

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

/* ---------- ambient field ---------- */
#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.page { position: relative; z-index: 1; }

/* ---------- shell + rhythm ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(72px, 11vw, 132px); position: relative; }
.section--tight { padding-block: clamp(52px, 7vw, 84px); }

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge), transparent);
  border: 0;
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--edge), transparent);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 300;
  color: var(--platinum);
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
}

h2 { font-size: clamp(30px, 4.4vw, 50px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.28; }

.lede {
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.66;
  color: var(--silver);
  max-width: 62ch;
}

.prose p + p { margin-top: 1.05em; }
.prose { max-width: 68ch; }

.dim { color: var(--steel); }
.bright { color: var(--platinum); }

em, .it { font-style: italic; }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: rgba(5, 5, 7, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.is-stuck {
  background: rgba(5, 5, 7, 0.88);
  border-bottom-color: var(--edge);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 19px;
  color: var(--platinum);
  letter-spacing: 0.01em;
}
.mark__glyph {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--steel);
  transition: color 0.3s var(--ease);
}
.mark:hover .mark__glyph { color: var(--glint); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
  list-style: none;
  padding: 0;
}
.nav__links a {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  text-decoration: none;
  position: relative;
  padding-block: 6px;
  transition: color 0.28s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--glint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.34s var(--ease);
}
.nav__links a:hover { color: var(--platinum); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--platinum); }

.nav__toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 120px 80px;
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  width: 100%;
}

.hero__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 24px;
}
.hero__kicker span { color: var(--glint); }

.hero h1 {
  font-size: clamp(46px, 8.2vw, 104px);
  font-weight: 200;
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero h1 .given { display: block; color: var(--steel); }
.hero h1 .family {
  display: block;
  background: linear-gradient(96deg, #FFFFFF 6%, #C6CCD6 38%, #7E8794 62%, #E9EDF3 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__thesis {
  font-size: clamp(16.5px, 1.6vw, 19.5px);
  line-height: 1.62;
  max-width: 50ch;
  margin-bottom: 34px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 38px;
}

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--silver);
  padding: 6px 12px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.018);
  white-space: nowrap;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- buttons ---------- */
.btn {
  --btn-fg: var(--platinum);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--btn-fg);
  text-decoration: none;
  padding: 13px 22px;
  border: 1px solid var(--edge);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(157,178,204,0.16), rgba(157,178,204,0.03));
  transform: translateY(101%);
  transition: transform 0.42s var(--ease);
}
.btn:hover { border-color: var(--edge-hot); }
.btn:hover::before { transform: translateY(0); }
.btn > * { position: relative; }
.btn--solid {
  background: var(--platinum);
  color: var(--void);
  border-color: var(--platinum);
}
.btn--solid::before { background: linear-gradient(120deg, #fff, #C9D2DE); }
.btn--solid:hover { color: var(--void); }

.btn__arrow { transition: transform 0.35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }


.chip--disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ---------- point-cloud stages ---------- */
/* Shared shell: a canvas mesh assembles from scattered points, then the full
   colour image resolves underneath it. Used by the hero portrait, the hero
   inset and the research page backdrop. */
.cloud { position: relative; isolation: isolate; }

.cloud__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.045);
  filter: saturate(0.55) contrast(1.12) brightness(0.86);
  transition: opacity 1.1s var(--ease), transform 1.6s var(--ease), filter 1.4s var(--ease);
}
.cloud.is-resolved .cloud__img {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1.06) contrast(1.05) brightness(0.94);
}

.cloud__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.9s var(--ease);
}
.cloud.is-resolved .cloud__canvas { opacity: 0.28; }

/* ---------- hero portrait stage ---------- */
.stage {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 430px;
  margin-inline: auto;
  isolation: isolate;
}

.stage__frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--edge);
  border-radius: 2px;
  overflow: hidden;
  background: var(--carbon);
}

.stage .cloud__img { filter: grayscale(1) contrast(1.14) brightness(0.82); }
.stage .cloud.is-resolved .cloud__img {
  filter: grayscale(0) saturate(0.9) contrast(1.09) brightness(0.86);
}

.stage__veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(115% 88% at 66% 36%, transparent 20%, rgba(5,5,7,0.78) 82%),
    linear-gradient(180deg, rgba(5,5,7,0.28), transparent 34%, rgba(5,5,7,0.88) 100%);
}

.stage__corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--edge-hot);
  pointer-events: none;
  z-index: 4;
}
.stage__corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.stage__corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.stage__caption {
  position: absolute;
  left: 0;
  bottom: -34px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stage__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--glint);
  box-shadow: 0 0 8px var(--glint);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---------- hero inset: the tensor / mind plate ---------- */
.inset {
  position: absolute;
  top: -58px;
  right: -46px;
  z-index: 5;
  width: 62%;
  max-width: 268px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--edge-hot);
  border-radius: 2px;
  overflow: hidden;
  background: var(--void);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.92);
}
.inset .cloud__img { filter: saturate(0.5) contrast(1.1) brightness(0.8); }
.inset.is-resolved .cloud__img {
  filter: saturate(1.12) contrast(1.04) brightness(0.98);
}
.inset__label {
  position: absolute;
  z-index: 4;
  left: 8px;
  bottom: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}
.inset__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(5,5,7,0.78) 100%);
}


/* ---------- tensor image moved below the homepage work description ---------- */
.work-visual {
  width: 100%;
  aspect-ratio: 1672 / 941;
  margin-top: clamp(36px, 5vw, 60px);
  border: 1px solid var(--edge-hot);
  border-radius: 2px;
  overflow: hidden;
  background: var(--void);
}
.work-visual .cloud__img {
  object-fit: contain;
  filter: saturate(0.55) contrast(1.08) brightness(0.82);
}
.work-visual.is-resolved .cloud__img {
  filter: saturate(1.08) contrast(1.03) brightness(0.98);
}
.work-visual.is-resolved .cloud__canvas { opacity: 0.18; }
.work-visual__scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 74%, rgba(5,5,7,0.72) 100%);
}
.work-visual__label {
  position: absolute;
  z-index: 4;
  left: clamp(12px, 2vw, 22px);
  bottom: clamp(10px, 1.6vw, 18px);
  font-family: var(--mono);
  font-size: clamp(8.5px, 1.1vw, 11px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* ---------- metric band ---------- */
.band {
  border-block: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(255,255,255,0.014), transparent);
}
.band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.metric {
  padding: clamp(26px, 3.4vw, 40px) clamp(14px, 2vw, 28px);
  border-left: 1px solid var(--edge-soft);
}
.metric:first-child { border-left: 0; padding-left: 0; }
.metric__value {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 200;
  color: var(--platinum);
  line-height: 1;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.metric__unit { font-family: var(--mono); font-size: 14px; color: var(--glint); letter-spacing: 0; }
.metric__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 12px;
  line-height: 1.5;
}

/* ---------- headline result ---------- */
.result {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.ratio {
  border: 1px solid var(--edge);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent),
    var(--carbon);
  padding: clamp(24px, 3vw, 36px);
}
.ratio__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--edge-soft);
  margin-bottom: 26px;
  gap: 16px;
}

.bar { margin-bottom: 24px; }
.bar:last-child { margin-bottom: 0; }
.bar__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 9px;
}
.bar__name { font-size: 14px; color: var(--silver); }
.bar__val {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--platinum);
  font-variant-numeric: tabular-nums;
}
.bar__track {
  height: 6px;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 1.25s var(--ease);
}
.bar__fill--mine {
  background: linear-gradient(90deg, #E8EDF4, var(--glint));
  min-width: 3px;
  box-shadow: 0 0 10px rgba(157, 178, 204, 0.75);
}
.bar__fill--other { background: rgba(255, 255, 255, 0.17); }
.bar__note { font-family: var(--mono); font-size: 10.5px; color: var(--steel); margin-top: 7px; }

/* ---------- cards / publications ---------- */
.stack { display: flex; flex-direction: column; }

.pub {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px);
  padding-block: clamp(26px, 3.2vw, 38px);
  border-top: 1px solid var(--edge-soft);
  position: relative;
  transition: background 0.4s var(--ease);
}
.pub:last-child { border-bottom: 1px solid var(--edge-soft); }
.pub::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -0.5);
  right: calc(var(--gutter) * -0.5);
  top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(157,178,204,0.045), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.pub:hover::before { opacity: 1; }

.pub__venue {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glint);
  line-height: 1.7;
}
.pub__year { color: var(--steel); display: block; }
.pub__status {
  display: inline-block;
  margin-top: 10px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--steel);
}
.pub__status--main { color: var(--platinum); border-color: var(--edge-hot); }
.pub__status--expected { color: var(--glint); border-color: rgba(157, 178, 204, 0.34); background: rgba(157, 178, 204, 0.045); }

.pub__title {
  font-family: var(--display);
  font-size: clamp(19px, 2.1vw, 25px);
  font-weight: 300;
  color: var(--platinum);
  line-height: 1.26;
  margin-bottom: 10px;
  letter-spacing: -0.012em;
}
.pub__authors { font-size: 14px; color: var(--steel); margin-bottom: 14px; }
.pub__authors strong { color: var(--silver); font-weight: 500; }
.pub__abstract { font-size: 14.6px; line-height: 1.66; color: var(--silver); max-width: 74ch; }

.pub__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  padding: 7px 13px;
  border: 1px solid var(--edge);
  border-radius: 2px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.chip:hover {
  border-color: var(--edge-hot);
  color: var(--platinum);
  background: rgba(255, 255, 255, 0.035);
}

/* filter chips */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.filter {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  padding: 8px 15px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}
.filter:hover { color: var(--silver); border-color: var(--edge-hot); }
.filter.is-on {
  color: var(--void);
  background: var(--platinum);
  border-color: var(--platinum);
}

.pub.is-hidden { display: none; }

/* ---------- generic card grid ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(16px, 2vw, 24px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(16px, 2vw, 24px); }

.card {
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: clamp(22px, 2.6vw, 32px);
  background: linear-gradient(180deg, rgba(255,255,255,0.016), transparent);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(157,178,204,0.075), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.card:hover { border-color: var(--edge-hot); }
.card:hover::after { opacity: 1; }

.card__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glint);
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 14.6px; line-height: 1.66; }

.card__list { list-style: none; padding: 0; margin-top: 14px; }
.card__list li {
  font-size: 14.4px;
  padding-left: 18px;
  position: relative;
  margin-bottom: 9px;
  line-height: 1.6;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 5px; height: 1px;
  background: var(--glint);
}

/* ---------- teaching charts ---------- */
.eval {
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--carbon);
}
.eval__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}
.eval__course {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--glint);
}
.eval__score {
  font-family: var(--display);
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 200;
  color: var(--platinum);
  line-height: 1;
  letter-spacing: -0.03em;
}
.eval__score small { font-family: var(--mono); font-size: 13px; color: var(--steel); letter-spacing: 0; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  padding-block: 16px 22px;
  border-bottom: 1px solid var(--edge-soft);
  margin-bottom: 24px;
}
.legend span { display: flex; align-items: center; gap: 8px; }
.swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.swatch--mine { background: var(--platinum); box-shadow: 0 0 9px rgba(157, 178, 204, 0.6); }
.swatch--dept { background: #2C3138; border: 1px solid rgba(255, 255, 255, 0.24); }

/* Dot plot. The whole story lives between 3.8 and 5.0, so the axis is
   zoomed to that window and labelled — a 0–5 axis would flatten every
   difference into the same bar. */
.q { margin-bottom: 17px; }
.q:last-child { margin-bottom: 0; }
.q__text {
  font-size: 14.2px;
  color: var(--silver);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  line-height: 1.4;
}
.q__mine {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--platinum);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plot { position: relative; height: 20px; }
.plot::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-50%);
}
.plot__gap {
  position: absolute;
  top: 50%;
  left: var(--a);
  width: calc(var(--b) - var(--a));
  height: 1px;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), var(--glint));
  transition: transform 0.9s var(--ease);
}
.plot__dot {
  position: absolute;
  top: 50%;
  left: var(--p);
  width: 9px; height: 9px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}
.plot__dot--dept {
  background: #2C3138;
  border: 1px solid rgba(255, 255, 255, 0.24);
  transition-delay: 0.05s;
}
.plot__dot--mine {
  background: var(--platinum);
  box-shadow: 0 0 11px rgba(157, 178, 204, 0.6);
  transition-delay: 0.5s;
}
.is-in .plot__gap { transform: translateY(-50%) scaleX(1); }
.is-in .plot__dot { transform: translate(-50%, -50%) scale(1); opacity: 1; }

.axis {
  position: relative;
  height: 26px;
  margin-top: 14px;
  border-top: 1px solid var(--edge-soft);
  padding-top: 9px;
}
.axis span {
  position: absolute;
  left: var(--p);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--steel);
  font-variant-numeric: tabular-nums;
}
.axis span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 1px; height: 5px;
  background: var(--edge);
}
.axis__note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 26px;
}

/* quotes */
.quote {
  border-left: 1px solid var(--edge);
  padding: 4px 0 4px 22px;
  break-inside: avoid;
  margin-bottom: 26px;
  transition: border-color 0.4s var(--ease);
}
.quote:hover { border-left-color: var(--glint); }
.quote p {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--platinum);
}
.quote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  font-style: normal;
}
.quotes { columns: 2; column-gap: clamp(24px, 4vw, 48px); }

/* ---------- education rows ---------- */
.cv-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding-block: 26px;
  border-top: 1px solid var(--edge-soft);
}
.cv-row:last-child { border-bottom: 1px solid var(--edge-soft); }
.cv-row__when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
  line-height: 1.8;
}
.cv-row__what h3 { font-size: clamp(18px, 2vw, 22px); margin-bottom: 4px; }
.cv-row__where { font-size: 14px; color: var(--glint); margin-bottom: 10px; font-family: var(--mono); letter-spacing: 0.04em; }

.text-link {
  color: var(--platinum);
  text-decoration-color: var(--edge-hot);
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--glint); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--edge-soft);
  border: 1px solid var(--edge-soft);
}
.contact-cell {
  background: var(--void);
  padding: clamp(22px, 2.6vw, 30px);
  text-decoration: none;
  display: block;
  transition: background 0.35s var(--ease);
}
.contact-cell:hover { background: var(--panel); }
.contact-cell__k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}
.contact-cell__v {
  font-size: 15px;
  color: var(--platinum);
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-cell:hover .btn__arrow { transform: translateX(4px); }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--edge);
  padding-block: 40px 56px;
  margin-top: 40px;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
}
.foot a { text-decoration: none; transition: color 0.3s var(--ease); }
.foot a:hover { color: var(--platinum); }

/* ---------- page header (inner pages) ---------- */
.phead {
  padding-block: clamp(120px, 16vw, 190px) clamp(40px, 6vw, 70px);
  position: relative;
}
.phead h1 {
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 200;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 24px;
}
.phead__art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 92%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 92%);
}
.phead__art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.3;
  filter: grayscale(1) contrast(1.1);
}
.phead__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(92deg, var(--void) 22%, rgba(5,5,7,0.55) 62%, rgba(5,5,7,0.3));
}

/* the research header runs the point cloud full-bleed behind the type */
.phead--cloud { padding-block: clamp(150px, 20vw, 250px) clamp(56px, 8vw, 96px); }
.phead__cloud {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.95), rgba(0,0,0,0.8) 62%, transparent 98%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.95), rgba(0,0,0,0.8) 62%, transparent 98%);
}
.phead__cloud .cloud {
  position: absolute;
  inset: 0;
}
.phead__cloud .cloud__img {
  object-position: right center;
  opacity: 0;
  filter: saturate(0.4) contrast(1.15) brightness(0.7);
}
.phead__cloud .cloud.is-resolved .cloud__img {
  opacity: 0.46;
  filter: saturate(1.05) contrast(1.04) brightness(0.86);
}
.phead__cloud .cloud.is-resolved .cloud__canvas { opacity: 0.4; }
.phead__cloud::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(92deg, var(--void) 12%, rgba(5,5,7,0.66) 46%, rgba(5,5,7,0.2) 86%),
    linear-gradient(180deg, rgba(5,5,7,0.55), transparent 42%);
}
.phead--cloud .shell { position: relative; z-index: 1; }


/* ---------- research point-cloud image: full image below header copy ---------- */
.research-visual-wrap {
  padding-bottom: clamp(44px, 7vw, 82px);
}
.research-visual {
  width: 100%;
  aspect-ratio: 1500 / 844;
  border: 1px solid var(--edge-hot);
  border-radius: 2px;
  overflow: hidden;
  background: var(--void);
}
.research-visual .cloud__img {
  object-fit: contain;
  filter: saturate(0.52) contrast(1.08) brightness(0.8);
}
.research-visual.is-resolved .cloud__img {
  opacity: 1;
  filter: saturate(1.08) contrast(1.03) brightness(0.98);
}
.research-visual.is-resolved .cloud__canvas { opacity: 0.15; }

/* ---------- reveal ---------- *//* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }
.reveal[data-delay="4"] { transition-delay: 0.36s; }

/* hero load sequence */
.lift { opacity: 0; transform: translateY(26px); animation: lift 1.1s var(--ease) forwards; }
.lift[data-lift="1"] { animation-delay: 0.15s; }
.lift[data-lift="2"] { animation-delay: 0.28s; }
.lift[data-lift="3"] { animation-delay: 0.41s; }
.lift[data-lift="4"] { animation-delay: 0.54s; }
.lift[data-lift="5"] { animation-delay: 0.67s; }
@keyframes lift { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 62px; }
  .stage { max-width: 320px; }
  .inset { top: -26px; right: -22px; max-width: 210px; }
  .result { grid-template-columns: 1fr; }
  .band__grid { grid-template-columns: repeat(2, 1fr); }
  .metric { border-left: 1px solid var(--edge-soft); padding-left: clamp(14px, 2vw, 28px); }
  .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--edge-soft); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .quotes { columns: 1; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 76px; }

  /* the constellation reads as large triangles on a narrow viewport —
     hold it back so it stays atmosphere rather than pattern */
  #field { opacity: 0.45; }
  .nav__inner { height: 60px; }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--silver);
    padding: 8px 4px;
  }
  .nav__toggle-bars { display: grid; gap: 4px; width: 18px; }
  .nav__toggle-bars i { height: 1px; background: currentColor; display: block; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
  .nav[data-open="true"] .nav__toggle-bars i:first-child { transform: translateY(5px) rotate(45deg); }
  .nav[data-open="true"] .nav__toggle-bars i:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav__toggle-bars i:last-child { transform: translateY(-5px) rotate(-45deg); }

  .nav__links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(5, 5, 7, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--edge);
    padding: 8px var(--gutter) 22px;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.45s var(--ease);
  }
  .nav[data-open="true"] .nav__links { clip-path: inset(0 0 0 0); }
  .nav__links li { width: 100%; border-top: 1px solid var(--edge-soft); }
  .nav__links a { display: block; padding: 16px 0; font-size: 12px; }
  .nav__links a::after { display: none; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: 12px; }
  .pub__venue { display: flex; align-items: center; gap: 10px; }
  .pub__year::before { content: "·"; margin-right: 10px; }
  .pub__year { display: inline; }
  .pub__status { margin-top: 0; }
  .cv-row { grid-template-columns: 1fr; gap: 8px; }
  .band__grid { grid-template-columns: 1fr; }
  .metric { border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--edge-soft); }
  .metric:first-child { border-top: 0; }
  .hero h1 { font-size: clamp(42px, 13vw, 62px); }
}

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .lift { opacity: 1; transform: none; }
  #field { display: none; }
}

@media print {
  #field, .nav, .cloud__canvas { display: none; }
  body { background: #fff; color: #111; }
  h1, h2, h3 { color: #000; }
}


/* ---------- teaching: response distribution ---------- */
.dist { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--edge-soft); }
.dist__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 16px;
}
.dist__row { margin-bottom: 14px; }
.dist__row:last-of-type { margin-bottom: 0; }
.dist__name {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--platinum);
  margin-bottom: 7px;
}
.dist__name b { font-family: var(--mono); font-weight: 500; color: var(--glint); }
.dist__bar {
  display: flex;
  height: 9px;
  border-radius: 1px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.dist__seg { height: 100%; transition: width 1.1s var(--ease); }
.dist__seg--5 { background: var(--glint); }
.dist__seg--4 { background: rgba(122,162,247,0.55); }
.dist__seg--3 { background: rgba(176,192,212,0.3); }
.dist__seg--2 { background: rgba(176,192,212,0.15); }
.dist__key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.dist__key span { display: inline-flex; align-items: center; gap: 6px; }
.dist__key i { width: 9px; height: 9px; border-radius: 1px; display: inline-block; }

/* ---------- teaching: comments split by course ---------- */
.comments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.comment-col__head {
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--edge);
}
.comment-col__course {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glint);
  display: block;
  margin-bottom: 8px;
}
.comment-col__title { font-size: 20px; font-weight: 400; letter-spacing: -0.01em; }
.comment-col__meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 8px;
}
.comments .quote { margin-bottom: 24px; }
.quote--ask { border-left-color: rgba(176,192,212,0.22); }
.quote--ask p { font-style: normal; font-family: var(--sans); font-size: 14.5px; color: var(--steel); }
.note {
  border: 1px dashed var(--edge);
  border-radius: 2px;
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--steel);
}
.note b { color: var(--platinum); font-weight: 500; }

@media (max-width: 860px) {
  .comments { grid-template-columns: 1fr; }
}

/* highest-rated items panel (stands in for a comment column) */
.comment-col--sticky { position: sticky; top: 96px; }
.topitems {
  margin-top: 26px;
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 22px 22px 20px;
}
.topitems__head {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 18px;
}
.topitem { padding-block: 12px; border-top: 1px solid var(--edge-soft); }
.topitem:first-of-type { border-top: 0; padding-top: 0; }
.topitem__q {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-size: 14px;
  color: var(--platinum);
}
.topitem__q b {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--glint);
}
.topitem__note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 6px;
}
.topitem__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--edge-soft);
  font-size: 13px;
  line-height: 1.6;
  color: var(--steel);
}
@media (max-width: 860px) { .comment-col--sticky { position: static; } }
