/* =====================================================
   Git & GitHub Workshop 2025 — Iqra University
   Global Stylesheet
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ── MATERIAL ICONS ── */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* ── CSS VARIABLES ── */
:root {
  --bg:               #0e150f;
  --surface:          #161d17;
  --surface-high:     #252c25;
  --surface-highest:  #2f372f;
  --border:           #3d4a3e;
  --outline:          #879486;
  --primary:          #5adf82;
  --primary-dim:      #02a752;
  --primary-dark:     #003917;
  --secondary:        #89ceff;
  --on-surface:       #dde5da;
  --on-muted:         #bccabb;
  --on-faint:         #879486;
  --font-head:        'Poppins', sans-serif;
  --font-body:        'Inter', sans-serif;
  --radius:           12px;
  --radius-lg:        16px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--on-surface);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── GRID BG ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(90,223,130,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90,223,130,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── TOP NAV ── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(14,21,15,0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--on-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a.active,
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { border-bottom: 2px solid var(--primary); padding-bottom: 2px; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 64px; left: 0;
  width: 240px;
  height: calc(100vh - 64px);
  background: rgba(22,29,23,0.6);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary-dark);
}

.sidebar-brand-text h3 {
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--primary);
  line-height: 1.2;
}

.sidebar-brand-text p {
  font-size: 10px;
  color: var(--on-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav { flex: 1; padding: 8px 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s;
  border-right: 3px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--primary);
  background: rgba(90,223,130,0.05);
  transform: translateX(3px);
}

.sidebar-nav a.active {
  color: var(--primary);
  background: rgba(90,223,130,0.08);
  border-right-color: var(--primary);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.student-count-badge {
  font-size: 11px;
  color: var(--on-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.student-count-badge span {
  color: var(--primary);
  font-weight: 600;
}

/* ── MAIN LAYOUT ── */
.main {
  margin-left: 240px;
  padding-top: 64px;
  position: relative;
  z-index: 1;
}

.content { padding: 40px 32px 80px; }

/* ── HERO ── */
.hero {
  position: relative;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(ellipse, rgba(90,223,130,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(90,223,130,0.1);
  border: 1px solid rgba(90,223,130,0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-live-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.hero h1 {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero p {
  font-size: 16px;
  color: var(--on-muted);
  max-width: 520px;
  line-height: 1.6;
}

/* ── SEARCH ── */
.search-wrap {
  position: relative;
  max-width: 500px;
  margin-bottom: 32px;
}

.search-wrap .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--on-faint);
  font-size: 18px;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px 12px 44px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder { color: var(--on-faint); }

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(90,223,130,0.1);
}

.search-count {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--on-faint);
  letter-spacing: 0.04em;
}

/* ── CARD GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── STUDENT CARD ── */
.card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.4s ease both;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(90,223,130,0.15);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* ── AVATAR ── */
.avatar {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.grad-1 { background: linear-gradient(45deg, #5adf82, #004c6e); }
.grad-2 { background: linear-gradient(45deg, #5adf82, #8a1636); }
.grad-3 { background: linear-gradient(45deg, #89ceff, #003113); }
.grad-4 { background: linear-gradient(45deg, #ffb2bb, #02a752); }
.grad-5 { background: linear-gradient(45deg, #ffb347, #004c6e); }
.grad-6 { background: linear-gradient(45deg, #c77dff, #003113); }

.card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.badge-active {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(90,223,130,0.1);
  border: 1px solid rgba(90,223,130,0.2);
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-semester {
  font-size: 9px;
  color: var(--on-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── CARD BODY ── */
.card-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.2;
}

.card-roll {
  font-size: 12px;
  color: var(--on-faint);
  margin-top: 2px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 4px;
}

.tag-primary {
  background: rgba(90,223,130,0.06);
  color: var(--primary);
  border: 1px solid rgba(90,223,130,0.15);
}

.tag-secondary {
  background: rgba(137,206,255,0.06);
  color: var(--secondary);
  border: 1px solid rgba(137,206,255,0.15);
}

/* ── CARD FOOTER ── */
.card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-faint);
  text-decoration: none;
  transition: color 0.2s;
}

.github-link:hover { color: var(--primary); }

.card-index {
  font-size: 10px;
  color: var(--on-faint);
  letter-spacing: 0.06em;
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--on-faint);
}

.empty-state .material-symbols-outlined { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── FOOTER ── */
.footer {
  margin-left: 240px;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.footer p { font-size: 13px; color: var(--on-faint); }

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-faint);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--primary); }

/* ── MOBILE FAB ── */
.fab {
  display: none;
  position: fixed;
  bottom: 24px; right: 24px;
  width: 52px; height: 52px;
  background: var(--primary);
  color: var(--primary-dark);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(90,223,130,0.35);
  transition: transform 0.2s;
  z-index: 200;
}

.fab:active { transform: scale(0.92); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .main, .footer { margin-left: 0; }
  .fab { display: flex; }
}

@media (max-width: 640px) {
  .content { padding: 24px 16px 60px; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 28px; }
  .nav-links { display: none; }
}
