/* ==========================================================================
   PUBLIC NAVIGATION
   ========================================================================== */

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 78px;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid rgba(123, 142, 158, 0.18);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
  will-change: transform;
}

.public-nav.nav-condensed {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(23, 33, 43, 0.12);
}

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  color: var(--primary-dark);
  background: #edf6f2;
  box-shadow: 0 12px 30px rgba(35, 55, 44, 0.1);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

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

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

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

.public-nav nav,
.public-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signed-in-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  padding: 7px 10px 7px 7px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.user-chip strong,
.user-chip small {
  display: block;
}

.user-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-avatar {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.public-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  color: #536173;
  text-decoration: none;
  font-weight: 800;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.public-nav a.active,
.public-nav a:hover {
  color: var(--primary-dark);
  background: #e7f1ed;
  box-shadow: inset 0 0 0 1px rgba(39, 116, 93, 0.12);
  transform: translateY(-1px);
}

/* ==========================================================================
   HOME PAGE
   ========================================================================== */

.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 6vw, 72px);
  min-height: calc(100vh - 78px);
  align-items: center;
  padding: clamp(32px, 7vw, 84px);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(232, 244, 238, 0.95), rgba(242, 247, 249, 0.92)),
    #f6f9f8;
}

.public-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #2f7d5c;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-hero .eyebrow {
  color: var(--primary);
}

.public-hero h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.06;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: #536173;
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 28px;
}

.hero-proof {
  display: none;
}

.hero-proof span {
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  color: #31413a;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
}

.public-site .primary-btn,
.public-site .secondary-btn,
.auth-back {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.public-site .primary-btn::before,
.public-site .secondary-btn::before,
.auth-back::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.28s ease;
}

.public-site .secondary-btn::before {
  background: linear-gradient(135deg, rgba(39, 116, 93, 0.16), rgba(61, 93, 169, 0.16));
}

.public-site .primary-btn:hover::before,
.public-site .secondary-btn:hover::before,
.auth-back:hover::before {
  transform: scaleX(1);
}

.public-site .primary-btn:hover,
.public-site .secondary-btn:hover {
  box-shadow: 0 16px 32px rgba(39, 116, 93, 0.22);
}

.hero-media-panel {
  position: relative;
  z-index: 1;
  min-height: min(58vh, 540px);
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background: #dfe9e7;
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.18);
}

.hero-media-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 33, 43, 0.06), rgba(23, 33, 43, 0.38)),
    linear-gradient(90deg, rgba(39, 116, 93, 0.22), rgba(61, 93, 169, 0.08));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  animation: heroSlideshow 36s infinite;
}

.hero-slide-one {
  background-image: url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1400&q=85");
}

