/* ==========================================================================
   Rowan IEEE — Shared Stylesheet
   ========================================================================== */

:root {
  /* Palette */
  --navy-950: #060911;
  --navy-900: #0a0f1f;
  --navy-800: #0e1530;
  --navy-700: #131d42;
  --navy-600: #1b2a56;
  --blue-500: #2f7fd1;
  --blue-400: #5ea3e8;
  --blue-300: #8fc0f5;
  --gold-400: #ffb81c;
  --gold-300: #ffcb5c;
  --teal-400: #2ec4b6;
  --text-primary: #f4f7fc;
  --text-secondary: #aab6d3;
  --text-muted: #7683a3;
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(143, 192, 245, 0.35);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.05);

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --max-width: 1180px;
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --notch: 10px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  animation: page-in 0.35s ease both;
}
body.is-leaving {
  animation: page-out 0.22s ease forwards;
  pointer-events: none;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes page-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-4px); }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.015em;
}
p { margin: 0 0 1em; color: var(--text-secondary); }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Circuit-board texture, kept flat and linear (no glow blobs) so it reads
   as a deliberate technical motif rather than a soft AI-generated hero
   background. Faint enough that it stays out of the way of text. */
.circuit-bg {
  position: relative;
  background-color: var(--navy-950);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%232a3a6b' stroke-width='1.5' opacity='0.4'%3E%3Cpath d='M20 20h60v40h40M120 20v60h60M20 120h40v60h80M180 100v80h40M60 180v40'/%3E%3Ccircle cx='20' cy='20' r='4' fill='%232a3a6b' stroke='none'/%3E%3Ccircle cx='80' cy='60' r='4' fill='%232a3a6b' stroke='none'/%3E%3Ccircle cx='180' cy='100' r='4' fill='%232a3a6b' stroke='none'/%3E%3Ccircle cx='220' cy='180' r='4' fill='%232a3a6b' stroke='none'/%3E%3Ccircle cx='60' cy='220' r='4' fill='%232a3a6b' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- Buttons ----------
   Chamfered (cut-corner) silhouette instead of a rounded pill — a nod to
   PCB pads/connectors, and a deliberate break from the generic rounded
   gradient button look. Flat fills, no drop-shadow, no hover-lift. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .15s ease;
}
.btn:active { opacity: 0.88; }
.btn-primary {
  background: var(--blue-400);
  color: var(--navy-950);
}
.btn-primary:hover { background: var(--blue-300); }
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--blue-400); color: var(--blue-300); }
.btn-gold {
  background: var(--gold-400);
  color: var(--navy-950);
}
.btn-gold:hover { background: var(--gold-300); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 17, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand .torch {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}
.site-footer .brand .torch {
  width: 30px;
  height: 30px;
}
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.28); }
.nav-links a.active { color: var(--blue-300); border-color: var(--blue-400); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  width: 40px;
  height: 40px;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.nav-toggle:hover { border-color: var(--blue-400); color: var(--blue-300); }

@media (max-width: 860px) {
  .nav-cta .btn-primary { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy-900);
    border-bottom: 1px solid var(--border-soft);
    padding: 0 24px;
    gap: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transition: max-height .35s ease, opacity .25s ease, padding .25s ease, visibility .25s ease;
  }
  .site-header.nav-open .nav-links {
    max-height: 360px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 6px 24px 18px;
  }
  .nav-links a {
    padding: 0 4px;
    width: 100%;
    border-bottom: 1px solid var(--border-soft);
    opacity: 0;
    transform: translateY(-6px);
    transition: color .2s ease, border-color .2s ease, opacity .25s ease, transform .25s ease, padding .25s ease;
  }
  .site-header.nav-open .nav-links a {
    padding: 13px 4px;
    opacity: 1;
    transform: none;
  }
  .site-header.nav-open .nav-links a:nth-child(1) { transition-delay: .04s; }
  .site-header.nav-open .nav-links a:nth-child(2) { transition-delay: .07s; }
  .site-header.nav-open .nav-links a:nth-child(3) { transition-delay: .1s; }
  .site-header.nav-open .nav-links a:nth-child(4) { transition-delay: .13s; }
  .site-header.nav-open .nav-links a:nth-child(5) { transition-delay: .16s; }
  .site-header.nav-open .nav-links a:nth-child(6) { transition-delay: .19s; }
}

