#main {
  max-width: min(1800px, calc(100vw - 1.25rem)) !important;
  padding-left: clamp(1rem, 1.8vw, 2rem);
  padding-right: clamp(1rem, 1.8vw, 2rem);
}

.page__inner-wrap {
  max-width: none;
}

@media screen and (min-width: 1024px) {
  .page {
    float: right;
    width: calc(100% - 290px);
    margin-right: 0;
  }
}

.homepage-shell {
  display: grid;
  gap: 1.8rem;
}

.mobile-profile-card {
  display: none;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(47, 127, 147, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 35, 45, 0.05);
}

.mobile-profile-card__header {
  display: grid;
  grid-template-columns: 4.9rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.mobile-profile-card__avatar {
  display: block;
  width: 4.9rem;
  height: 4.9rem;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(47, 127, 147, 0.12);
}

.mobile-profile-card__body h2 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  line-height: 1.15;
}

.mobile-profile-card__bio,
.mobile-profile-card__meta {
  margin: 0;
  line-height: 1.4;
}

.mobile-profile-card__bio {
  color: rgba(35, 49, 56, 0.88);
}

.mobile-profile-card__meta {
  margin-top: 0.18rem;
  color: rgba(35, 49, 56, 0.68);
  font-size: 0.92rem;
}

.mobile-profile-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.mobile-profile-card__links a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.58rem;
  border: 1px solid rgba(47, 127, 147, 0.14);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.homepage-shell h2 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.hero-panel {
  position: relative;
  padding: 1.6rem 1.7rem;
  border: 1px solid rgba(47, 127, 147, 0.18);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(20, 35, 50, 0.08);
  overflow: hidden;
}