.hero-slide-two {
  background-image: url("https://images.unsplash.com/photo-1518611012118-696072aa579a?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 6s;
}

.hero-slide-three {
  background-image: url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 12s;
}

.hero-slide-four {
  background-image: url("https://images.unsplash.com/photo-1610832958506-aa56368176cf?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 18s;
}

.hero-slide-five {
  background-image: url("https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 24s;
}

.hero-slide-six {
  background-image: url("https://images.unsplash.com/photo-1505576399279-565b52d4ac71?auto=format&fit=crop&w=1400&q=85");
  animation-delay: 30s;
}

.hero-slide span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  z-index: 2;
  max-width: 440px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(23, 33, 43, 0.5);
  backdrop-filter: blur(16px);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

@keyframes heroSlideshow {
  0%,
  13% {
    opacity: 1;
    transform: scale(1);
  }

  18%,
  96% {
    opacity: 0;
    transform: scale(1.04);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.public-section {
  padding: clamp(44px, 7vw, 82px) clamp(22px, 5vw, 72px);
}

.page-section {
  min-height: calc(100vh - 78px);
}

.public-auth-section {
  padding: clamp(44px, 7vw, 82px) clamp(22px, 5vw, 72px);
  background: #f5f8f8;
}

.public-auth-card {
  width: min(100%, 560px);
  margin: 0;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: start center;
  overflow: hidden;
  padding: clamp(18px, 6vh, 56px) 18px;
  background: rgba(23, 33, 43, 0.58);
  backdrop-filter: blur(8px);
}

.auth-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(123, 142, 158, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.auth-modal .public-auth-section {
  padding: clamp(22px, 5vw, 34px);
  background: transparent;
}

.auth-modal .public-auth-card {
  width: 100%;
  box-shadow: none;
}

.auth-modal .section-title h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #eef3f4;
  color: var(--ink);
  font-size: 22px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  background: #ffffff;
}

.password-field input {
  border: 0;
  background: transparent;
}

.password-field input:focus {
  outline: none;
}

.password-field button {
  min-height: 38px;
  margin-right: 5px;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--primary-dark);
  background: #eef6f3;
  font-weight: 800;
}

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.password-rules span {
  border: 1px solid #d9e3e8;
  border-radius: 999px;
  padding: 6px 10px;
  color: #6b7481;
  background: #f7fafb;
  font-size: 12px;
  font-weight: 800;
}

.password-rules span.valid {
  border-color: rgba(39, 116, 93, 0.3);
  color: #1d6c55;
  background: #e8f4ee;
}

.auth-helper-link {
  display: inline-flex;
  width: fit-content;
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  color: #536173;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-helper-link:hover,
.auth-helper-link:focus-visible {
  color: var(--primary-dark);
}

.auth-helper-link.center {
  margin: 12px auto 0;
  justify-content: center;
}

.link-button {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  text-decoration: underline;
  font: inherit;
  font-weight: 800;
}

.legal-modal {
  width: min(680px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.legal-backdrop {
  z-index: 220;
}

.auth-modal .legal-backdrop {
  position: fixed;
  z-index: 320;
}

.legal-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.legal-modal header strong {
  font-size: 24px;
}

.legal-copy {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  color: #536173;
  line-height: 1.65;
}

.hero-auth-shell {
  position: relative;
  z-index: 2;
}

.hero-auth-shell .public-auth-section {
  padding: 0;
  background: transparent;
}

.hero-auth-shell .section-title {
  margin-bottom: 18px;
}

.hero-auth-shell .section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.hero-auth-shell .public-auth-card {
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.16);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 40px;
  align-items: start;
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-profile-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.about-portrait-wrap {
  justify-self: center;
  width: min(360px, 72vw);
  aspect-ratio: 1;
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 50%;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 246, 240, 0.96)),
    #ffffff;
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.14);
}

.about-portrait {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
}

.portal-loading-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  color: #17212b;
  background:
    linear-gradient(145deg, rgba(231, 244, 238, 0.98), rgba(249, 251, 250, 0.99)),
    #f4f8f6;
}

.portal-loading-screen::before,
.portal-loading-screen::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.portal-loading-screen::before {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(62, 118, 98, 0.08) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(62, 118, 98, 0.07) 50%, transparent 50.2%);
  background-size: 84px 84px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 68%);
  animation: portalGridDrift 14s linear infinite;
}

.portal-loading-screen::after {
  width: min(78vw, 940px);
  aspect-ratio: 1;
  border: 1px solid rgba(53, 108, 91, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(53, 108, 91, 0.025),
    0 0 0 170px rgba(53, 108, 91, 0.018);
  animation: portalHalo 4s ease-in-out infinite;
}

.portal-loading-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.72) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: portalSweep 4.8s ease-in-out infinite;
}

.portal-loading-content {
  display: grid;
  justify-items: center;
  width: min(100%, 620px);
  gap: 15px;
  animation: portalContentIn 0.65s ease both;
}

.portal-loading-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  margin-bottom: 4px;
}

.portal-loading-emblem .mark-logo-frame {
  width: 92px;
  height: 92px;
  padding: 7px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 55px rgba(36, 79, 64, 0.2);
  animation: portalLogoFloat 2.6s ease-in-out infinite;
}

.portal-loading-orbit {
  position: absolute;
  border: 1px solid rgba(53, 108, 91, 0.2);
  border-radius: 50%;
}

.portal-loading-orbit::after {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7ad4c;
  box-shadow: 0 0 16px rgba(215, 173, 76, 0.7);
  content: "";
}

.portal-loading-orbit-outer {
  inset: 0;
  border-style: dashed;
  animation: portalSpinner 6s linear infinite;
}

.portal-loading-orbit-inner {
  inset: 17px;
  border-color: rgba(53, 108, 91, 0.34);
  animation: portalSpinner 3.6s linear infinite reverse;
}

.portal-loading-screen .brand-name {
  align-items: center;
}

.portal-loading-screen .brand-name strong {
  color: #356c5b;
  font-size: 34px;
}

.portal-loading-screen .brand-name small {
  color: #68766f;
  letter-spacing: 0.12em;
}

.portal-loading-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: #477c69;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.portal-loading-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b9a7f;
  box-shadow: 0 0 0 5px rgba(91, 154, 127, 0.13);
  animation: portalStatusPulse 1.35s ease-in-out infinite;
}

.portal-loading-screen strong {
  margin-top: 4px;
  font-size: clamp(20px, 3vw, 27px);
}

.portal-loading-screen p {
  margin: 0;
  color: #687481;
}

