/* ==========================================================================
   MID-SEM MASTER VAULT — ULTRA-PREMIUM FRONTEND STYLESHEET
   Curated by Vagish • KIIT School of Computer Engineering
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  /* Color Palette - Light (Paper / Modern SaaS) */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --border-glass: rgba(226, 232, 240, 0.9);
  --border-card: #e2e8f0;
  --border-card-hover: #cbd5e1;
  
  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --accent-badge: #eff6ff;

  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  /* Subject Accent Colors */
  --cn-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --cn-color: #0284c7;
  --cn-bg: #f0f9ff;
  --cn-border: #bae6fd;

  --daa-gradient: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  --daa-color: #7c3aed;
  --daa-bg: #f5f3ff;
  --daa-border: #ddd6fe;

  --dmdw-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --dmdw-color: #d97706;
  --dmdw-bg: #fffbeb;
  --dmdw-border: #fde68a;

  --hpc-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --hpc-color: #059669;
  --hpc-bg: #ecfdf5;
  --hpc-border: #a7f3d0;
}

[data-theme="dark"] {
  --bg-page: #080c14;
  --bg-card: #0f172a;
  --bg-card-hover: #151f36;
  --bg-input: #131d33;
  --bg-glass: rgba(15, 23, 42, 0.88);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-card: #1e293b;
  --border-card-hover: #334155;
  
  --text-title: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-badge: rgba(59, 130, 246, 0.15);

  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.6);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.7);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.8);

  --cn-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  --cn-color: #38bdf8;
  --cn-bg: rgba(56, 189, 248, 0.12);
  --cn-border: rgba(56, 189, 248, 0.25);

  --daa-gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  --daa-color: #a78bfa;
  --daa-bg: rgba(167, 139, 250, 0.12);
  --daa-border: rgba(167, 139, 250, 0.25);

  --dmdw-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --dmdw-color: #fbbf24;
  --dmdw-bg: rgba(251, 191, 36, 0.12);
  --dmdw-border: rgba(251, 191, 36, 0.25);

  --hpc-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --hpc-color: #34d399;
  --hpc-bg: rgba(52, 211, 153, 0.12);
  --hpc-border: rgba(52, 211, 153, 0.25);
}

[data-theme="sepia"] {
  --bg-page: #f6eedb;
  --bg-card: #fdf7ec;
  --bg-card-hover: #fffdf7;
  --bg-input: #eee3cb;
  --bg-glass: rgba(253, 247, 236, 0.92);
  --border-glass: rgba(216, 199, 168, 0.8);
  --border-card: #e5d6bc;
  --border-card-hover: #d1c0a3;
  
  --text-title: #362614;
  --text-body: #59442b;
  --text-muted: #7d6547;
  --text-subtle: #a89377;

  --accent-primary: #9c4221;
  --accent-primary-hover: #7c2d12;
  --accent-glow: rgba(156, 66, 33, 0.15);
  --accent-badge: #f7e2d2;

  --shadow-subtle: 0 1px 3px rgba(54,38,20,0.06);
  --shadow-card: 0 4px 6px -1px rgba(54,38,20,0.05);
  --shadow-hover: 0 12px 24px -4px rgba(54,38,20,0.1);
  --shadow-modal: 0 25px 50px -12px rgba(54,38,20,0.3);

  --cn-gradient: linear-gradient(135deg, #1e708f 0%, #135269 100%);
  --cn-color: #1e708f;
  --cn-bg: #e4eff3;
  --cn-border: #bcd5de;

  --daa-gradient: linear-gradient(135deg, #6b3e8e 0%, #50276d 100%);
  --daa-color: #6b3e8e;
  --daa-bg: #ede4f5;
  --daa-border: #d4c2e5;

  --dmdw-gradient: linear-gradient(135deg, #a6620f 0%, #824905 100%);
  --dmdw-color: #a6620f;
  --dmdw-bg: #faedd9;
  --dmdw-border: #ebd0a8;

  --hpc-gradient: linear-gradient(135deg, #24754c 0%, #155734 100%);
  --hpc-color: #24754c;
  --hpc-bg: #e2f2e9;
  --hpc-border: #b8dec8;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-body);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-page);
}

/* Background Ambient Mesh Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 1400px;
  height: 500px;
  background: radial-gradient(circle at 50% -20%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 0;
  transition: all 0.2s ease;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-title);
}

.brand-symbol {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-badge);
  color: var(--accent-primary);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab-link {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-tab-link:hover {
  color: var(--text-title);
  background: var(--bg-input);
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-title);
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-subtle);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff !important;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: var(--radius-xs);
}

.btn-icon {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: var(--radius-sm);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  padding: 3.5rem 0 2rem 0;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-body);
  box-shadow: var(--shadow-subtle);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  color: var(--text-title);
}

.hero-title-highlight {
  background: linear-gradient(135deg, var(--text-title) 20%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem auto;
  line-height: 1.55;
}

/* Bento Stats Grid */
.bento-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.bento-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  text-align: left;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

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

.bento-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.bento-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.bento-stat-icon {
  color: var(--accent-primary);
}

.bento-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.03em;
}

.bento-stat-desc {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.2rem;
}

/* ==========================================================================
   SEARCH & FILTERS
   ========================================================================== */

.search-command-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--text-subtle);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.9rem 3.5rem 0.9rem 3.2rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 500;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-title);
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-kbd-badge {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-card);
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  color: var(--text-title);
  border-color: var(--border-card-hover);
}

