:root {
  --ink: #111827;
  --muted: #667085;
  --paper: #f7f6f2;
  --white: #ffffff;
  --night: #071217;
  --night-soft: #0c1c22;
  --accent: #38d6b0;
  --accent-dark: #159c80;
  --line: rgba(17, 24, 39, 0.12);
  --radius: 22px;
  --shadow: 0 22px 60px rgba(10, 22, 30, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 76px;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(7, 18, 23, .86);
  backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, .08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: var(--night);
  border-radius: 12px;
  font-size: .85rem;
  letter-spacing: -.02em;
}

.brand-name {
  font-size: .95rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu a,
.nav-contact {
  color: rgba(255, 255, 255, .74);
  background: none;
  border: 0;
  padding: 10px 0;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 650;
  transition: color .2s ease;
}

.nav-menu a:hover,
.nav-contact:hover {
  color: var(--accent);
}

.nav-contact {
  border-bottom: 1px solid var(--accent);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px;
  background: white;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 138px 0 88px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(30deg, rgba(255, 255, 255, .02) 1px, transparent 1px),
    var(--night);
  background-size: 54px 54px, 54px 54px, auto;
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -290px;
  bottom: -300px;
  border: 1px solid rgba(56, 214, 176, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(56, 214, 176, .025), 0 0 0 160px rgba(56, 214, 176, .02);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: .2;
  pointer-events: none;
}

.hero-glow-one {
  width: 360px;
  height: 360px;
  background: var(--accent);
  right: 18%;
  top: 15%;
}

.hero-glow-two {
  width: 260px;
  height: 260px;
  background: #3b82f6;
  left: 5%;
  bottom: 5%;
  opacity: .1;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 800;
  font-size: .74rem;
}

.hero .eyebrow {
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(4rem, 8vw, 7.4rem);
  line-height: .86;
  letter-spacing: -.075em;
}

.hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .74);
}

.hero-title {
  margin: 30px 0 18px;
  color: rgba(255, 255, 255, .84);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  font-weight: 700;
}

.hero-title span {
  color: var(--accent);
  margin: 0 7px;
}

.hero-summary {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, .64);
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: var(--night);
}

.button-primary:hover {
  background: #64e8c8;
}

.button-secondary {
  color: white;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .04);
}

.button-secondary:hover {
  border-color: var(--accent);
}

.button-light {
  background: white;
  color: var(--night);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 30px;
}

.profile-links a {
  color: rgba(255, 255, 255, .52);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  transition: color .2s;
}

.profile-links a:hover {
  color: var(--accent);
}

.hero-portrait {
  position: relative;
  width: min(100%, 430px);
  justify-self: end;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 28px 28px 120px 28px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: var(--night-soft);
  box-shadow: 0 36px 90px rgba(0, 0, 0, .45);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 18, 23, .34), transparent 46%);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.portrait-card {
  position: absolute;
  left: -42px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 280px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.portrait-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}

.status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-dark);
  box-shadow: 0 0 0 6px rgba(21, 156, 128, .12);
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .3);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .58rem;
}

.scroll-hint div {
  width: 1px;
  height: 30px;
  background: linear-gradient(var(--accent), transparent);
}

.section {
  padding: 110px 0;
}

.intro-strip {
  background: var(--paper);
}

.intro-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 100px;
  align-items: start;
}

.section-heading {
  max-width: 710px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.055em;
}

.section-heading.light h2 {
  color: var(--white);
}

.intro-copy {
  color: var(--muted);
  font-size: 1.06rem;
}

.intro-copy p:first-child {
  margin-top: 0;
}

.intro-copy strong {
  color: var(--ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 78px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-grid article {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
}

.stats-grid article:last-child {
  border-right: 0;
}

.stats-grid strong {
  display: block;
  font-size: 2.5rem;
  letter-spacing: -.05em;
  line-height: 1;
}

.stats-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: .8rem;
}

.section-dark {
  background: var(--night);
  color: var(--white);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 55px;
}

.focus-card {
  min-height: 245px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  transition: border-color .25s ease, transform .25s ease;
}

.focus-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 214, 176, .46);
}

