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

:root {
  --bg: rgb(9, 14, 18);
  --text: rgb(255, 255, 255);
  --btn-bg: rgb(28, 61, 90);
  --btn-bg-hover: rgb(9, 14, 18);
  --header-contrast: rgb(29, 46, 59);
  --max-width: 1240px;
  --font-primary: "Montserrat", sans-serif;
  --font-secondary: "Montserrat", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
}

.logo {
  font-family: var(--font-primary);
  font-size: 23px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 0.85;
}

.nav-links a.active {
  font-weight: 500;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main layout */
main {
  overflow-x: hidden;
}

.section {
  padding: 16px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Hero */
.hero {
  padding-top: 32px;
  padding-bottom: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 513px 1fr;
  gap: 48px 60px;
  align-items: start;
}

.hero-image img {
  width: 513px;
  height: 513px;
  object-fit: cover;
  border-radius: 20px;
}

.hero-content {
  padding-top: 24px;
}

.hero-content h1 {
  font-family: var(--font-primary);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-bio {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 509px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: var(--text);
  background-color: var(--btn-bg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--btn-bg-hover);
}

.btn-about {
  font-weight: 500;
  border-radius: 30px;
  padding: 16px 40px;
}

.btn-about:hover {
  background-color: var(--btn-bg);
}

/* Social */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: opacity 0.2s ease;
}

.social-link:hover {
  opacity: 0.85;
}

.social-link svg {
  width: 22px;
  height: 22px;
}

/* Research projects */
.research {
  padding-top: 48px;
  padding-bottom: 80px;
}

.research h3 {
  font-family: var(--font-primary);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 48px;
}

.project {
  margin-bottom: 56px;
}

.project h4 {
  font-family: var(--font-primary);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: normal;
}

.project .btn:hover {
  background-color: var(--btn-bg-hover);
}

/* About page */
.about-hero {
  padding-top: 32px;
  padding-bottom: 64px;
}

.about-grid {
  display: grid;
  grid-template-columns: 513px 1fr;
  gap: 48px 60px;
  align-items: start;
}

.about-intro-col h1 {
  font-family: var(--font-primary);
  font-size: 64px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 24px;
}

.about-intro-col {
  min-width: 0;
}

.about-intro-col .intro-text {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.about-image img {
  width: 100%;
  max-width: 513px;
  border-radius: 20px;
  object-fit: cover;
}

.about-content {
  padding-top: 0;
  padding-bottom: 80px;
}

.about-content h4:first-of-type {
  margin-top: 0;
}

.about-content h4 {
  font-family: var(--font-primary);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 28px;
  margin-bottom: 20px;
}

.about-content p {
  font-size: 18px;
  line-height: 1.74;
  margin-bottom: 28px;
}

.about-content p.body-tight {
  line-height: 1.3;
  margin-bottom: 28px;
}

.about-content p.body-tight.mb-lg {
  margin-bottom: 46px;
}

.about-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 28px;
}

.about-content li {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.about-content li p {
  margin-bottom: 0;
}

.about-content a {
  text-decoration: underline;
}

.about-content a:hover {
  opacity: 0.9;
}

.about-content strong {
  font-weight: 600;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
}

/* Responsive */
@media (max-width: 919px) {
  .header-inner {
    padding: 24px 16px;
    min-height: 77px;
  }

  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: none;
    position: fixed;
    top: 77px;
    left: 0;
    right: 0;
    background-color: var(--header-contrast);
    padding: 24px 16px;
    z-index: 99;
  }

  .mobile-nav.open {
    display: block;
  }

  .mobile-nav .nav-links {
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
    text-align: left;
  }

  .hero-image {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-image img {
    width: 258px;
    height: 252px;
  }

  .hero-content {
    padding-top: 0;
    width: 100%;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-bio {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .research h3 {
    font-size: 32px;
    margin-bottom: 32px;
  }

  .project h4 {
    font-size: 24px;
  }

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

  .about-image {
    display: flex;
    justify-content: center;
  }

  .about-image img {
    max-width: 328px;
    width: 100%;
  }

  .about-intro-col h1 {
    font-size: 40px;
  }

  .about-content h4 {
    font-size: 24px;
  }
}

@media (min-width: 920px) and (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 42% 1fr;
    gap: 32px;
  }

  .hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .hero-content h1 {
    font-size: 48px;
  }

  .about-grid {
    grid-template-columns: 42% 1fr;
  }
}
