/* ==========================================================
   Student Activities — ISI Bangalore
   ----------------------------------------------------------
   THEME VARIABLES: edit the values below to re-theme the
   whole page (colours, fonts, spacing). Nothing else in this
   file should need to change for routine style tweaks.
   ========================================================== */
:root {
  /* Colours — echo of the ISI Bangalore site: institutional
     blue + the maroon used under the masthead. */
  --isi-blue:        #1f4e8c;   /* headers, links, nav bar   */
  --isi-blue-dark:   #163a68;   /* nav hover, footer band    */
  --isi-blue-tint:   #eef3f9;   /* subtle section background */
  --isi-maroon:      #8a1f2d;   /* accents, badges, rules    */
  --isi-gold:        #b98a2f;   /* rare accent (badges)      */
  --text:            #22262b;
  --text-muted:      #5a6472;
  --card-bg:         #ffffff;
  --card-border:     #d8e0ea;
  --page-bg:         #f7f9fc;

  /* Type */
  --font-serif: Georgia, "Times New Roman", "Nimbus Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max-width: 1100px;
  --radius:    10px;
  --gap:       1.5rem;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
}
a { color: var(--isi-blue); }
a:hover { color: var(--isi-maroon); }
a:focus-visible {
  outline: 3px solid var(--isi-maroon);
  outline-offset: 2px;
  border-radius: 2px;
}
img { max-width: 100%; height: auto; }

/* Placeholder text (to be filled in by the maintainer) —
   shown in a distinct style so unfilled fields are obvious. */
.placeholder { color: var(--isi-maroon); font-style: italic; }

/* ==========================================================
   MASTHEAD — serif institute name + maroon centre line,
   echoing the ISI Bangalore masthead.
   ========================================================== */
.masthead {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
}
.masthead-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.masthead-logo { width: 64px; }
.masthead-institute {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.15;
}
.masthead-centre {
  margin: 0.15rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-style: italic;
  color: var(--isi-maroon);
}

/* Thin solid blue nav strip (modernised version of the
   gradient pill bar on the institute site). */
.topnav {
  background: var(--isi-blue);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  /* Keep the first tab flush with the left edge of the page
     content below, whatever the window width. */
  padding-left: max(1.25rem, calc((100% - var(--max-width)) / 2 + 1.25rem));
}
.topnav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}
.topnav a:first-child { border-left: none; }
.topnav a:hover { background: var(--isi-blue-dark); color: #fff; }

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.intro { padding: 2.5rem 0 0.5rem; }
.intro h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--isi-blue);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--isi-maroon);
}
/* Two text columns that line up with the two-column card grid
   below; stacks to one column on narrow screens. */
.intro-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.intro-text p { margin: 0; }
.intro-lede { font-size: 1.15rem; }
.intro-note { color: var(--text-muted); }

.section { padding-top: 2.5rem; }
.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--isi-blue);
  margin: 0 0 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--card-border);
}
.section-note { color: var(--text-muted); margin-top: -0.5rem; }

/* ==========================================================
   CLUB CARDS
   ========================================================== */
.card-grid {
  display: grid;
  /* Two columns on desktop, one on narrow screens: cards need
     ~420px each, so anything slimmer falls back to one column. */
  grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
  gap: var(--gap);
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--isi-blue);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
@media (hover: hover) {
  .card:hover {
    box-shadow: 0 6px 18px rgba(31, 78, 140, 0.12);
    transform: translateY(-2px);
  }
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}
.card-monogram {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--isi-blue);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  display: grid;
  place-items: center;
}
.card:nth-child(3n+2) .card-monogram { background: var(--isi-maroon); }
.card:nth-child(3n)   .card-monogram { background: var(--isi-gold); }
.card-name { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.card-meta {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-desc { margin: 0 0 1rem; }

.card-people {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  display: grid;
  gap: 0.35rem;
}
.card-people div { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card-people dt {
  font-weight: 600;
  color: var(--text-muted);
  flex: none;
  min-width: 11ch;
}
.card-people dt::after { content: ":"; }
.card-people dd { margin: 0; }

/* Link chips — large enough for touch, clearly labelled. */
.card-links {
  list-style: none;
  margin: auto 0 0;   /* pins chips to the bottom of the card */
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  min-height: 44px;         /* comfortable tap target */
  line-height: 1.9;
  border: 1px solid var(--isi-blue);
  border-radius: 999px;
  color: var(--isi-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.chip:hover {
  background: var(--isi-blue);
  color: #fff;
}
.chip::after { content: " \2197"; }  /* ↗ marks external links */

/* ==========================================================
   EVENTS
   ========================================================== */
.events-month {
  font-family: var(--font-serif);
  color: var(--isi-maroon);
  font-size: 1.1rem;
  margin: 1.75rem 0 0.75rem;
}
.events-list .events-month:first-child { margin-top: 0; }

.event {
  display: flex;
  gap: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--isi-maroon);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.event-date {
  flex: none;
  width: 8ch;
  margin: 0;
  font-weight: 700;
  color: var(--isi-blue);
  line-height: 1.35;
}
.event-title { margin: 0 0 0.2rem; font-size: 1.05rem; }
.event-detail { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.event-link { margin: 0.35rem 0 0; font-size: 0.95rem; }

/* ==========================================================
   GET LISTED
   ========================================================== */
.get-listed {
  background: var(--isi-blue-tint);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-top: 2.5rem;
}
.get-listed .section-title { border-bottom-color: var(--card-border); }
.get-listed-items { padding-left: 1.25rem; }
.get-listed-items li { margin-bottom: 0.3rem; }
.coordinator {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 1.25rem 0 0;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  background: var(--isi-blue-dark);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 1.5rem 1.25rem;
  font-size: 0.9rem;
}
.footer p { margin: 0.2rem 0; }
.footer .placeholder { color: #f3c969; font-style: italic; }

/* ==========================================================
   SMALL SCREENS
   ========================================================== */
@media (max-width: 640px) {
  .masthead-inner { padding: 1.25rem 1rem 1rem; }
  .topnav { justify-content: flex-start; }
  .topnav a { padding: 0.6rem 0.9rem; font-size: 0.9rem; }
  .card-grid { grid-template-columns: 1fr; }
  .intro-text { grid-template-columns: 1fr; gap: 0.75rem; }
  .event { flex-direction: column; gap: 0.35rem; }
  .event-date { width: auto; }
  .card-people div { flex-direction: column; gap: 0; }
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