.hero-panel h1 {
  margin: 0 0 0.55rem;
  color: #0f3340;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-kicker {
  margin-bottom: 0.75rem;
  color: #2f7f93;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-lead,
.hero-summary {
  max-width: 54rem;
  margin-bottom: 0.65rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-summary {
  color: rgba(35, 49, 56, 0.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.72rem;
  border: 1px solid rgba(47, 127, 147, 0.16);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-actions a:hover {
  background: #fff;
  text-decoration: none;
}

.home-section {
  display: grid;
  gap: 0.8rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem 1.5rem;
}

.section-header > div {
  display: grid;
  gap: 0.35rem;
}

.section-kicker {
  margin: 0;
  color: #2f7f93;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-blurb {
  max-width: 34rem;
  margin: 0;
  color: rgba(35, 49, 56, 0.78);
  font-size: 0.96rem;
  line-height: 1.64;
}

.info-card {
  padding: 1.05rem 1.15rem;
  border: 1px solid rgba(47, 127, 147, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 35, 45, 0.05);
}

.info-card p:last-child {
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  gap: 0.95rem;
}

.project-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1.1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(47, 127, 147, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(20, 35, 50, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(20, 35, 50, 0.08);
}

.project-visual {
  --img-scale: 1;
  --img-shift-x: 0px;
  --img-shift-y: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(47, 127, 147, 0.12);
  border-radius: 14px;
  background: #fff;
  height: clamp(156px, 12vw, 176px);
  padding: 0.4rem;
}

.project-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  transform: translate(var(--img-shift-x), var(--img-shift-y)) scale(var(--img-scale));
  transform-origin: center center;
  will-change: transform;
}

.project-visual--wsl {
  --img-scale: 1;
}

.project-visual--w2t {
  --img-scale: 1;
}

.project-visual--molfield {
  --img-scale: 1;
}

.project-visual--sadenas {
  --img-scale: 1;
}

.project-visual--genas {
  --img-scale: 1;
}

.project-visual--swd {
  --img-scale: 1;
}

.project-body {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-meta span {
  padding: 0.24rem 0.48rem;
  border-radius: 999px;
  background: #fff;
  color: #1d5f70;
}

.project-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.32;
}

.project-authors,
.project-summary,
.project-links {
  margin: 0;
}

.project-authors {
  color: rgba(35, 49, 56, 0.7);
  font-size: 0.88rem;
  line-height: 1.46;
}

.project-summary {
  color: rgba(35, 49, 56, 0.88);
  font-size: 0.94rem;
  line-height: 1.58;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-links a:hover {
  background: #fff;
  text-decoration: none;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.compact-publication-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-publication-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.compact-publication-list strong {
  display: inline-block;
  margin-right: 0.3rem;
}

.compact-publication-year {
  display: inline-flex;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #fff;
  color: #1d5f70;
  font-size: 0.82rem;
  font-weight: 700;
}

.page__content .homepage-shell a {
  text-decoration-thickness: 0.08em;
}

.sidebar.sticky {
  top: 5.5rem;
}

.author__content,
.author__urls-wrapper {
  padding: 0.1rem 0.2rem;
}

.author__urls-wrapper .btn {
  border-radius: 999px;
}

@media (max-width: 1023px) {
  .sidebar {
    position: relative;
    float: none !important;
    width: 100% !important;
    margin: 0 0 1.15rem !important;
    padding: 0.95rem 1rem !important;
    border: 1px solid rgba(47, 127, 147, 0.12);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 35, 45, 0.05);
    overflow: visible;
    z-index: auto;
  }

  .sidebar > div[itemscope] {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
  }

  .sidebar > div[itemscope] > .author__avatar,
  .sidebar > div[itemscope] > .author__content,
  .sidebar > div[itemscope] > .author__urls-wrapper {
    display: block;
    width: auto;
  }

  .sidebar > div[itemscope] > .author__avatar {
    margin: 0;
  }

  .sidebar > div[itemscope] > .author__avatar img {
    display: block;
    max-width: 4.5rem;
    height: auto;
    padding: 0;
    border: 1px solid rgba(47, 127, 147, 0.12);
  }

  .sidebar > div[itemscope] > .author__content {
    padding: 0;
    min-width: 0;
  }

  .sidebar .author__name {
    margin: 0 0 0.2rem;
  }

  .sidebar .author__bio {
    margin: 0;
    line-height: 1.35;
  }

  .sidebar > div[itemscope] > .author__urls-wrapper {
    position: relative;
    padding: 0;
    align-self: start;
    z-index: 20;
  }

  .sidebar .author__urls {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    z-index: 40 !important;
    overflow: visible;
  }

  .page {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    clear: both;
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 560px) {
  .sidebar > div[itemscope] {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    grid-template-areas:
      "avatar content"
      "avatar links";
    align-items: start;
  }

  .sidebar > div[itemscope] > .author__avatar {
    grid-area: avatar;
  }

  .sidebar > div[itemscope] > .author__content {
    grid-area: content;
  }

  .sidebar > div[itemscope] > .author__urls-wrapper {
    grid-area: links;
    justify-self: start;
    margin-top: 0.15rem;
  }
}

body {
  background: #fff;
}

html[data-theme="dark"] .hero-panel {
  background:
    radial-gradient(circle at top right, rgba(14, 161, 197, 0.24), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  box-shadow: none;
}

html[data-theme="dark"] .hero-panel h1,
html[data-theme="dark"] .hero-summary,
html[data-theme="dark"] .project-authors,
html[data-theme="dark"] .project-summary,
html[data-theme="dark"] .compact-publication-year {
  color: var(--global-text-color);
}

html[data-theme="dark"] .hero-kicker,
html[data-theme="dark"] .section-kicker,
html[data-theme="dark"] .project-links a,
html[data-theme="dark"] .hero-actions a {
  color: var(--global-link-color);
}

html[data-theme="dark"] .info-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .project-visual,
html[data-theme="dark"] .hero-actions a,
html[data-theme="dark"] .project-meta span,
html[data-theme="dark"] .compact-publication-year {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

html[data-theme="dark"] .section-blurb,
html[data-theme="dark"] .project-meta span {
  color: var(--global-text-color-light);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(14, 161, 197, 0.08), transparent 24rem),
    radial-gradient(circle at top left, rgba(14, 161, 197, 0.05), transparent 20rem),
    var(--global-bg-color);
}

@media (max-width: 1023px) {
  #main {
    max-width: calc(100vw - 1rem) !important;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero-panel {
    padding: 1.5rem;
  }

  .mobile-profile-card {
    display: block;
  }

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

  .project-visual {
    height: 188px;
  }

  .section-header {
    display: grid;
    align-items: start;
  }

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

@media (max-width: 480px) {
  .mobile-profile-card__header {
    grid-template-columns: 4.35rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
  }

  .mobile-profile-card__avatar {
    width: 4.35rem;
    height: 4.35rem;
  }
}