.focus-number {
  color: var(--accent);
  font-weight: 900;
  font-size: .72rem;
  letter-spacing: .12em;
}

.focus-card h3 {
  margin: 58px 0 10px;
  font-size: 1.5rem;
}

.focus-card p {
  margin: 0;
  color: rgba(255, 255, 255, .56);
  max-width: 500px;
}

.timeline {
  margin-top: 60px;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 35px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--accent-dark);
  font-weight: 850;
  font-size: .86rem;
}

.role-label {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.timeline-content h3 {
  margin: 5px 0 8px;
  font-size: 1.45rem;
}

.timeline-content p:last-child {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}

.publications-section {
  background: white;
}

.publication-list {
  margin-top: 58px;
  border-top: 1px solid var(--line);
}

.publication {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.pub-year {
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 900;
}

.publication h3 {
  margin: 0 0 8px;
  max-width: 920px;
  font-size: 1.12rem;
  line-height: 1.38;
}

.publication p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.publication a {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent-dark);
  font-size: .82rem;
  font-weight: 850;
  border-bottom: 1px solid currentColor;
}

.status-pill {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(21, 156, 128, .1);
  color: var(--accent-dark);
  font-size: .7rem;
  font-weight: 850;
}

.section-tint {
  background: #ecefeb;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 58px;
}

.project-card {
  min-height: 285px;
  padding: 30px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(17, 24, 39, .05);
  border: 1px solid rgba(17, 24, 39, .06);
  display: flex;
  flex-direction: column;
}

.project-card.featured {
  background: var(--night);
  color: white;
}

.project-meta {
  color: var(--accent-dark);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.project-card.featured .project-meta {
  color: var(--accent);
}

.project-card h3 {
  margin: auto 0 10px;
  padding-top: 46px;
  font-size: 1.5rem;
  letter-spacing: -.03em;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.project-card.featured p {
  color: rgba(255, 255, 255, .62);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f3f2;
  color: #4b5563;
  font-size: .66rem;
  font-weight: 800;
}

.project-card.featured .tag-row span {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .72);
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 55px;
}

.award-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.award-card>span {
  color: var(--accent-dark);
  font-weight: 900;
  font-size: .75rem;
}

.award-card h3 {
  margin: 0 0 5px;
  font-size: .98rem;
}

.award-card p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.skills-section {
  background: white;
}

.skills-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 90px;
  align-items: start;
}

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

.skill-groups div {
  padding: 24px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.skill-groups h3 {
  margin: 0 0 8px;
  font-size: .95rem;
}

.skill-groups p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}

.education-section {
  background: var(--night);
  color: white;
}

.education-card {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}

.education-date {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 900;
  font-size: .75rem;
  letter-spacing: .1em;
}

.education-card h3 {
  margin: 4px 0 8px;
  font-size: 1.5rem;
}

.education-card p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, .58);
}

.education-rank {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 40px;
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.education-rank strong {
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
}

.education-rank span {
  max-width: 180px;
  color: rgba(255, 255, 255, .58);
  font-size: .78rem;
}

.contact-cta {
  padding: 90px 0;
  background: var(--accent);
  color: var(--night);
}

.contact-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.contact-cta .section-kicker {
  color: rgba(7, 18, 23, .65);
}

.contact-cta h2 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.footer {
  padding: 26px 0;
  background: #050d11;
  color: rgba(255, 255, 255, .45);
  font-size: .76rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-inner div {
  display: flex;
  gap: 20px;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s, visibility .2s;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(7px);
}

.modal-panel {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 30px), 540px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 38px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .4);
  transform: translateY(16px) scale(.98);
  transition: transform .22s;
}

.modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 15px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f0f2f1;
  cursor: pointer;
  font-size: 1.5rem;
}

.modal-panel h2 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: -.05em;
}

.modal-intro {
  color: var(--muted);
}

.contact-item {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-item span {
  display: block;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.contact-item strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.contact-item:hover strong {
  color: var(--accent-dark);
}

.contact-location {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr .72fr;
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 9vw, 6rem);
  }

  .intro-grid,
  .skills-grid {
    gap: 50px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid article:nth-child(2) {
    border-right: 0;
  }

  .stats-grid article:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .site-header {
    height: 66px;
    background: rgba(7, 18, 23, .82);
    backdrop-filter: blur(14px);
  }

  .brand-name {
    display: none;
  }

  .nav-toggle {
    display: block;
    cursor: pointer;
  }

  .nav-menu {
    position: absolute;
    top: 66px;
    left: 20px;
    right: 20px;
    display: none;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border-radius: 16px;
    background: #0c1c22;
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a,
  .nav-contact {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }

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

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 2;
  }

  .hero-portrait {
    order: 1;
    justify-self: start;
    width: min(80vw, 360px);
  }

  .portrait-card {
    left: auto;
    right: -35px;
  }

  .scroll-hint {
    display: none;
  }

  .intro-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 150px 1fr;
  }

  .education-card {
    grid-template-columns: 1fr;
  }

  .education-rank {
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .contact-cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 28px), var(--max));
  }

  .section {
    padding: 82px 0;
  }

  .hero {
    padding-bottom: 70px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 19vw, 5rem);
  }

  .hero-title span {
    display: none;
  }

  .hero-title {
    max-width: 330px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .profile-links {
    gap: 15px;
  }

  .portrait-card {
    right: -8px;
    bottom: 16px;
    max-width: 240px;
  }

  .stats-grid,
  .focus-grid,
  .project-grid,
  .awards-grid,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .stats-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats-grid article:last-child {
    border-bottom: 0;
  }

  .timeline-item,
  .publication {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-card {
    min-height: auto;
  }

  .project-card h3 {
    padding-top: 36px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-panel {
    padding: 32px 22px 25px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }

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

/* Clickable live-demo project card */
.project-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.project-link:hover {
  transform: translateY(-6px);
  border-color: var(--accent, #7c6cff);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.project-link:focus-visible {
  outline: 3px solid var(--accent, #7c6cff);
  outline-offset: 4px;
}

.project-live-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent, #7c6cff);
}

.project-live-link span:last-child {
  transition: transform 0.2s ease;
}

.project-link:hover .project-live-link span:last-child {
  transform: translate(3px, -3px);
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

/* ==================================================
   WEBSITE UPDATES
   Publications, project cards and mentor awards
   ================================================== */


/* --------------------------------------------------
   Keep the eight-storey project white
   -------------------------------------------------- */

.project-card.project-standard {
  background: #ffffff !important;
  color: #172033 !important;
  border: 1px solid rgba(23, 32, 51, 0.10);
}

.project-card.project-standard h3,
.project-card.project-standard p,
.project-card.project-standard .project-meta {
  color: inherit;
}


/* --------------------------------------------------
   Featured P-M Interaction Curve live tool
   -------------------------------------------------- */

.project-card.project-demo {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  background:
    radial-gradient(circle at top right,
      rgba(72, 125, 255, 0.24),
      transparent 38%),
    linear-gradient(145deg,
      #ffffff 0%,
      #f2f6ff 48%,
      #e6edff 100%);

  color: #111b33;

  border: 2px solid rgba(51, 102, 255, 0.50);
  border-radius: 18px;

  box-shadow:
    0 18px 45px rgba(34, 73, 160, 0.16);

  text-decoration: none;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}


/* Decorative background shape */

.project-card.project-demo::before {
  content: "";
  position: absolute;
  top: -85px;
  right: -75px;

  width: 190px;
  height: 190px;

  border-radius: 50%;
  background: rgba(63, 105, 255, 0.10);

  pointer-events: none;
}


/* Hover effect */

.project-card.project-demo:hover {
  transform: translateY(-8px);

  border-color: rgba(45, 88, 225, 0.90);

  box-shadow:
    0 25px 60px rgba(34, 73, 160, 0.25);
}


/* Top row of live demo */

.demo-topline {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 18px;
}


/* Featured badge */

.demo-badge {
  display: inline-flex;
  align-items: center;

  padding: 7px 12px;

  border-radius: 999px;

  background: #234dcc;
  color: #ffffff;

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* Top arrow */

.demo-arrow {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border-radius: 50%;

  background: #ffffff;
  color: #234dcc;

  font-size: 1.25rem;
  font-weight: 700;

  box-shadow:
    0 8px 20px rgba(35, 77, 204, 0.18);

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}


.project-card.project-demo:hover .demo-arrow {
  transform: translate(3px, -3px);
  background: #234dcc;
  color: #ffffff;
}


/* Project heading */

.project-card.project-demo h3 {
  position: relative;
  z-index: 1;

  margin-top: 8px;

  color: #111b33;

  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.15;
}


/* Project paragraph */

.project-card.project-demo p {
  position: relative;
  z-index: 1;

  color: #45516b;
}


/* Highlighted feature list */

.demo-highlight {
  position: relative;
  z-index: 1;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin: 18px 0;
}


.demo-highlight span {
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;

  border: 1px solid rgba(35, 77, 204, 0.18);
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.72);
  color: #263d7c;

  font-size: 0.78rem;
  font-weight: 600;
}


/* Live demo call-to-action */

.project-card.project-demo .project-live-link {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  margin-top: auto;
  padding: 14px 18px;

  border-radius: 12px;

  background: #234dcc;
  color: #ffffff;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}


.project-card.project-demo:hover .project-live-link {
  background: #17399e;
  transform: translateY(-2px);
}


/* Live green dot */

.project-card.project-demo .live-dot {
  width: 9px;
  height: 9px;

  border-radius: 50%;
  background: #55e691;

  box-shadow:
    0 0 0 5px rgba(85, 230, 145, 0.18);

  animation: live-pulse 1.8s infinite;
}


@keyframes live-pulse {

  0% {
    box-shadow:
      0 0 0 0 rgba(85, 230, 145, 0.45);
  }

  70% {
    box-shadow:
      0 0 0 9px rgba(85, 230, 145, 0);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(85, 230, 145, 0);
  }

}


/* --------------------------------------------------
   Mentor award cards
   -------------------------------------------------- */

.award-card.mentor-award {
  position: relative;

  border-left: 4px solid #315ed8;

  background:
    linear-gradient(135deg,
      #ffffff 0%,
      #f4f7ff 100%);
}


.award-card.mentor-award:hover {
  border-left-color: #17399e;
}


.award-role {
  margin: 0 0 6px;

  color: #315ed8 !important;

  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* --------------------------------------------------
   Publication links
   -------------------------------------------------- */

.publication a {
  display: inline-flex;
  align-items: center;

  margin-top: 8px;

  font-weight: 700;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}


.publication a:hover {
  transform: translateX(4px);
  opacity: 0.82;
}


/* --------------------------------------------------
   Mobile adjustments
   -------------------------------------------------- */

@media (max-width: 700px) {

  .demo-highlight {
    flex-direction: column;
  }

  .demo-highlight span {
    width: fit-content;
  }

  .project-card.project-demo h3 {
    font-size: 1.45rem;
  }

}

/* ==================================================
   UNIQUE LIVE DEMO BUTTON
   P-M Interaction Curve Generator
   ================================================== */

.project-card.project-demo .demo-launch-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;

  width: 100%;
  margin-top: auto;
  padding: 14px 16px;

  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;

  background:
    linear-gradient(110deg,
      #17399e 0%,
      #285ee8 45%,
      #6548e8 100%);

  color: #ffffff;

  box-shadow:
    0 12px 28px rgba(35, 77, 204, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-position 0.4s ease;
}


/* Play icon */

.demo-launch-icon {
  position: relative;
  z-index: 2;

  display: grid;
  place-items: center;

  width: 44px;
  height: 44px;

  flex-shrink: 0;

  border-radius: 50%;

  background: #ffffff;
  color: #285ee8;

  font-size: 0.95rem;
  line-height: 1;

  box-shadow:
    0 6px 18px rgba(10, 25, 75, 0.25);

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}


/* Text area */

.demo-launch-content {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;

  min-width: 0;
}


.demo-launch-content strong {
  color: #ffffff;

  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}


.demo-launch-content small {
  color: rgba(255, 255, 255, 0.78);

  font-size: 0.73rem;
  font-weight: 500;
}


/* External arrow */

.demo-launch-arrow {
  position: relative;
  z-index: 2;

  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;

  font-size: 1.15rem;
  font-weight: 700;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}


/* Animated shine */

.demo-launch-shine {
  position: absolute;
  z-index: 1;
  top: -50%;
  left: -45%;

  width: 28%;
  height: 200%;

  transform: rotate(22deg);

  background:
    linear-gradient(to right,
      transparent,
      rgba(255, 255, 255, 0.34),
      transparent);

  animation: demo-button-shine 3.2s ease-in-out infinite;

  pointer-events: none;
}


/* Soft attention pulse */

.project-card.project-demo .demo-launch-button::after {
  content: "";

  position: absolute;
  inset: 0;

  z-index: -1;

  border-radius: inherit;

  box-shadow:
    0 0 0 0 rgba(74, 111, 255, 0.42);

  animation: demo-button-pulse 2.2s ease-out infinite;
}


/* Hover effects */

.project-card.project-demo:hover .demo-launch-button {
  transform: translateY(-3px) scale(1.015);

  box-shadow:
    0 18px 38px rgba(35, 77, 204, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}


.project-card.project-demo:hover .demo-launch-icon {
  transform: scale(1.08) rotate(-5deg);

  background: #55e691;
  color: #102d68;
}


.project-card.project-demo:hover .demo-launch-arrow {
  transform: translate(3px, -3px);

  background: rgba(255, 255, 255, 0.24);
}


/* Keyboard accessibility */

.project-card.project-demo:focus-visible .demo-launch-button {
  outline: 3px solid rgba(47, 94, 235, 0.40);
  outline-offset: 5px;
}


/* Animations */

@keyframes demo-button-shine {

  0% {
    left: -45%;
  }

  55%,
  100% {
    left: 125%;
  }

}


@keyframes demo-button-pulse {

  0% {
    box-shadow:
      0 0 0 0 rgba(74, 111, 255, 0.42);
  }

  70% {
    box-shadow:
      0 0 0 12px rgba(74, 111, 255, 0);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(74, 111, 255, 0);
  }

}


/* Mobile adjustment */

@media (max-width: 600px) {

  .project-card.project-demo .demo-launch-button {
    gap: 10px;
    padding: 12px;
  }

  .demo-launch-icon {
    width: 40px;
    height: 40px;
  }

  .demo-launch-content strong {
    font-size: 0.88rem;
  }

  .demo-launch-content small {
    font-size: 0.68rem;
  }

  .demo-launch-arrow {
    width: 31px;
    height: 31px;
  }

}


/* Respect reduced-motion settings */

@media (prefers-reduced-motion: reduce) {

  .demo-launch-shine,
  .project-card.project-demo .demo-launch-button::after {
    animation: none;
  }

  .project-card.project-demo .demo-launch-button,
  .demo-launch-icon,
  .demo-launch-arrow {
    transition: none;
  }

}