@import url("https://fonts.googleapis.com/css2?family=Proza+Libre:wght@400;500;600;700&family=Raleway:wght@300;400&family=Roboto:wght@100;300;700&display=swap");

:root {
  /* Colors */
  --pink: #b83263;
  --light-pink: #d75b83;
  --dark: #3b3838;
  --text: #111111;
  --bg: #fbfaf8;
  --line: #cfcac5;

  /* Fonts */
  --font-title: "Roboto", sans-serif;
  --font-text: "Proza Libre", sans-serif;
  --font-name: "Raleway", sans-serif;

  /* Font sizes */
  --size-nav: 14px;
  --size-body: 16px;
  --size-body-small: 14px;
  --size-footer: 18px;
  --size-hero-name: clamp(52px, 4.9vw, 82px);
  --size-hero-subtitle: 20px;
  --size-page-title: clamp(58px, 5vw, 86px);
  --size-section-title: clamp(32px, 3.4vw, 48px);
  --size-home-section-title: 40px;

  /* Line heights */
  --line-body: 1.65;
  --line-project: 1.45;
}

/* Base */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
}

/* Top menu */

.top-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(810px, 80vw);
  height: 50px;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(150, 80, 80, 0.18);
  transition: transform 0.25s ease;
}

.top-nav.nav-hidden {
  transform: translateX(-50%) translateY(-120%);
}

.top-nav nav {
  display: flex;
  height: 100%;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.top-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  color: white;
  text-decoration: none;
  font-family: var(--font-text);
  font-size: var(--size-nav);
  font-weight: 600;
}

.top-nav a.active {
  background: var(--dark);
}

.menu-toggle {
  display: none;
  width: 100%;
  height: 50px;
  border: 0;
  background: var(--dark);
  color: white;
  font-family: var(--font-text);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .top-nav {
    width: min(92vw, 360px);
    height: auto;
  }

  .menu-toggle {
    display: block;
  }

  .top-nav nav {
    display: none;
    height: auto;
    flex-direction: column;
  }

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

  .top-nav a {
    height: 46px;
    flex: none;
  }
}

/* Hero */

.hero {
  min-height: 100vh;
  padding: 50px clamp(40px, 6vw, 120px) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(60px, 8vw, 150px);
  background: var(--bg);
}

.hero-text {
  flex: 0 1 520px;
  transform: translateY(-10px);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-name);
  font-size: var(--size-hero-name);
  line-height: 1.12;
  font-weight: 300;
  letter-spacing: -2px;
}

.name-line {
  display: block;
}

.name-first {
  color: var(--text);
}

.name-last {
  color: var(--pink);
  white-space: nowrap;
}

.hero p {
  margin: 6px 0 0;
  font-family: var(--font-title);
  font-size: var(--size-hero-subtitle);
  font-weight: 100;
  color: #333;
}

.hero p span {
  color: var(--light-pink);
  font-weight: 700;
}

.hero-image img {
  width: clamp(360px, 33vw, 520px);
  max-width: 100%;
  display: block;
}

/* Welcome section */

.welcome {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 30px;
}

.welcome h2 {
  margin: 0 0 18px;
  text-align: center;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-home-section-title);
  font-weight: 100;
}

.welcome-main {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 34px;
  align-items: start;
}

.profile-photo {
  width: 175px;
  max-width: 175px;
  height: auto;
  display: block;
}

.welcome-text,
.research-lines,
.welcome-bottom {
  font-size: var(--size-body);
  line-height: var(--line-body);
}

.welcome-text p,
.research-lines p,
.welcome-bottom p {
  margin: 0 0 16px;
}

.research-lines {
  margin-top: 18px;
}

.research-lines ul {
  margin: -8px 0 28px;
  padding-left: 22px;
}

.welcome-bottom {
  margin-top: 4px;
}

/* Generic inner pages */

.page {
  min-height: 100vh;
  padding: 120px 24px 40px;
  background: var(--bg);
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
}

.page-content h1 {
  margin: 0 0 32px;
  text-align: center;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-page-title);
  font-weight: 100;
}

.page-content p {
  font-size: var(--size-body);
  line-height: var(--line-body);
  margin: 0 0 16px;
}

/* Projects page */

.projects-page {
  padding: 90px 5vw 40px;
  background: var(--bg);
}

.projects-page h1 {
  margin: 0 0 55px;
  text-align: center;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-page-title);
  font-weight: 100;
}

#projects-list {
  max-width: 1450px;
  margin: 0 auto;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(420px, 0.85fr) minmax(520px, 1.15fr);
  gap: clamp(50px, 6vw, 100px);
  align-items: center;
  padding: 30px 0 42px;
  border-bottom: 1px solid var(--line);
}

.project-card.image-left {
  grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.85fr);
}

.project-card.image-left .project-image {
  order: 1;
}

.project-card.image-left .project-text {
  order: 2;
}

.project-card.image-right .project-text {
  order: 1;
}

.project-card.image-right .project-image {
  order: 2;
}

.project-text h2 {
  margin: 0 0 22px;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-section-title);
  line-height: 1.15;
  font-weight: 100;
}

.project-text p {
  margin: 0 0 20px;
  font-size: var(--size-body-small);
  line-height: var(--line-project);
}

