/* ============================================================
   JAIN Lab — Shared Stylesheet
   RNA Structural Biology | NMR Spectroscopy
   ============================================================ */

:root {
  --navy: #0b2d4d;
  --navy-2: #12355b;
  --deep: #071f3a;
  --accent: #2f8fa8;
  --accent-dark: #1f6f86;
  --bg: #f5f8fb;
  --card: #ffffff;
  --soft: #eef6f8;
  --line: #e2e8f0;
  --text: #1f2933;
  --muted: #52606d;
  --shadow: 0 10px 30px rgba(11, 45, 77, 0.08);
  --shadow-hover: 0 18px 40px rgba(11, 45, 77, 0.16);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, Helvetica, sans-serif;
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
  color: var(--navy);
  line-height: 1.25;
}

a {
  color: var(--accent-dark);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--navy);
}

img {
  max-width: 100%;
}

/* -------------------- HEADER / NAV -------------------- */

.top-header {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  padding: 14px 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(11, 45, 77, 0.04);
}

.top-header .logo img {
  height: 108px;
  width: auto;
  display: block;
}

.navbar {
  font-size: 15px;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.navbar a {
  color: var(--navy-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.navbar a:hover {
  color: var(--accent-dark);
}

.navbar a:hover::after,
.navbar a.active::after {
  transform: scaleX(1);
}

.navbar a.active {
  color: var(--accent-dark);
  font-weight: 600;
}

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

.hero {
  background-image: linear-gradient(rgba(7, 31, 58, 0.78), rgba(7, 31, 58, 0.72)), url('nmr-background.jpeg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 130px 70px;
}

.hero h1 {
  margin: 0 0 18px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}

/* "Jain" and "Lab" — same elegant white script, matching the logo lettering */
.hero h1 .script,
.hero h1 .lab {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(70px, 12vw, 128px);
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.45);
}

.hero h1 .lab {
  margin-left: 12px;
}

/* Only "Jain Lab" inside the welcome heading uses the script; text stays navy */
.script-name {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 1.35em;
}

.hero h2 {
  font-size: 26px;
  font-weight: 400;
  color: #d7e6f2;
  margin: 0 0 22px;
}

.hero p {
  font-size: 21px;
  max-width: 850px;
  line-height: 1.75;
  color: #eaf2f9;
}

/* Compact hero for interior pages */

.page-hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, var(--accent-dark) 130%);
  color: white;
  padding: 66px 70px 58px;
}

.page-hero h1 {
  color: white;
  font-size: 42px;
  margin: 0 0 10px;
}

.page-hero p {
  color: #d7e6f2;
  font-size: 19px;
  max-width: 900px;
  margin: 0;
}

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

.section {
  padding: 60px 70px;
}

.section.white {
  background: var(--card);
}

.section-title {
  font-size: 30px;
  margin: 0 0 8px;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
  margin-top: 10px;
}

.main-layout {
  display: flex;
  gap: 40px;
  padding: 65px 70px;
  background-color: var(--card);
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* -------------------- WELCOME / PROFILE -------------------- */

.profile {
  display: flex;
  gap: 38px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-photo {
  width: 320px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

/* Rotating molecular structure that replaces the homepage photo */
.profile-structure {
  width: clamp(360px, 38vw, 640px);
  aspect-ratio: 5 / 5;
  object-fit: cover;
  object-position: center;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  background: #ffffff;
  display: block;
}

/* Keep structure left + text right on desktop; stack only on narrower screens */
@media screen and (max-width: 1100px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }
  .profile-structure {
    width: 100%;
    max-width: 480px;
  }
}

.profile-text {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}

.profile-text h2 {
  color: var(--navy);
  margin-top: 0;
}

/* -------------------- NEWS SIDEBAR -------------------- */

.news-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--soft), #ffffff);
  border-top: 5px solid var(--accent);
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}

.news-sidebar h2 {
  margin-top: 0;
  color: var(--navy);
  font-size: 22px;
}

.news-item {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d5e6ee;
}

.news-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.news-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--navy);
}

.news-item p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  color: var(--muted);
}

/* -------------------- CARDS -------------------- */

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 28px;
}

.research-card {
  background: var(--card);
  padding: 28px;
  width: 285px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.research-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--navy-2));
}

.research-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.research-card h3 {
  margin-top: 6px;
  color: var(--navy);
}

.research-card p {
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 0;
}

/* -------------------- PEOPLE / MEMBER CARDS -------------------- */

.people-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 26px;
}

.member-card {
  width: 230px;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 26px 20px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.member-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.member-card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--soft);
  box-shadow: 0 6px 18px rgba(11, 45, 77, 0.15);
}

.member-card h3 {
  margin: 16px 0 6px;
  font-size: 18px;
  color: var(--navy);
}

.member-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* -------------------- GALLERY (recreation) -------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.gallery-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.gallery-card .photo {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.gallery-card .caption {
  padding: 20px 22px 24px;
}

.gallery-card .caption h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--navy);
}

.gallery-card .caption p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* -------------------- PUBLICATIONS -------------------- */

.pub-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 22px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pub-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.pub-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.pub-item .authors {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 6px;
}

.pub-item .venue {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

/* -------------------- BUTTONS -------------------- */

.btn {
  display: inline-block;
  background: var(--navy-2);
  color: white !important;
  padding: 12px 26px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--navy-2);
  color: var(--navy-2) !important;
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--navy-2);
  color: white !important;
}

/* -------------------- CONTACT -------------------- */

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 30px;
}

.contact-card {
  flex: 1;
  min-width: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 32px;
}

.contact-card h3 {
  margin-top: 0;
  color: var(--navy);
}

.contact-card p {
  color: var(--muted);
  line-height: 1.8;
}

.social-links a {
  display: inline-block;
  margin-right: 14px;
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 24px;
  background: var(--soft);
  color: var(--navy-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: var(--navy-2);
  color: white;
}

/* Social links inside the dark footer: blend with the navy background */
.footer .social-links a {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.footer .social-links a:hover {
  background: #ffffff;
  color: var(--navy);
  text-decoration: none;
}

/* -------------------- FOOTER -------------------- */

.footer {
  background-color: var(--navy);
  color: #d7e6f2;
  padding: 46px 70px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 45px;
}

.footer h2 {
  color: white;
  font-size: 20px;
  margin-top: 0;
}

.footer a {
  color: #cfe0ef;
  text-decoration: none;
}

.footer a:hover {
  color: white;
  text-decoration: underline;
}

.footer .links a {
  display: block;
  padding: 4px 0;
}

.copyright {
  background-color: var(--deep);
  color: #cfe0ef;
  padding: 16px;
  text-align: center;
  font-size: 14px;
}

/* -------------------- REVEAL ANIMATION -------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------- RESPONSIVE -------------------- */

@media screen and (max-width: 900px) {
  .top-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
  }

  .navbar {
    justify-content: center;
  }

  .hero {
    padding: 90px 28px;
  }

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

  .hero h2 {
    font-size: 21px;
  }

  .hero p {
    font-size: 18px;
  }

  .page-hero,
  .section,
  .main-layout,
  .footer {
    padding-left: 26px;
    padding-right: 26px;
  }

  .main-layout {
    flex-direction: column;
  }

  .news-sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }

  .profile {
    justify-content: center;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }

  .research-card,
  .member-card {
    width: 100%;
  }
}
