/* home.css — layout and styles for index.html only. */

.home {
  --h-bg: #06080a;
  --h-panel: #0d1114;
  --h-line: rgba(255, 255, 255, 0.08);
  --h-text: #e9eef0;
  --h-dim: #9aa6ac;
  --h-green: #27a776;
  --h-teal: #2bb7c4;
  --h-violet: #8b7cf6;
  background:
    radial-gradient(900px 500px at 90% 0%, rgba(43, 183, 196, 0.10), transparent 60%),
    radial-gradient(800px 500px at 0% 20%, rgba(39, 167, 118, 0.10), transparent 60%),
    var(--h-bg);
  color: var(--h-text);
}

.h-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.h-section { padding: 72px 0; }
.h-section-alt { background: rgba(255, 255, 255, 0.02); border-block: 1px solid var(--h-line); }

.h-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7fe0b8;
}
.h-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--h-green);
  box-shadow: 0 0 0 4px rgba(39, 167, 118, 0.25);
}

.h-head { margin-bottom: 28px; }
.h-head h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  color: #fff;
  margin: 6px 0 8px;
}
.h-head p { color: var(--h-dim); margin: 0; max-width: 640px; }
.h-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.h-link { font-weight: 600; color: #7fe0b8; white-space: nowrap; }
.h-link:hover { color: #fff; }

/* ---------------- Hero ---------------- */
.h-hero { padding: 110px 0 40px; position: relative; overflow: hidden; }
.h-hero .new-pub-alert { max-width: none; margin-bottom: 30px; }
.h-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.h-title {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
  margin: 18px 0 20px;
}
.h-grad {
  background: linear-gradient(90deg, var(--h-green), var(--h-teal) 55%, var(--h-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h-lead { font-size: clamp(17px, 1.6vw, 20px); color: #c4cfd3; max-width: 560px; line-height: 1.6; margin: 0 0 28px; }
.h-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.h-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.2s, color 0.2s, border-color 0.2s;
}
.h-btn:hover { transform: translateY(-1px); }
.h-btn-primary { background: var(--h-green); color: #fff; box-shadow: 0 8px 24px rgba(39, 167, 118, 0.35); }
.h-btn-primary:hover { background: #2fc489; color: #fff; }
.h-btn-ghost { border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }
.h-btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }

.h-hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 520px;
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--h-line);
  background:
    radial-gradient(circle at 50% 50%, rgba(39, 167, 118, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  overflow: hidden;
}
.h-hero-visual::after { /* subtle grid, like a microscope reticle */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
#vesicle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.h-visual-caption {
  position: absolute; left: 16px; bottom: 14px; right: 16px;
  font-size: 12px; color: var(--h-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  z-index: 1;
}

.h-stats {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--h-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
.h-stats > div { padding: 22px 24px; border-left: 1px solid var(--h-line); }
.h-stats > div:first-child { border-left: 0; }
.h-stats dt { font-family: var(--font-primary); font-size: 38px; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; }
.h-stats dd { margin: 8px 0 0; color: var(--h-dim); font-size: 14px; }

/* ---------------- Research topics ---------------- */
.h-topics {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.h-topics li {
  position: relative;
  background: var(--h-panel);
  border: 1px solid var(--h-line);
  border-radius: 18px;
  padding: 22px 20px 24px;
  min-height: 170px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  overflow: hidden;
}
.h-topics li:hover { border-color: rgba(39, 167, 118, 0.6); transform: translateY(-3px); background: #10171a; }
.h-topics li > i {
  position: absolute; top: 20px; left: 20px;
  font-size: 22px; color: #7fe0b8;
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(39, 167, 118, 0.12);
}
.h-num { position: absolute; top: 22px; right: 20px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #5d6a70; }
.h-topics h3 { font-family: var(--font-primary); font-size: 17px; font-weight: 600; line-height: 1.35; color: #fff; margin: 0; }
.h-topic-cta { padding: 0 !important; background: linear-gradient(135deg, #17694b, #1d8c84) !important; border-color: transparent !important; }
.h-topic-cta a {
  display: flex; height: 100%; min-height: 170px;
  padding: 22px 20px; color: #fff;
  justify-content: space-between; align-items: flex-end;
  font-family: var(--font-primary); font-weight: 700; font-size: 20px;
}
.h-topic-cta a i { font-size: 26px; transition: transform 0.2s; }
.h-topic-cta a:hover { color: #fff; }
.h-topic-cta a:hover i { transform: translate(3px, -3px); }

/* ---------------- What's new ---------------- */
.h-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
.h-latest { display: flex; flex-direction: column; gap: 12px; }
.h-paper {
  display: block;
  background: var(--h-panel);
  border: 1px solid var(--h-line);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--h-text);
  transition: border-color 0.2s, transform 0.2s;
}
a.h-paper:hover { border-color: rgba(39, 167, 118, 0.6); transform: translateX(3px); color: var(--h-text); }
.h-paper-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--h-dim); margin-bottom: 8px; }
.h-paper h3 { font-family: var(--font-primary); font-size: 17px; font-weight: 600; line-height: 1.4; color: #fff; margin: 0 0 6px; }
.h-paper p { margin: 0; font-size: 14px; color: var(--h-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.h-news { list-style: none; margin: 0; padding: 0 6px 0 0; max-height: 430px; overflow-y: auto; scrollbar-width: thin; }
.h-news li {
  position: relative;
  padding: 0 0 20px 26px;
  border-left: 1px solid rgba(39, 167, 118, 0.35);
}
.h-news li:last-child { padding-bottom: 0; }
.h-news li::before {
  content: "";
  position: absolute; left: -6px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--h-bg);
  border: 2px solid var(--h-green);
}
.h-news li:first-child::before { background: var(--h-green); box-shadow: 0 0 0 4px rgba(39, 167, 118, 0.25); }
.h-news-when { display: block; font-size: 13px; font-weight: 600; color: #7fe0b8; margin-bottom: 3px; }
.h-news-what { color: var(--h-text); }

/* ---------------- Highlights strip ---------------- */
.h-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 32%);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.h-strip .hl-item {
  scroll-snap-align: start;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--h-line);
}
.h-strip .hl-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s ease; }
.h-strip .hl-item:hover img { transform: scale(1.04); }
.h-strip-nav { display: flex; gap: 8px; }
.h-strip-nav button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent; color: #fff; font-size: 18px;
}
.h-strip-nav button:hover { background: #fff; color: #000; }

/* ---------------- People ---------------- */
.h-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
}
.h-person { text-align: center; color: var(--h-text); }
.h-person img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--h-line);
  transition: border-color 0.2s, transform 0.2s;
  margin-bottom: 10px;
  background: var(--h-panel);
}
.h-person:hover img { border-color: var(--h-green); transform: scale(1.03); }
.h-person-name { display: block; font-weight: 600; color: #fff; font-size: 15px; }
.h-person-role { display: block; font-size: 13px; color: var(--h-dim); }

/* ---------------- Explore ---------------- */
.h-explore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.h-explore a {
  position: relative;
  display: block;
  background: var(--h-panel);
  border: 1px solid var(--h-line);
  border-radius: 18px;
  padding: 24px 22px;
  color: var(--h-text);
  transition: border-color 0.2s, transform 0.2s;
}
.h-explore a:hover { border-color: rgba(39, 167, 118, 0.6); transform: translateY(-3px); color: var(--h-text); }
.h-explore a > i { font-size: 26px; color: #7fe0b8; }
.h-explore h3 { font-family: var(--font-primary); font-size: 18px; font-weight: 700; color: #fff; margin: 16px 0 6px; }
.h-explore p { font-size: 14px; color: var(--h-dim); margin: 0; }
.h-arrow { position: absolute; top: 22px; right: 20px; color: var(--h-dim); transition: transform 0.2s, color 0.2s; }
.h-explore a:hover .h-arrow { transform: translate(3px, -3px); color: #fff; }

/* ---------------- Connect ---------------- */
.h-connect { background: linear-gradient(180deg, rgba(39, 167, 118, 0.06), transparent); border-top: 1px solid var(--h-line); }
.h-connect-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.h-connect h2 { font-family: var(--font-primary); font-weight: 700; font-size: 30px; color: #fff; margin: 6px 0 18px; letter-spacing: -0.02em; }
.h-connect h3 { font-family: var(--font-primary); font-size: 16px; font-weight: 700; color: #fff; margin: 4px 0 14px; }
.h-connect h3 i { color: #7fe0b8; margin-right: 6px; }
.h-connect ul { list-style: none; padding: 0; margin: 0; }
.h-connect li { color: var(--h-dim); font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--h-line); }
.h-connect li a { color: var(--h-text); font-weight: 600; }
.h-connect li a:hover { color: #7fe0b8; }
.h-follow { display: flex; flex-wrap: wrap; gap: 10px; }
.h-follow a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 14px; font-weight: 500;
}
.h-follow a:hover { background: #fff; color: #000; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .h-topics, .h-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-connect-grid { grid-template-columns: 1fr 1fr; }
  .h-connect-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .h-hero-grid, .h-split { grid-template-columns: 1fr; }
  .h-hero-visual { aspect-ratio: 16 / 10; max-height: 360px; }
  .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-stats > div:nth-child(3) { border-left: 0; }
  .h-stats > div:nth-child(n+3) { border-top: 1px solid var(--h-line); }
}
@media (max-width: 560px) {
  .h-wrap { padding: 0 16px; }
  .h-section { padding: 52px 0; }
  .h-hero { padding-top: 96px; }
  .h-topics, .h-explore, .h-connect-grid { grid-template-columns: 1fr; }
  .h-topics li { min-height: 130px; }
  .h-topic-cta a { min-height: 90px; }
  .h-strip { grid-auto-columns: 85%; }
  .h-people { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .h-person-name { font-size: 13px; }
  .h-person-role { display: none; }
  .h-stats dt { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .h-topics li, .h-explore a, .h-paper, .h-btn, .h-person img { transition: none; }
}

/* ---------------- Scroll reveal (only when JS has marked the page ready) ---------------- */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-ready [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 560px) {
  .h-topics li { min-height: 0; justify-content: flex-start; padding: 18px; }
  .h-topics li > i { position: static; }
}