/* ---------- Hero ---------- */
.hero { padding: 76px 0 64px; text-align: left; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--blue-400);
  color: var(--blue-300);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  margin-bottom: 18px;
}
.hero h1 span { color: var(--blue-400); }
.hero p.lead {
  max-width: 480px;
  margin: 0 0 30px;
  font-size: 1.06rem;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.social-row a:hover {
  color: var(--blue-300);
  border-color: var(--blue-400);
  background: rgba(94, 163, 232, 0.08);
}

/* Spec panel — the "at a glance" block that sits beside the hero on the
   homepage. A bordered fact sheet instead of another row of glowing
   dashboard tiles. */
.spec-panel {
  border: 1px solid var(--border-soft);
  padding: 0;
}
.spec-panel .spec-head {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.spec-row:last-child { border-bottom: none; }
.spec-row .k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.spec-row .v {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: right;
}

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-head { max-width: 600px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 12px;
}
.kicker::before { content: ""; width: 6px; height: 6px; background: var(--teal-400); flex-shrink: 0; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { font-size: 1rem; }
.divider-rule { display: none; }

/* ---------- Stat strip ----------
   A rule-separated fact row instead of boxed gradient tiles. */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.stat-strip div {
  padding: 24px 20px;
  text-align: left;
  border-left: 1px solid var(--border-soft);
}
.stat-strip div:first-child { border-left: none; }
.stat-strip strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--blue-300);
}
.stat-strip span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
@media (max-width: 700px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip div:nth-child(2n+1) { border-left: none; }
  .stat-strip div:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
/* Bento-style grids share a background as the divider lines, which means
   any row left partially filled shows through as a stray block. Card
   counts are chosen to divide evenly at each active column count below;
   .cols-3-tight grids (odd counts of 3) skip the 2-col tablet step
   entirely rather than risk a partial row. */
@media (max-width: 940px) {
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid:not(.cols-2):not(.cols-4):not(.cols-3-tight) { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid, .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .card-grid.cols-3-tight { grid-template-columns: 1fr; }
}

.card {
  background: var(--navy-950);
  padding: 30px 26px;
  transition: background .25s ease;
}
.card:hover { background: var(--navy-900); }
.card .index-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: block;
}
.card .icon-badge {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--blue-300);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { font-size: 0.93rem; margin-bottom: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: transparent;
}
.tag-blue { color: var(--blue-300); border-color: rgba(94,163,232,0.4); }
.tag-gold { color: var(--gold-300); border-color: rgba(255,184,28,0.4); }
.tag-teal { color: var(--teal-400); border-color: rgba(46,196,182,0.4); }

/* ---------- Placeholder media block ----------
   Used everywhere a real club photo should eventually go. Clearly marked
   so the webmaster knows exactly what to swap and how — see README. */
.media-placeholder {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--border-strong);
  background:
    repeating-linear-gradient(135deg, rgba(94,163,232,0.05) 0 10px, transparent 10px 20px),
    var(--navy-900);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  gap: 8px;
}
.media-placeholder svg { color: var(--blue-400); opacity: 0.7; }
.media-placeholder .ph-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.media-placeholder .ph-hint {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}

/* ---------- Feature / split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Timeline (events page) ---------- */
.timeline { border-left: 1px solid var(--border-soft); padding-left: 30px; display: flex; flex-direction: column; gap: 38px; margin-left: 4px; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 5px;
  width: 8px;
  height: 8px;
  background: var(--blue-400);
}
.timeline-item h3 { margin-bottom: 4px; }
.timeline-item .meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted); margin-bottom: 10px; }

/* ---------- Spotlight (featured event / hackathon banner) ----------
   Flat panel with PCB-style corner registration marks instead of a
   gradient fill and radial glow. */
.spotlight {
  position: relative;
  padding: 44px;
  background: var(--navy-900);
  border: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
}
.spotlight::before, .spotlight::after,
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.spotlight::before, .cta-banner::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--blue-400);
  border-left: 2px solid var(--blue-400);
}
.spotlight::after, .cta-banner::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--gold-400);
  border-right: 2px solid var(--gold-400);
}
@media (max-width: 860px) { .spotlight { grid-template-columns: 1fr; padding: 30px; } }

/* ---------- Team ---------- */
.person-card { text-align: left; padding: 30px 26px; }
.avatar {
  width: 88px;
  height: 88px;
  border: 1px solid var(--border-strong);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--blue-300);
  background: var(--navy-900);
}
.person-card h3 { margin-bottom: 2px; }
.person-card .role {
  font-family: var(--font-mono);
  color: var(--gold-300);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.person-card a.email {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-word;
}
.person-card a.email:hover { color: var(--blue-300); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-soft); border: 1px solid var(--border-soft); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .media-placeholder { aspect-ratio: 1 / 1; border: none; }
.gallery-grid img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Real photos replacing .media-placeholder / .avatar blocks */
.media-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border-soft);
  background: var(--navy-900);
}
.spotlight .media-photo { aspect-ratio: 4 / 3; }
.person-card img.avatar {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  margin: 0 0 18px;
  display: block;
  background: var(--navy-900);
}

/* ---------- Forms ---------- */
.form-card { border: 1px solid var(--border-soft); padding: 34px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 9px;
  color: var(--text-secondary);
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  background: var(--navy-900);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  background: var(--navy-800);
}
.form-note { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); margin-top: 12px; }
#form-status {
  font-size: 0.88rem;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(4px);
  max-height: 0;
  overflow: hidden;
  transition: opacity .25s ease, transform .25s ease, max-height .25s ease;
}
#form-status.show {
  opacity: 1;
  transform: none;
  max-height: 80px;
}

/* ---------- Info list (contact page location card) ---------- */
.info-card {
  border: 1px solid var(--border-soft);
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: -1px;
}
.info-card .icon-badge { margin-bottom: 0; flex-shrink: 0; }
.info-card h3 { font-size: 1rem; margin-bottom: 4px; }
.info-card p { margin-bottom: 0; font-size: 0.92rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  padding: 56px 40px;
  text-align: center;
  background: var(--navy-900);
  border: 1px solid var(--border-soft);
}
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p { max-width: 480px; margin: 0 auto 26px; }
.cta-banner .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color .2s ease;
}
.footer-grid ul li a:hover { color: var(--blue-300); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* Soften motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body,
  body.is-leaving {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