.portal-loading-progress {
  position: relative;
  overflow: hidden;
  width: min(100%, 280px);
  height: 4px;
  margin-top: 10px;
  border-radius: 99px;
  background: rgba(53, 108, 91, 0.12);
}

.portal-loading-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #477c69, #d7ad4c);
  animation: portalProgress 1.6s ease-in-out infinite;
}

@keyframes portalSpinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes portalGridDrift {
  to { background-position: 84px 84px; }
}

@keyframes portalSweep {
  0%, 15% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@keyframes portalHalo {
  50% { transform: scale(1.04); opacity: 0.65; }
}

@keyframes portalLogoFloat {
  50% { transform: translateY(-6px); }
}

@keyframes portalStatusPulse {
  50% { opacity: 0.45; transform: scale(0.8); }
}

@keyframes portalProgress {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(345%); }
}

@keyframes portalContentIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-loading-screen *,
  .portal-loading-screen::before,
  .portal-loading-screen::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.about-intro {
  display: grid;
  gap: 18px;
}

.about-intro p {
  max-width: 820px;
}

.about-intro h2 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.public-section h2 {
  margin: 0;
  max-width: 760px;
  color: #17212b;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.public-section p {
  margin: 0;
  color: #5f6f7c;
  font-size: 18px;
  line-height: 1.75;
}

.section-title {
  margin-bottom: 26px;
}

/* ==========================================================================
   SERVICES PAGE
   ========================================================================== */

.services-title {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 28px 54px;
  align-items: end;
  margin-bottom: 34px;
}

.services-title .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.services-title p {
  max-width: 560px;
  font-size: 17px;
}

.services-page {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 150px, rgba(47, 125, 92, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbfa 0%, #eef4f3 52%, #f8fbfa 100%);
}

.services-hero {
  display: grid;
  justify-items: center;
  max-width: 980px;
  margin: 0 auto clamp(34px, 6vw, 72px);
  text-align: center;
}

.services-hero h2 {
  max-width: 760px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.08;
}

.services-hero p {
  max-width: 780px;
  margin-top: 20px;
  font-size: 18px;
}

.services-flow {
  display: grid;
  gap: clamp(34px, 6vw, 72px);
  max-width: 940px;
  margin: 0 auto;
}

.service-row {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 52px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96)),
    #ffffff;
  box-shadow: 0 22px 58px rgba(23, 33, 43, 0.08);
  text-align: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-row::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 36%;
  background: linear-gradient(180deg, rgba(39, 116, 93, 0.08), transparent);
  pointer-events: none;
}

.service-row:hover {
  border-color: rgba(39, 116, 93, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 28px 70px rgba(23, 33, 43, 0.11);
}

.service-photo {
  position: relative;
  z-index: 1;
  width: min(190px, 48vw);
  aspect-ratio: 1;
  border: 1px solid rgba(39, 116, 93, 0.18);
  border-radius: 50%;
  padding: 9px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(23, 33, 43, 0.14);
}

.service-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.service-row h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: #17212b;
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.1;
}

.service-row p {
  position: relative;
  z-index: 1;
  max-width: 830px;
  margin: 8px auto 0;
  color: #52616e;
  font-size: 16px;
  line-height: 1.72;
}

.service-grid,
.article-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scientific-services {
  position: relative;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 8px 0;
}

.service-grid article,
.article-list article {
  display: grid;
  gap: 10px;
  min-height: 150px;
  align-content: start;
  border: 1px solid rgba(123, 142, 158, 0.22);
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.scientific-services::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 35px;
  width: 1px;
  background: linear-gradient(180deg, rgba(39, 116, 93, 0), rgba(39, 116, 93, 0.35), rgba(47, 100, 127, 0));
}

.scientific-services article {
  position: relative;
  grid-template-columns: 70px minmax(0, 1fr) minmax(190px, 0.38fr);
  min-height: auto;
  align-items: center;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 249, 0.98)),
    radial-gradient(circle at 0% 0%, rgba(39, 116, 93, 0.14), transparent 30%);
  box-shadow: 0 18px 50px rgba(23, 33, 43, 0.08);
  overflow: hidden;
}

.scientific-services article::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(135deg, rgba(47, 100, 127, 0.09), rgba(39, 116, 93, 0.03));
  pointer-events: none;
}

.scientific-services article:hover {
  border-color: rgba(39, 116, 93, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 24px 62px rgba(23, 33, 43, 0.11);
}

.scientific-services em {
  position: relative;
  z-index: 1;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(39, 116, 93, 0.22);
  border-radius: 50%;
  color: #2f647f;
  background: #ffffff;
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.08);
}

.service-grid strong,
.article-list strong {
  color: #17212b;
  font-size: 19px;
}

