@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #07080b;
  --bg-soft: #0c0f14;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.085);
  --text: #f2f4f8;
  --muted: #9da7b7;
  --faint: #687284;
  --line: rgba(255, 255, 255, 0.105);
  --accent: #b6ff63;
  --accent-2: #77d9ff;
  --biology: #7cffb2;
  --optimisation: #ffd166;
  --physics: #77d9ff;
  --computing: #c69cff;
  --hardware: #ff8fab;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --max-width: 1120px;
}

.topic-biology {
  --topic: var(--biology);
  --topic-rgb: 124, 255, 178;
}

.topic-optimisation {
  --topic: var(--optimisation);
  --topic-rgb: 255, 209, 102;
}

.topic-physics {
  --topic: var(--physics);
  --topic-rgb: 119, 217, 255;
}

.topic-computing {
  --topic: var(--computing);
  --topic-rgb: 198, 156, 255;
}

.topic-hardware {
  --topic: var(--hardware);
  --topic-rgb: 255, 143, 171;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(119, 217, 255, 0.14), transparent 30rem),
    radial-gradient(circle at 82% 8%, rgba(182, 255, 99, 0.10), transparent 26rem),
    linear-gradient(180deg, #06070a 0%, #090b10 38%, #050609 100%);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 11, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--max-width), calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.nav-links a,
.eyebrow,
.section-kicker,
.button,
.category-heading span,
.category-heading h3,
.project-overlay h4,
.landing-project-label,
.landing-project-overlay h2,
.project-tech,
.publication-ref,
.contact-label,
.contact-line,
.pgp-key,
.footer {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.brand {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 16px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
    radial-gradient(circle at 92% 0%, rgba(182, 255, 99, 0.10), transparent 18rem);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.34);
}

.profile-image {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.045),
    0 14px 34px rgba(0, 0, 0, 0.36);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.75rem, 4.4vw, 3.35rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.85),
    0 0 24px rgba(242, 244, 248, 0.16);
}

.tagline {
  max-width: 760px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.5vw, 1.02rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

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

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

.button.secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.landing-projects {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 54px;
}

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

.landing-project-card {
  position: relative;
  min-height: 152px;
  overflow: hidden;
  border: 1px solid rgba(var(--topic-rgb), 0.58);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(var(--topic-rgb), 0.12), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(var(--topic-rgb), 0.10),
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 36px rgba(var(--topic-rgb), 0.10);
  isolation: isolate;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.landing-project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--topic-rgb), 0.92);
  background:
    linear-gradient(135deg, rgba(var(--topic-rgb), 0.17), rgba(255, 255, 255, 0.055)),
    var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(var(--topic-rgb), 0.20),
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 0 44px rgba(var(--topic-rgb), 0.18);
}

.landing-project-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(0.88) contrast(1.10);
  transform: scale(1.02);
  transition:
    opacity 180ms ease,
    transform 240ms ease;
}

.landing-project-card:hover img {
  opacity: 0.52;
  transform: scale(1.055);
}

.landing-project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.30) 38%, rgba(0, 0, 0, 0.88)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34));
}

.landing-project-overlay {
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.landing-project-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.landing-project-label {
  margin-bottom: 0;
  padding: 4px 9px;
  color: var(--topic);
  border: 1px solid rgba(var(--topic-rgb), 0.58);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(var(--topic-rgb), 0.35),
    0 1px 0 rgba(0, 0, 0, 0.95);
}

.project-tech {
  margin-bottom: 0;
  padding: 4px 9px;
  max-width: 58%;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.105);
  backdrop-filter: blur(10px);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.045em;
  line-height: 1.15;
  text-align: right;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.95),
    0 0 12px rgba(255, 255, 255, 0.18);
}

.project-card > .project-tech {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

.landing-project-body {
  margin-top: 24px;
}

.landing-project-overlay h2 {
  margin-bottom: 6px;
  color: var(--topic);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.82),
    1px -1px 0 rgba(0, 0, 0, 0.82),
    -1px 1px 0 rgba(0, 0, 0, 0.82),
    1px 1px 0 rgba(0, 0, 0, 0.82),
    0 0 16px rgba(var(--topic-rgb), 0.28);
}

.landing-project-overlay p:last-child {
  margin-bottom: 0;
  color: rgba(242, 244, 248, 0.84);
  font-size: 0.86rem;
  line-height: 1.38;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.75),
    1px -1px 0 rgba(0, 0, 0, 0.75),
    -1px 1px 0 rgba(0, 0, 0, 0.75),
    1px 1px 0 rgba(0, 0, 0, 0.75);
}

.projects-section,
.publications-section,
.contact-section {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.projects-section {
  padding: 4px 0 78px;
}

.publications-section {
  padding: 4px 0 72px;
}

.contact-section {
  padding: 4px 0 96px;
}

.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--accent-2);
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-intro h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.project-category {
  padding: 24px 0 34px;
  border-top: 1px solid rgba(var(--topic-rgb), 0.36);
}

