@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ──────────────────────────────────────────
   CSS CUSTOM PROPERTIES (Design Tokens)
────────────────────────────────────────── */
:root {
  --background:       hsl(0, 0%, 99%);
  --foreground:       hsl(220, 25%, 10%);
  --card:             hsl(0, 0%, 100%);
  --card-foreground:  hsl(220, 25%, 10%);
  --primary:          hsl(220, 60%, 25%);
  --primary-fg:       hsl(0, 0%, 98%);
  --secondary:        hsl(220, 15%, 95%);
  --muted:            hsl(220, 15%, 96%);
  --muted-fg:         hsl(220, 10%, 45%);
  --border:           hsl(220, 15%, 90%);
  --radius:           0.5rem;
  --coolwarm:         linear-gradient(135deg,
                        hsl(0,80%,55%) 0%,
                        hsl(0,0%,97%) 50%,
                        hsl(220,80%,55%) 100%);
  --shadow-sm:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:        0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg:        0 10px 30px rgba(0,0,0,.12);
  --transition:       all .3s ease;
}

/* ──────────────────────────────────────────
   RESET & BASE
────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ──────────────────────────────────────────
   LAYOUT UTILITIES
────────────────────────────────────────── */
.page-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px)  { .page-container { padding: 0 2rem; } }
@media (min-width: 1024px) { .page-container { padding: 0 3rem; } }

.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mx-auto { margin: 0 auto; }

/* ──────────────────────────────────────────
   GRADIENT DECORATORS
────────────────────────────────────────── */
.gradient-divider {
  height: 3px;
  background: var(--coolwarm);
  width: 100%;
}

/* ──────────────────────────────────────────
   TYPOGRAPHY HELPERS
────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-fg);
  max-width: 42rem;
  line-height: 1.75;
}

.text-primary  { color: var(--primary); }
.text-muted    { color: var(--muted-fg); }

/* ──────────────────────────────────────────
   NAVBAR
────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsla(0,0%,99%,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  transition: opacity .2s;
}
.navbar-brand:hover { opacity: .85; }

.navbar-brand img { height: 2.5rem; width: auto; transition: transform .3s; }
.navbar-brand:hover img { transform: scale(1.05); }

.navbar-brand-text { display: none; }
@media (min-width: 480px) { .navbar-brand-text { display: block; } }

.navbar-brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--foreground);
}
.navbar-brand-sub {
  font-size: .7rem;
  color: var(--muted-fg);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: hsl(220,25%,40%);
  position: relative;
  padding-bottom: 4px;
  transition: color .2s;
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width .3s ease;
}
.nav-link:hover,
.nav-link.active { color: var(--foreground); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  border-radius: var(--radius);
  transition: background .2s;
}
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger:hover { background: var(--muted); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }

.mobile-nav-link {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: background .2s;
}
.mobile-nav-link:hover { background: var(--muted); }
.mobile-nav-link.active { background: var(--primary); color: var(--primary-fg); }

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
.footer {
  background: var(--primary);
  color: var(--primary-fg);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding: 3rem 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3,1fr); } }

.footer-heading { font-size: 1.1rem; font-weight: 600; margin-bottom: .75rem; }
.footer-sub { font-size: .875rem; line-height: 1.75; color: hsla(0,0%,100%,.75); }

.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-link {
  font-size: .875rem;
  color: hsla(0,0%,100%,.75);
  text-decoration: none;
  transition: color .2s;
}
.footer-link:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid hsla(0,0%,100%,.15);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .8rem;
  color: hsla(0,0%,100%,.5);
}

/* ──────────────────────────────────────────
   HERO SECTION (Index)
────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    hsl(220,15%,95%) 0%,
    hsl(0,0%,99%) 50%,
    hsl(220,15%,96%) 100%);
  opacity: .6;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 5rem 1.5rem;
  animation: fadeIn .7s ease-out forwards;
}
.hero-title-img { height: 5rem; width: auto; margin: 0 auto 2rem; }
@media (min-width: 768px) { .hero-title-img { height: 7rem; } }

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}
.hero-org {
  font-size: 1.25rem;
  color: var(--muted-fg);
  margin-bottom: 1.25rem;
}
.hero-tagline {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 500;
  font-style: italic;
  max-width: 36rem;
  margin: 0 auto;
}
.hero-divider {
  position: absolute;
  bottom: 0; left: 0; right: 0;
}

/* ──────────────────────────────────────────
   PAGE HEADER (inner pages)
────────────────────────────────────────── */
.page-header {
  background: var(--secondary);
  padding: 5rem 0 0;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
  animation: fadeIn .6s ease-out forwards;
}
.page-header p {
  font-size: 1.1rem;
  color: var(--muted-fg);
  max-width: 42rem;
  margin: 0 auto 4rem;
  animation: slideUp .6s ease-out forwards;
}

/* ──────────────────────────────────────────
   CARDS
────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  background: var(--muted);
}
.card-placeholder {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--muted));
}
.card-placeholder svg { width: 4rem; height: 4rem; opacity: .35; }
.card-body { padding: 1rem 1.25rem 1.25rem; }
.card-name { font-size: 1rem; font-weight: 600; color: var(--foreground); }
.card-role { font-size: .85rem; color: var(--muted-fg); margin-top: .25rem; }

/* ──────────────────────────────────────────
   MEMBER BADGE (Reading Group)
────────────────────────────────────────── */
.member-badge {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: var(--transition);
  cursor: default;
}
.member-badge:hover {
  border-color: hsl(220,60%,60%);
  box-shadow: var(--shadow-sm);
}
.member-badge.faculty {
  background: hsl(220,60%,97%);
  border-color: hsl(220,60%,85%);
}
.member-badge.faculty:hover { border-color: var(--primary); }

