:root {
  --bg: #05080a;
  --surface: #080d10;
  --surface-hover: #0a1115;

  --border: rgba(155, 196, 207, 0.14);
  --border-strong: rgba(155, 196, 207, 0.28);

  --text: #e8eef0;
  --muted: #809097;

  --accent: #4ee6dc;
  --accent-soft: rgba(78, 230, 220, 0.1);

  --max-width: 1180px;

  --mono:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;

  --sans:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family: var(--sans);
  color: var(--text);

  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(37, 107, 112, 0.08),
      transparent 32rem
    ),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    );

  background-size: 48px 48px;

  mask-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.6),
      transparent 90%
    );
}

a {
  color: inherit;
}

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

/* HEADER */

.site-header {
  height: 92px;

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

  border-bottom: 1px solid var(--border);
}

.brand,
.lab-id,
.hero-kicker,
.experiment-number,
.experiment-domain,
.tech-list,
.open-system,
.site-footer {
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

.brand {
  color: var(--text);
  text-decoration: none;

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

.lab-id {
  color: var(--accent);
  font-size: 0.72rem;
}

/* HERO */

.hero {
  padding: 112px 0 100px;
  max-width: 920px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 30px;

  color: var(--accent);

  font-size: clamp(1rem, 2vw, 1.35rem);
}

.hero-kicker span {
  opacity: 0.55;
}

.hero h1 {
  margin: 0;

  max-width: 900px;

  font-size: clamp(2.1rem, 4.8vw, 3.85rem);
  font-weight: 470;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: #9da9ae;
}

.hero-copy {
  max-width: 620px;
  margin: 38px 0 0;

  color: var(--muted);

  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

/* PROJECTS */

.experiments {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;

  padding-bottom: 120px;
}

.experiment-card {
  position: relative;
  isolation: isolate;

  min-height: 390px;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 28px 30px 32px;

  color: inherit;
  text-decoration: none;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.018),
      transparent 45%
    ),
    var(--surface);

  border: 1px solid var(--border);
  border-radius: 3px;

  transition:
    background 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.experiment-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  opacity: 0;

  background:
    radial-gradient(
      circle at 75% 60%,
      var(--accent-soft),
      transparent 38%
    );

  transition: opacity 280ms ease;
}

.experiment-card:hover {
  transform: translateY(-3px);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.026),
      transparent 45%
    ),
    var(--surface-hover);

  border-color: var(--border-strong);
}

.experiment-card:hover::after {
  opacity: 1;
}

.experiment-header {
  position: relative;
  z-index: 2;

  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.experiment-number,
.experiment-domain {
  font-size: 0.67rem;
}

.experiment-number {
  color: var(--muted);
}

.experiment-domain {
  color: var(--accent);
}

/* CARD CONTENT */

.experiment-content {
  position: relative;
  z-index: 2;

  margin-top: auto;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.experiment-content h2 {
  margin: 0;

  font-size: clamp(2rem, 4.5vw, 3.9rem);
  font-weight: 480;
  line-height: 1;
  letter-spacing: -0.045em;

  color: #e9f6f5;

  transition: transform 250ms ease;
}

.experiment-card:hover h2 {
  transform: translateX(3px);
}

.experiment-content p {
  max-width: 470px;

  margin: 18px 0 24px;

  color: var(--muted);

  font-size: 1rem;
  line-height: 1.65;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.tech-list li {
  padding: 6px 8px;

  color: var(--muted);

  font-size: 0.59rem;
  text-transform: uppercase;

  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.open-system {
  flex-shrink: 0;

  display: flex;
  align-items: center;
  gap: 16px;

  padding-bottom: 4px;

  color: var(--accent);

  font-size: 0.65rem;
  white-space: nowrap;
}

.arrow {
  display: inline-block;

  font-size: 1.1rem;

  transition: transform 220ms ease;
}

.experiment-card:hover .arrow {
  transform: translateX(7px);
}

/* FOOTER */

.site-footer {
  min-height: 110px;

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

  border-top: 1px solid var(--border);

  color: var(--muted);

  font-size: 0.65rem;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;

  transition: color 180ms ease;
}

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

.footer-meta {
  display: flex;
  gap: 24px;
}

/* TABLET */

@media (max-width: 900px) {
  .hero {
    padding-top: 88px;
  }

  .experiment-card {
    min-height: 420px;
  }

  .experiment-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .open-system {
    align-self: flex-end;
  }
}

/* MOBILE */

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

  .site-header {
    height: 72px;
  }

  .hero {
    padding: 74px 0 72px;
  }

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

  .hero-copy {
    font-size: 0.95rem;
  }

  .experiments {
    padding-bottom: 74px;
  }

  .experiment-card {
    min-height: 390px;

    padding:
      20px
      20px
      24px;
  }

  .experiment-domain {
    display: none;
  }

  .experiment-content h2 {
    font-size: 2.35rem;
  }

  .experiment-content p {
    font-size: 0.9rem;
  }

  .open-system {
    align-self: flex-start;
  }

  .site-footer {
    min-height: 160px;

    align-items: flex-start;
    flex-direction: column;

    padding: 34px 0;
  }

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