.category-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.category-heading span {
  color: var(--topic);
  font-size: 0.72rem;
  text-shadow:
    0 0 12px rgba(var(--topic-rgb), 0.38),
    0 1px 0 rgba(0, 0, 0, 0.95);
}

.category-heading h3 {
  margin-bottom: 0;
  color: var(--topic);
  font-size: clamp(1.15rem, 2.3vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.78),
    1px -1px 0 rgba(0, 0, 0, 0.78),
    -1px 1px 0 rgba(0, 0, 0, 0.78),
    1px 1px 0 rgba(0, 0, 0, 0.78),
    0 0 22px rgba(var(--topic-rgb), 0.28);
}

.category-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 8px;
  background: linear-gradient(90deg, rgba(var(--topic-rgb), 0.70), transparent);
}

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

.project-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid rgba(var(--topic-rgb), 0.52);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(var(--topic-rgb), 0.105), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.052),
    0 0 0 1px rgba(var(--topic-rgb), 0.08),
    0 18px 48px rgba(0, 0, 0, 0.24),
    0 0 34px rgba(var(--topic-rgb), 0.085);
  isolation: isolate;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--topic-rgb), 0.88);
  background:
    linear-gradient(135deg, rgba(var(--topic-rgb), 0.16), rgba(255, 255, 255, 0.055)),
    var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.075),
    0 0 0 1px rgba(var(--topic-rgb), 0.18),
    0 20px 52px rgba(0, 0, 0, 0.32),
    0 0 44px rgba(var(--topic-rgb), 0.16);
}

.project-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(0.86) contrast(1.08);
  transform: scale(1.02);
  transition:
    opacity 180ms ease,
    transform 240ms ease;
}

.project-card:hover img {
  opacity: 0.50;
  transform: scale(1.055);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54) 58%, rgba(0, 0, 0, 0.36)),
    linear-gradient(180deg, rgba(var(--topic-rgb), 0.10), transparent 62%);
}

.project-overlay {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 21px 19px;
}

.project-overlay h4 {
  margin-bottom: 7px;
  color: var(--topic);
  font-size: clamp(1rem, 1.9vw, 1.28rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.82),
    1px -1px 0 rgba(0, 0, 0, 0.82),
    -1px 1px 0 rgba(0, 0, 0, 0.82),
    1px 1px 0 rgba(0, 0, 0, 0.82),
    0 0 16px rgba(var(--topic-rgb), 0.26);
}

.project-overlay p {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(242, 244, 248, 0.84);
  font-size: 0.9rem;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.72),
    1px -1px 0 rgba(0, 0, 0, 0.72),
    -1px 1px 0 rgba(0, 0, 0, 0.72),
    1px 1px 0 rgba(0, 0, 0, 0.72);
}

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

.publication {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.028));
}

.publication h3 {
  margin-bottom: 6px;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: -0.025em;
}

.publication-ref {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.76rem;
}

.publication p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
}

.contact-block {
  padding: 24px;
  border: 1px solid rgba(119, 217, 255, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(119, 217, 255, 0.075), rgba(255, 255, 255, 0.028)),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 18px 48px rgba(0, 0, 0, 0.22);
}

.contact-label {
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-line {
  margin-bottom: 28px;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.contact-line a {
  color: var(--text);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.95),
    0 0 18px rgba(119, 217, 255, 0.18);
  transition: color 180ms ease;
}

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

.pgp-label {
  margin-top: 0;
}

.pgp-key {
  margin: 0;
  color: rgba(242, 244, 248, 0.82);
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.footer {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 46px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.76rem;
}

.footer p {
  margin-bottom: 0;
}

.footer div {
  display: flex;
  gap: 18px;
}

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

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

@media (max-width: 900px) {
  .landing-project-grid {
    grid-template-columns: 1fr;
  }

  .landing-project-card,
  .landing-project-overlay {
    min-height: 128px;
  }
}

@media (max-width: 820px) {
  .nav {
    height: auto;
    min-height: 64px;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-inner {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .profile-image {
    width: 64px;
    height: 64px;
  }

  h1 {
    font-size: clamp(1.55rem, 8vw, 2.35rem);
  }

  .tagline {
    font-size: 0.86rem;
  }

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

  .project-card,
  .project-overlay {
    min-height: 112px;
  }

  .footer {
    flex-direction: column;
  }

  .footer div {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .landing-project-meta {
    flex-direction: column;
    gap: 8px;
  }

  .project-tech {
    max-width: 100%;
    text-align: left;
  }

  .project-card > .project-tech {
    position: relative;
    top: auto;
    right: auto;
    z-index: 3;
    display: inline-block;
    margin: 14px 14px 0 auto;
    max-width: calc(100% - 28px);
  }

  .project-overlay {
    padding-top: 14px;
  }
}

@media (max-width: 520px) {
  .section-intro {
    display: block;
  }

  .project-overlay {
    padding-right: 18px;
    padding-left: 18px;
  }

  .contact-block {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .profile-image {
    width: 68px;
    height: 68px;
  }
}