.badge-avatar {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--muted);
}
.badge-avatar img { width: 100%; height: 100%; object-fit: cover; }
.badge-avatar svg { width: 1.25rem; height: 1.25rem; opacity: .5; }
.member-badge.faculty .badge-avatar { background: hsl(220,60%,92%); }
.member-badge.faculty .badge-avatar svg { color: var(--primary); opacity: .8; }

.badge-name { font-size: .9rem; font-weight: 500; color: var(--foreground); }
.member-badge.faculty .badge-name { color: var(--primary); }
.badge-label { font-size: .7rem; color: var(--muted-fg); }

/* ──────────────────────────────────────────
   SECTION HEADING WITH ICON
────────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2rem;
}
.icon-circle {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: hsl(220,60%,90%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-circle svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.section-heading h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
}

/* ──────────────────────────────────────────
   CATEGORY SUB-HEADING (e.g. MS Students)
────────────────────────────────────────── */
.category-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  margin-top: .5rem;
}
.category-heading::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.4rem;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, hsl(220,60%,55%) 100%);
  flex-shrink: 0;
}
.category-heading h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: .01em;
}
.category-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: .25rem;
}

/* ──────────────────────────────────────────
   GRIDS
────────────────────────────────────────── */
.grid-4 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px){ .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.grid-2 {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; } }

/* ──────────────────────────────────────────
   NEWS / EVENTS
────────────────────────────────────────── */
.news-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.news-item:hover { box-shadow: var(--shadow-md); }
.news-icon {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: hsl(220,60%,92%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.news-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.news-title { font-weight: 500; color: var(--foreground); }
.news-date  { font-size: .85rem; color: var(--muted-fg); margin-top: .25rem; }

/* ──────────────────────────────────────────
   CONTACT
────────────────────────────────────────── */
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-icon {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: hsl(220,60%,92%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.contact-label { font-weight: 600; color: var(--foreground); margin-bottom: .35rem; }
.contact-value { color: var(--muted-fg); line-height: 1.8; font-size: .95rem; }
.contact-link { color: var(--primary); text-decoration: none; transition: opacity .2s; }
.contact-link:hover { opacity: .75; text-decoration: underline; }

.map-frame {
  width: 100%; height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ──────────────────────────────────────────
   ABOUT SECTION (Index)
────────────────────────────────────────── */
.about-section {
  padding: 5rem 0;
  background: var(--background);
}
.about-text {
  max-width: 52rem;
  font-size: 1.1rem;
  color: var(--muted-fg);
  line-height: 1.9;
  text-align: center;
  animation: slideUp .6s ease-out forwards;
}
.blockquote-left {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  font-size: .9rem;
  color: var(--muted-fg);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ──────────────────────────────────────────
   LOGO/NAME SECTION (Index)
────────────────────────────────────────── */
.name-section {
  padding: 5rem 0;
  background: var(--secondary);
}
.logo-display {
  display: flex;
  justify-content: center;
  animation: slideUp .6s ease-out forwards;
}
.logo-display img { width: 14rem; height: auto; }
@media (min-width: 768px) { .logo-display img { width: 18rem; } }

/* ──────────────────────────────────────────
   RESEARCH PLACEHOLDER
────────────────────────────────────────── */
.placeholder-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 5rem;
  opacity: .25;
  pointer-events: none;
}
@media (min-width: 768px)  { .placeholder-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .placeholder-grid { grid-template-columns: repeat(3,1fr); } }

.placeholder-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ph-icon-box {
  width: 3rem; height: 3rem;
  background: var(--muted);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.ph-line { height: .75rem; background: var(--muted); border-radius: 4px; }

/* ──────────────────────────────────────────
   GALLERY PLACEHOLDER
────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2,1fr);
  margin-top: 4rem;
  opacity: .18;
  pointer-events: none;
}
@media (min-width: 640px)  { .gallery-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4,1fr); } }

.gallery-cell {
  aspect-ratio: 1;
  background: var(--muted);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.gallery-cell svg { width: 2rem; height: 2rem; opacity: .5; }

/* ──────────────────────────────────────────
   COMING SOON BLOCK
────────────────────────────────────────── */
.coming-soon {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  padding: 6rem 0;
}
.coming-soon-icon {
  width: 5rem; height: 5rem;
  border-radius: 50%;
  background: hsl(220,60%,92%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2rem;
}
.coming-soon-icon svg { width: 2.5rem; height: 2.5rem; color: var(--primary); }
.coming-soon h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}
.coming-soon p { color: var(--muted-fg); line-height: 1.75; }

/* ──────────────────────────────────────────
   ANIMATIONS
────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn .6s ease-out forwards; }
.animate-slide-up { animation: slideUp .6s ease-out forwards; }
.animate-slide-up-delay {
  animation: slideUp .6s ease-out .2s forwards;
  opacity: 0;
}

/* ──────────────────────────────────────────
   SPACING HELPERS
────────────────────────────────────────── */
.py-section  { padding: 4rem 0; }
.mb-section  { margin-bottom: 4rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-4  { margin-bottom: 1rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