.project-text a:not(.project-button),
.welcome a:not(.project-button) {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-text a:not(.project-button):hover,
.welcome a:not(.project-button):hover {
  color: var(--light-pink);
}

.project-image img {
  width: 100%;
  display: block;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.project-button {
  display: inline-block;
  padding: 10px 14px;
  background: var(--dark);
  color: white;
  text-decoration: none;
  font-family: var(--font-text);
  font-size: var(--size-body);
  letter-spacing: 1.5px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-button:hover {
  background: var(--pink);
  transform: translateY(-2px);
}

/* Outreach page */

.outreach-page {
  padding: 90px 5vw 40px;
  background: var(--bg);
}

.outreach-page h1 {
  margin: 0 0 55px;
  text-align: center;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-page-title);
  font-weight: 100;
}

.visual-card {
  max-width: 1250px;
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(520px, 1.25fr);
  gap: clamp(50px, 7vw, 110px);
  align-items: center;
}

.visual-card.image-left .visual-window {
  order: 1;
}

.visual-card.image-left .visual-text {
  order: 2;
}

.visual-card.image-right .visual-text {
  order: 1;
}

.visual-card.image-right .visual-window {
  order: 2;
}

.visual-text h2 {
  margin: 0 0 34px;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-section-title);
  line-height: 1.15;
  font-weight: 100;
  text-align: center;
}

.visual-text p {
  margin: 0 0 16px;
  font-size: var(--size-body);
  line-height: var(--line-body);
}

.visual-text .project-button {
  margin-top: 18px;
}

.visual-window {
  background: white;
  border: 1px solid #d8d3cf;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.visual-window-bar {
  height: 34px;
  background: #eeeeee;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #d8d3cf;
}

.visual-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b8b8b8;
}

.visual-window iframe {
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
  background: white;
}

/* Footer */

.site-footer {
  padding: 36px 24px 44px;
  text-align: center;
  font-size: var(--size-footer);
  line-height: var(--line-body);
}

.site-footer p {
  margin: 0;
}

.site-footer span {
  color: var(--pink);
}

/* Mobile placeholder */

@media (max-width: 900px) {
  .project-card,
  .project-card.image-left,
  .project-card.image-right {
    grid-template-columns: 1fr;
  }

  .project-card.image-left .project-image,
  .project-card.image-left .project-text,
  .project-card.image-right .project-image,
  .project-card.image-right .project-text {
    order: initial;
  }

  .projects-page h1,
  .outreach-page h1 {
    font-size: 44px;
    margin-bottom: 45px;
  }

  .project-text p,
  .visual-text p {
    font-size: 15px;
  }

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

  .visual-card.image-left .visual-window,
  .visual-card.image-left .visual-text,
  .visual-card.image-right .visual-window,
  .visual-card.image-right .visual-text {
    order: initial;
  }

  .visual-window iframe {
    height: 420px;
  }

  .visual-text h2 {
    text-align: left;
  }

  .software-card,
  .software-card.image-left,
  .software-card.image-right {
    grid-template-columns: 1fr;
  }

  .software-card.image-left .software-image,
  .software-card.image-left .software-text,
  .software-card.image-right .software-image,
  .software-card.image-right .software-text {
    order: initial;
  }

  .software-page h1 {
    font-size: 44px;
    margin-bottom: 45px;
  }

  .software-text p {
    font-size: 15px;
  }
}

@media (max-width: 700px) {
  .top-nav {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 90px 24px 50px;
    flex-direction: column;
    gap: 30px;
    text-align: left;
  }

  .hero-text {
    width: 100%;
    flex: none;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 14px;
  }

  .hero-image img {
    width: 330px;
  }

  .welcome-main {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 180px;
    max-width: 180px;
    margin: 0 auto;
  }
}

.name-line {
  display: block;
}

.name-last {
  white-space: nowrap;
}

.hero {
  position: relative;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}

.hero-text,
.hero-image {
  position: relative;
  z-index: 1;
}

.hero-image {
  animation: heroTriangleIn 1.1s ease-out both;
  animation-delay: 0.25s;
}

@keyframes heroTriangleIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  .hero-image,
  .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Software page */

.software-page {
  padding: 90px 5vw 40px;
  background: var(--bg);
}

.software-page h1 {
  margin: 0 0 55px;
  text-align: center;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-page-title);
  font-weight: 100;
}

#software-list {
  max-width: 1250px;
  margin: 0 auto;
}

.software-card {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  gap: clamp(50px, 6vw, 100px);
  align-items: center;
  padding: 30px 0 42px;
  border-bottom: 1px solid var(--line);
}

.software-card.image-left {
  grid-template-columns: minmax(460px, 1.1fr) minmax(360px, 0.9fr);
}

.software-card.image-left .software-image {
  order: 1;
}

.software-card.image-left .software-text {
  order: 2;
}

.software-card.image-right .software-text {
  order: 1;
}

.software-card.image-right .software-image {
  order: 2;
}

.software-text h2 {
  margin: 0 0 22px;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-section-title);
  line-height: 1.15;
  font-weight: 100;
}

.software-text p {
  margin: 0 0 20px;
  font-size: var(--size-body);
  line-height: var(--line-project);
}

.software-text a:not(.project-button) {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.software-text a:not(.project-button):hover {
  color: var(--light-pink);
}

.software-image img {
  width: min(100%, 420px);
  max-height: 280px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* 404 page */

.error-page {
  min-height: 70vh;
  padding: 140px 24px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.error-content {
  max-width: 620px;
  text-align: center;
}

.error-content h1 {
  margin: 0;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: clamp(80px, 12vw, 160px);
  line-height: 0.9;
  font-weight: 100;
}

.error-content h2 {
  margin: 18px 0 18px;
  color: var(--light-pink);
  font-family: var(--font-title);
  font-size: var(--size-section-title);
  line-height: 1.15;
  font-weight: 100;
}

.error-content p {
  margin: 0 0 28px;
  font-size: var(--size-body);
  line-height: var(--line-body);
}