.service-grid span,
.article-list span {
  color: #6d7887;
  line-height: 1.55;
}

.scientific-services article {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.scientific-services strong {
  display: block;
  margin-bottom: 8px;
  color: #19332a;
  font-size: 23px;
  line-height: 1.16;
}

.scientific-services span {
  display: block;
  max-width: 900px;
  color: #52616e;
  font-size: 16px;
  line-height: 1.7;
}

.scientific-services small {
  position: relative;
  z-index: 1;
  justify-self: end;
  max-width: 230px;
  border: 1px solid rgba(39, 116, 93, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  color: #2f647f;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  text-align: right;
}

/* ==========================================================================
   ARTICLES PAGE
   ========================================================================== */

.articles-band {
  background: #eef4f3;
}

.articles-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(47, 125, 92, 0.1), transparent 28%),
    linear-gradient(180deg, #f8fbfa 0%, #eef4f3 58%, #f8fbfa 100%);
}

.articles-hero {
  display: grid;
  justify-items: center;
  max-width: 860px;
  margin: 0 auto clamp(30px, 6vw, 70px);
  text-align: center;
}

.articles-hero h2 {
  max-width: 760px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
}

.articles-hero p {
  max-width: 740px;
  margin-top: 18px;
}

.article-deck {
  display: grid;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.science-article {
  display: grid;
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 0.9fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: stretch;
  border: 1px solid rgba(123, 142, 158, 0.18);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.96)),
    #ffffff;
  box-shadow: 0 22px 58px rgba(23, 33, 43, 0.08);
}

.science-article img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 8px;
  object-fit: cover;
}

.science-article > div {
  display: grid;
  align-content: center;
}

.science-article span {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.science-article h3 {
  margin: 0 0 16px;
  color: #17212b;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.1;
}

.science-article p {
  margin-top: 10px;
  color: #52616e;
  font-size: 16px;
  line-height: 1.72;
}

.article-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.article-sources a {
  border: 1px solid rgba(39, 116, 93, 0.16);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--primary-dark);
  background: rgba(239, 248, 244, 0.82);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.about-story-section {
  background: #eef4f3;
}

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

.about-story-grid article {
  display: grid;
  align-content: start;
  min-height: 280px;
  border: 1px solid rgba(123, 142, 158, 0.2);
  border-radius: 8px;
  padding: clamp(22px, 3vw, 32px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 249, 0.95)),
    #ffffff;
  box-shadow: 0 18px 45px rgba(23, 33, 43, 0.07);
}

.about-story-grid article span {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.about-story-grid h3 {
  margin: 0 0 14px;
  color: #17212b;
  font-size: 24px;
  line-height: 1.18;
}

.about-story-grid p {
  font-size: 16px;
  line-height: 1.72;
}

.about-closing-section {
  display: grid;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.97), rgba(32, 91, 72, 0.93)),
    #17212b;
}

.about-closing-section h2,
.about-closing-section p {
  color: #ffffff;
}

.about-closing-section p {
  max-width: 850px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.article-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-list article span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #17212b;
  color: #ffffff;
}

.contact-section h2,
.contact-section p {
  color: #ffffff;
}

.contact-section p {
  max-width: 780px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.76);
}

.home-contact-section {
  position: relative;
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.98), rgba(32, 91, 72, 0.94)),
    #17212b;
}

.home-contact-section::after {
  content: "";
  position: absolute;
  inset: auto -12% -58% auto;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.home-contact-section > * {
  position: relative;
  z-index: 1;
}

.home-contact-section h2 {
  max-width: 720px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

.home-contact-section .primary-btn {
  color: #1f4f3c;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.auth-back {
  width: fit-content;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100vh;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(22, 83, 61, 0.92), rgba(28, 103, 123, 0.82)),
    url("https://images.unsplash.com/photo-1490818387583-1baba5e638af?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.02;
}

.brand-name strong {
  color: var(--primary-dark);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0;
}

.brand-name small {
  display: block;
  margin-top: 4px;
  color: #5d7168;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.mark-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.mark-logo-frame {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #f8fbfa;
  box-shadow: 0 10px 24px rgba(23, 33, 43, 0.14);
}

.mark-logo {
  display: block;
  width: 58px;
  height: 58px;
  max-width: none;
  object-fit: contain;
}

.brand-copy {
  max-width: 560px;
}

.brand-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.6;
}

.auth-panel {
  display: grid;
  align-content: center;
  padding: 40px;
}

.auth-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tab-row,
.section-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.tab-row button,
.section-tabs button {
  flex: 1;
  min-height: 42px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.tab-row button.active,
.section-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(33, 48, 40, 0.08);
}