.filter-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ==========================================================================
   SUBJECT SECTIONS & DOCUMENT CARDS
   ========================================================================== */

.subject-feed {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-bottom: 4rem;
}

.subject-block {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.subject-block:hover {
  box-shadow: var(--shadow-hover);
}

.subject-head {
  padding: 1.35rem 1.75rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.subject-meta-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.subject-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: var(--shadow-subtle);
  flex-shrink: 0;
}

.subj-cn .subject-avatar { background: var(--cn-bg); color: var(--cn-color); border: 1px solid var(--cn-border); }
.subj-daa .subject-avatar { background: var(--daa-bg); color: var(--daa-color); border: 1px solid var(--daa-border); }
.subj-dmdw .subject-avatar { background: var(--dmdw-bg); color: var(--dmdw-color); border: 1px solid var(--dmdw-border); }
.subj-hpc .subject-avatar { background: var(--hpc-bg); color: var(--hpc-color); border: 1px solid var(--hpc-border); }

.subject-title-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-title);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subject-code-tag {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-card);
}

.subject-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.45;
}

.subject-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Document Cards Grid */
.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.85rem;
  padding: 1.5rem 1.75rem;
}

.doc-tile {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.doc-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.doc-tile-top {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.doc-tile-icon {
  color: var(--accent-primary);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.doc-tile-title {
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-title);
  letter-spacing: -0.01em;
}

.doc-tile-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.category-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

.filesize-label {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.doc-tile-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.doc-tile-actions .btn {
  flex: 1;
}

/* ==========================================================================
   IMMERSIVE FULLSCREEN READER CANVAS & MODALS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

/* Fullscreen Immersive Reader Canvas */
#reader-modal.modal-backdrop {
  padding: 0 !important;
  background: var(--bg-page) !important;
  backdrop-filter: none !important;
  z-index: 9999;
}

#reader-modal .modal-container {
  background: var(--bg-page);
  border: none;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  overflow: hidden;
}

.modal-navbar {
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  height: 3.5rem;
}

.modal-title-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.modal-content-frame {
  flex: 1;
  width: 100vw;
  height: calc(100vh - 3.5rem);
  border: none;
  background: var(--bg-page);
}

/* ==========================================================================
   VISITOR TELEMETRY DASHBOARD MODAL
   ========================================================================== */

.telemetry-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 850px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.telemetry-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.visitor-log-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.825rem;
}

.visitor-log-table th,
.visitor-log-table td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-card);
  text-align: left;
}

.visitor-log-table th {
  background: var(--bg-input);
  font-weight: 700;
  color: var(--text-title);
}

.visitor-ip-badge {
  font-family: var(--font-code);
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-badge);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--accent-glow);
}

/* ==========================================================================
   ZIP DOWNLOAD PROGRESS TOAST
   ========================================================================== */

.zip-toast-box {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
  box-shadow: var(--shadow-modal);
  z-index: 2000;
  display: none;
  min-width: 300px;
}

.zip-toast-box.active {
  display: block;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.zip-track-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  margin-top: 0.65rem;
  overflow: hidden;
}

.zip-track-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  transition: width 0.15s ease;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-card);
  background: var(--bg-card);
  padding: 3rem 0 2.5rem 0;
  text-align: center;
}

.footer-author-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-author-text strong {
  color: var(--text-title);
  font-weight: 700;
}

.footer-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.footer-badge-pill:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-subtle);
}

.footer-counter-val {
  font-weight: 800;
  color: var(--accent-primary);
  font-family: var(--font-code);
}

/* ==========================================================================
   MEDIA QUERIES (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 900px) {
  .bento-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }
  .bento-stats {
    grid-template-columns: 1fr;
  }
  .subject-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .subject-head-actions {
    width: 100%;
  }
  .subject-head-actions .btn {
    flex: 1;
  }
  .doc-card-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .btn-hide-mobile {
    display: none;
  }
}
