/* ======================================================================
   AI Medical Model — Research Overview | CSS
====================================================================== */

/* ======================================================================
   GLOBAL SETTINGS
====================================================================== */

:root {
  --bg: #07090d;
  --panel: #0d1118;
  --panel-soft: #111720;
  --panel-strong: #0b0f15;
  --panel-glass: rgba(13, 17, 24, 0.86);

  --text: #f4f7fb;
  --muted: #9aa4b2;

  --red: #ff334f;
  --green: #37e07c;

  --line: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  --radius-lg: 34px;
  --radius-md: 26px;

  --shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
  --shadow-premium: 0 35px 110px rgba(0, 0, 0, 0.58);
  --shadow-hover: 0 50px 130px rgba(0, 0, 0, 0.68);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: var(--text);
  overflow-x: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.shell {
  width: min(1480px, calc(100% - 64px));
  margin: auto;
}


main {
  position: relative;
  z-index: 1;
}

.semantic-structure {
  display: contents;
}

/* ======================================================================
HEADER AND NAVIGATION
====================================================================== */

.nav {
  position: sticky;
  top: 16px;
  z-index: 20;

  isolation: isolate;
  overflow: hidden;

  width: min(1480px, calc(100% - 64px));
  margin: 38px auto 0;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;

  background:
    linear-gradient(110deg, rgba(255, 51, 79, 0.035), transparent 32%),
    linear-gradient(250deg, rgba(55, 224, 124, 0.04), transparent 34%),
    rgba(8, 11, 16, 0.90);

  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.nav::after {
  position: absolute;
  right: 22px;
  bottom: 0;
  left: 22px;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    var(--red),
    var(--green),
    transparent
  );

  content: "";
  opacity: 0.7;
  pointer-events: none;
}

.nav-inner {
  position: relative;
  z-index: 1;

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

  min-height: 74px;
  padding: 0 28px;
}

.project-return {
  position: static;
  inset: auto;
  z-index: auto;

  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;

  width: fit-content;
  max-width: none;
  margin: 0;
  padding: 12px 20px;

  border: 1px solid rgba(55, 224, 124, 0.62);
  border-radius: 8px;

  background:
    linear-gradient(
      135deg,
      rgba(55, 224, 124, 0.16),
      rgba(255, 51, 79, 0.08)
    );

  color: #eafff2;
  font-weight: 800;
  text-decoration: none;

  box-shadow: 0 10px 28px rgba(55, 224, 124, 0.10);

  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.project-return:hover,
.project-return:focus-visible {
  border-color: #a4ffc5;

  background: linear-gradient(135deg, #37e07c, #a4ffc5);

  color: #06110a;
  outline: none;

  box-shadow: 0 14px 34px rgba(55, 224, 124, 0.28);

  transform: translateY(-2px);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;

  margin-left: auto;
  padding-right: 26px;

  color: var(--muted);

  font-size: 0.95rem;
}

.nav-links a {
  padding: 10px 15px;

  border: 1px solid transparent;
  border-radius: 999px;

  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: rgba(255, 255, 255, 0.10);

  background: rgba(255, 255, 255, 0.055);

  color: #ffffff;
  outline: none;

  transform: translateY(-1px);
}

/* ======================================================================
OVERVIEW AND HERO
====================================================================== */

.hero {
  display: grid;
  align-items: center;

  min-height: 65vh;
  padding: 72px 0 36px;
}

.main-title {
  display: flex;
  flex-direction: column;
  gap: 12px;

  margin: 28px 0 26px;
}

.title-primary {
  font-size: clamp(4rem, 9vw, 8.8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.shimmer-title {
  position: relative;

  display: inline-block;

  background: linear-gradient(
    100deg,
    #ffffff 0%,
    #ffffff 25%,
    #ff334f 40%,
    #ffffff 50%,
    #37e07c 60%,
    #ffffff 75%,
    #ffffff 100%
  );
  background-position: 100% 50%;
  background-size: 240% 100%;

  color: #ffffff;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: titleSweep 2s ease-in-out infinite alternate;
}

.title-subtitle {
  background: linear-gradient(135deg, #ff334f 0%, #37e07c 100%);

  font-size: clamp(1.6rem, 3.8vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  filter: drop-shadow(0 0 25px rgba(55, 224, 124, 0.25));
}

.hero-copy {
  max-width: 1180px;
  margin: 0 auto;

  color: #b8c2d0;

  font-size: clamp(1.08rem, 1.45vw, 1.25rem);
  line-height: 1.8;
  text-align: center;
}

.hero-card {
  min-height: auto;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero-card > div {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;

  text-align: center;
}

.hero-card .main-title {
  align-items: center;
}

/* ======================================================================
   CONTENT SECTIONS
====================================================================== */

.visual {
  margin-top: 60px;
  position: relative;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 34px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.section {
  padding: 150px 0;
}

.section-head {
  display: block;
  margin-bottom: 56px;
}

.section h2 {
  margin: 0 0 16px 0;
  font-size: clamp(2.8rem,5vw,5.6rem);
  letter-spacing: -.05em;
  line-height: 1.1;
}

.section-lead {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.1rem;
  margin: 0;
}

.feature-image {
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.section {
  position: relative;
}

.section + .section {
  border-top: 1px solid rgba(255,255,255,.035);
}

.section-head {
  max-width: 1100px;
}

.section h2 {
  max-width: 1200px;
  text-wrap: balance;
}

.section-lead {
  text-wrap: pretty;
}

.feature-image,.visual {
  border-radius: var(--radius-lg);
  padding: 14px;
}

.feature-image img,.visual img {
  border-radius: 24px;
}

.section-card {
  width: min(1380px, calc(100% - 64px));
  margin: 48px auto;
  padding: 64px;
  background: linear-gradient(145deg, rgba(12, 16, 23, 0.94), rgba(7, 10, 15, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52),
  inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.section-card + .section-card {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.section-card .feature-image,
.section-card .visual {
  width: 92%;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  background: rgba(5, 8, 13, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
}

.section-card .feature-image img,
.section-card .visual img {
  width: 100%;
  max-height: 760px;
  object-fit: contain;
  border-radius: 20px;
}

.section-card .section-head {
  margin-bottom: 42px;
}

.section-card {
  position: relative;
  overflow: visible;
  transition: transform .35s ease,
  box-shadow .35s ease,
  border-color .35s ease;
}

.section-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 36px;
  border: 2px solid transparent;
  background: linear-gradient(#000,#000) padding-box,
  linear-gradient(135deg,#ff334f,#37e07c) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box,
  linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: .35s ease;
  pointer-events: none;
}

.section-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 0 35px rgba(255,51,79,.30),
  0 0 65px rgba(55,224,124,.24),
  0 30px 90px rgba(0,0,0,.70);
}

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

/* ======================================================================
   CLINICAL AI DISORDERS
====================================================================== */

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: .6em;
  flex: 0 0 auto;
}

.red-dot {
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.green-dot {
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.disorders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.disorders-grid .disorder-card:nth-child(4) {
  grid-column: 1 / 2;
  grid-row: 2;
  transform: translateX(50%);
}

.disorders-grid .disorder-card:nth-child(5) {
  grid-column: 2 / 3;
  grid-row: 2;
  transform: translateX(50%);
}

.disorder-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.disorder-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  box-shadow: 0 0 20px 2px var(--red), 0 0 10px 1px var(--red);
}

.disorder-card.green-glow::before {
  background: var(--green);
  box-shadow: 0 0 20px 2px var(--green), 0 0 10px 1px var(--green);
}

.disorder-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.disorder-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.feature-image,
.visual,
.disorder-card,
.comparison-col,
.phase-card {
  background: var(--panel-glass);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-premium);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.feature-image:hover,
.visual:hover,
.disorder-card:hover,
.comparison-col:hover,
.phase-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 30px 90px rgba(0,0,0,.55),
  0 28px 55px rgba(255,51,79,.12),
  0 42px 80px rgba(55,224,124,.10);
}

.disorders-grid {
  gap: 28px;
}

.disorder-card {
  min-height: 245px;
  padding: 38px 32px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.disorder-title-wrap {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.disorder-desc {
  font-size: 1rem;
  line-height: 1.8;
}

/* ======================================================================
   RESEARCH COMPARISON
====================================================================== */

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  color: #c4cbd5;
}

.clean-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.55;
}

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.comparison-col {
  padding: 40px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.comparison-col::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.comparison-col.current::before {
  background: var(--red);
  box-shadow: 0 0 20px 2px var(--red), 0 0 10px 1px var(--red);
}

.comparison-col.proposed::before {
  background: var(--green);
  box-shadow: 0 0 20px 2px var(--green), 0 0 10px 1px var(--green);
}

.comparison-col h3 {
  margin: 0 0 28px;
  font-size: 1.5rem;
}

.comparison-col.current h3 {
  color: var(--red);
}

.comparison-col.proposed h3 {
  color: var(--green);
}

.comparison {
  gap: 28px;
}

.comparison-col {
  min-height: 430px;
  padding: 50px;
  border-radius: var(--radius-lg);
}

.comparison-col h3 {
  font-size: 1.7rem;
  margin-bottom: 32px;
}

.clean-list {
  gap: 18px;
}

.clean-list li {
  padding: .15rem 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ======================================================================
   CPIP VALIDATION
====================================================================== */

.phase-card {
  position: relative;
  overflow: hidden;
  padding: 50px;
  border-radius: 32px;
  border: 1px solid rgba(55,224,124,.35);
  background: #0d1118;
  box-shadow: var(--shadow);
}

.phase-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green);
  box-shadow: 0 0 25px 3px var(--green), 0 0 12px 2px var(--green);
}

.phase-card h2 {
  margin: 18px 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.phase-code {
  display: inline-flex;
  margin-top: 22px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(55,224,124,.4);
  background: rgba(55,224,124,.12);
  color: var(--green);
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size: .95rem;
  box-shadow: 0 0 10px rgba(55,224,124,.15);
}

.phase-card {
  padding: 62px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 90% 20%, rgba(55,224,124,.08), transparent 28%),
  radial-gradient(circle at 10% 80%, rgba(255,51,79,.07), transparent 24%),
  var(--panel-glass);
}

.phase-card .section-lead {
  max-width: 760px;
}

#cpip.section-card .phase-card {
  box-shadow: none;
}

/* ======================================================================
   FOOTER
====================================================================== */

footer {
  margin-top: 20px;
  padding: 40px 0 50px;
}

/* ======================================================================
   ANIMATIONS
====================================================================== */

@keyframes titleSweep {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0% 50%;
  }
}

/* ======================================================================
RESPONSIVE DESIGN
====================================================================== */


/* ======================================================================
1200PX
====================================================================== */

@media (max-width: 1200px) {

  .shell,
  .nav {
    width: min(100% - 40px, 1480px);
  }

  .comparison-col {
    padding: 42px;
  }
}
/* ======================================================================
1024PX
====================================================================== */

@media (max-width: 1024px) {

  /* ----------------------------------------------------------------------
  SECTIONS
  ---------------------------------------------------------------------- */

  .section {
    padding: 110px 0;
  }

  .section-card {
    width: min(100% - 40px, 1380px);
    padding: 48px 38px;
  }

  .section-card .feature-image,
  .section-card .visual {
    width: 96%;
  }

  /* ----------------------------------------------------------------------
  DISORDERS
  ---------------------------------------------------------------------- */

  .disorders-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .disorders-grid .disorder-card:nth-child(4),
  .disorders-grid .disorder-card:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
    transform: none;
  }

  .disorder-card {
    min-height: 220px;
  }
}


/* ======================================================================
780PX
====================================================================== */

@media (max-width: 780px) {

  /* ----------------------------------------------------------------------
  PAGE WIDTH
  ---------------------------------------------------------------------- */

  .shell {
    width: min(100% - 24px, 1480px);
  }

  /* ----------------------------------------------------------------------
  HEADER AND NAVIGATION
  ---------------------------------------------------------------------- */

  .nav {
    top: 8px !important;

    width: calc(100% - 28px) !important;
    margin: 8px auto 0 !important;

    border-radius: 18px !important;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;

    height: auto !important;
    min-height: 68px;
    padding: 12px !important;
  }

  .nav .project-return {
    align-self: flex-start;
  }

  .nav-links {
    display: flex !important;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px !important;

    width: 100%;
    margin-left: 0;
    padding: 2px 0 4px;

    overflow-x: auto;

    font-size: 0.76rem !important;

    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;

    padding: 8px 12px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.045);
  }

  .nav-links a::after {
    display: none !important;
  }

  /* ----------------------------------------------------------------------
  HERO
  ---------------------------------------------------------------------- */

  .hero {
    min-height: auto !important;
    padding: 40px 0 34px !important;
  }

  .hero-card {
    padding-top: 38px !important;
    padding-bottom: 38px !important;
  }

  /* ----------------------------------------------------------------------
  SECTIONS AND CARDS
  ---------------------------------------------------------------------- */

  .section {
    padding: 84px 0;
  }

  .section-card {
    width: calc(100% - 24px);
    margin: 24px auto;
    padding: 34px 22px;

    border-radius: 24px;
  }

  .section-card .feature-image,
  .section-card .visual {
    width: 100%;
    padding: 8px;

    border-radius: 20px;
  }

  .feature-image,
  .visual {
    padding: 8px;

    border-radius: 24px;
  }

  /* ----------------------------------------------------------------------
  DISORDERS AND COMPARISON
  ---------------------------------------------------------------------- */

  .disorders-grid,
  .comparison {
    grid-template-columns: 1fr;
  }

  .disorders-grid .disorder-card:nth-child(4),
  .disorders-grid .disorder-card:nth-child(5) {
    transform: none;
  }

  .comparison-col,
  .phase-card {
    padding: 30px 24px;
  }
}


/* ======================================================================
640PX
====================================================================== */

@media (max-width: 640px) {

  /* ----------------------------------------------------------------------
  RETURN BUTTON
  ---------------------------------------------------------------------- */

  .project-return {
    margin: 0 !important;
    padding: 10px 14px !important;

    font-size: 0.78rem !important;
    line-height: 1.25;
  }

  /* ----------------------------------------------------------------------
  HERO TITLE
  ---------------------------------------------------------------------- */

  .hero-card .main-title {
    font-size: clamp(2.35rem, 11vw, 3.4rem) !important;
    line-height: 1.02 !important;
  }
}

/* ==========================================================================
TOUCH DEVICES
Keep borders visible when hover is unavailable.
========================================================================== */

@media (hover: none) and (pointer: coarse) {

  .glass-panel,
  .project-card,
  .module-card,
  .feature-card,
  .article-card,
  .cert-card,
  .comparison-col,
  .phase-card,
  .visual,
  .feature-image,
  .page-return,
  .project-return,
  .back-btn,
  .back-link,
  .back-home-btn,
  .return-btn,
  .theme-btn,
  .nav-links a {
    border-color: rgba(255,255,255,.18) !important;
  }

}