/* DMI — DevOps Micro Internship | dmi.pravinmishra.com */

:root {
  --bg: #ffffff;
  --bg-section: #f7f7f7;
  --bg-card: #ffffff;
  --bg-card2: #f4f4f4;
  --accent: #E8A020;
  --accent-hover: #d4911a;
  --accent-light: rgba(232,160,32,0.1);
  --accent-border: rgba(232,160,32,0.3);
  --text: #0f0f0f;
  --text-muted: #666666;
  --border: #e8e8e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
}

.nav-logo .logo-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.2;
}

.nav-logo .logo-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--bg-card2); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* HERO */
.hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -1.5px;
  color: var(--text);
}

.hero h1 .line-yellow { color: var(--accent); }
.hero h1 .line-teal { color: #3b82f6; }
.hero h1 .line-green { color: #22c55e; }

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }

.stat .num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  letter-spacing: -0.5px;
}

.stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* SECTIONS */
section { padding: 5rem 2rem; }

.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.75px;
  color: var(--text);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* CHAMPION */
.champion-section {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.champion-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.champion-header {
  background: var(--accent);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.champion-header h3 {
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.champion-week {
  background: rgba(255,255,255,0.25);
  color: #fff;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.champion-body {
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.champion-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  background: var(--bg-card2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.champion-info h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.25rem; }

.champion-info .group-tag {
  display: inline-block;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.champion-info .achievement { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

.champion-marks { margin-top: 1rem; display: flex; gap: 1rem; }

.mark-badge {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  text-align: center;
}

.mark-badge .val { font-size: 1.1rem; font-weight: 800; color: var(--accent); display: block; }
.mark-badge .lbl { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

/* LEADERBOARD */
.leaderboard-section { background: var(--bg-section); }

.lb-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.lb-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-family: var(--font);
}

.lb-filter-btn:hover,
.lb-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.lb-loading { text-align: center; padding: 3rem; color: var(--text-muted); }

.lb-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.lb-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

.lb-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.lb-table thead tr { background: var(--bg-card2); }

.lb-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.lb-table td {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.lb-table tbody tr { background: var(--bg-card); transition: background 0.15s; }
.lb-table tbody tr:hover { background: var(--bg-section); }

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-1 { background: #FFD700; color: #5a3e00; }
.rank-2 { background: #d0d0d0; color: #444; }
.rank-3 { background: #e8a87c; color: #5a2e00; }
.rank-other { background: var(--bg-card2); color: var(--text-muted); }

.student-name { font-weight: 600; color: var(--text); }

.group-pill {
  display: inline-block;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.total-marks { font-weight: 800; color: var(--accent); font-size: 1rem; }
.feedback-text { font-size: 0.8rem; color: var(--text-muted); max-width: 200px; }
.lb-empty { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 0.9rem; }

/* GRADUATES */
.graduates-section { background: var(--bg-section); }

.cohort-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.cohort-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 28px;
  border-radius: 100px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  font-family: var(--font);
  box-shadow: var(--shadow);
}

.cohort-tab:hover,
.cohort-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.graduates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.grad-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.grad-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.grad-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent-border);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
}

.grad-avatar img { width: 100%; height: 100%; object-fit: cover; }
.grad-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; color: var(--text); }
.grad-group { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 500; }

.grad-badge {
  display: inline-block;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* FOOTER */
footer {
  background: #0f0f0f;
  border-top: 1px solid #222;
  padding: 2.5rem 2rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
  text-decoration: none;
}

.footer-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

footer p { color: #888; font-size: 0.85rem; margin-bottom: 0.5rem; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* STATS BAR (graduates) */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  user-select: none;
}

.stats-bar .stat .num { font-size: 1.5rem; }

.country-flags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.country-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-family: var(--font);
}

.country-chip:hover,
.country-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .nav-toggle { display: flex; }

  .champion-body { flex-direction: column; text-align: center; }
  .champion-marks { justify-content: center; }
  .hero-stats { gap: 2rem; }

  .lb-table th:nth-child(4),
  .lb-table td:nth-child(4),
  .lb-table th:nth-child(5),
  .lb-table td:nth-child(5) {
    display: none;
  }

  section { padding: 3rem 1.25rem; }
}
