/* ============================================================
   components.css — reusable UI components
   ============================================================ */

/* ── Marquee Ticker ─────────────────────────────────────────── */
.marquee-ticker {
  width: 100%;
  background: linear-gradient(90deg, rgba(34,211,238,0.06) 0%, rgba(167,139,250,0.06) 100%);
  border-top: 1px solid rgba(34,211,238,0.12);
  border-bottom: 1px solid rgba(34,211,238,0.12);
  overflow: hidden;
  white-space: nowrap;
  height: 34px;
  display: flex;
  align-items: center;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  animation: marquee-scroll 38s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text2);
  padding: 0 18px;
}
.marquee-track .tsep {
  color: var(--accent);
  font-size: 8px;
  padding: 0 2px;
  opacity: 0.6;
}
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-ticker:hover .marquee-track {
  animation-play-state: paused;
}

/* ── Nav CTA Button ─────────────────────────────────────────── */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg) !important;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.25s;
  white-space: nowrap;
  margin-right: 6px;
}
.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(34,211,238,0.35);
  opacity: 0.92;
}
.nav-cta-btn i {
  font-size: 11px;
  transition: transform 0.25s;
}
.nav-cta-btn:hover i {
  transform: translateX(3px);
}
@media (max-width: 900px) {
  .nav-cta-btn { display: none; }
}

/* ── Hero Collaborate CTA ───────────────────────────────────── */
.cta-collab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid rgba(167,139,250,0.45);
  color: var(--accent2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s;
  cursor: none;
}
.cta-collab:hover {
  background: rgba(167,139,250,0.1);
  border-color: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(167,139,250,0.2);
}
.cta-collab i { font-size: 14px; }

/* ── Hero Local Time Badge ──────────────────────────────────── */
.hero-localtime {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 6px 14px;
  background: rgba(34,211,238,0.05);
  border: 1px solid rgba(34,211,238,0.15);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 0.5px;
}
.hero-localtime i {
  color: var(--accent);
  font-size: 10px;
}
.hero-localtime strong {
  color: var(--accent);
  font-weight: 600;
}

/* ── Stats Strip ─────────────────────────────────────────────── */
.stats-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.stats-strip-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.sstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 40px;
  text-align: center;
}
.sstat-num {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sstat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text2);
  text-transform: uppercase;
}
.sstat-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .stats-strip-inner { gap: 12px; }
  .sstat { padding: 10px 16px; }
  .sstat-divider { display: none; }
  .sstat-num { font-size: 32px; }
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
  z-index: 5000;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 340px;
  box-shadow: var(--shadow);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.success .toast-icon { color: var(--accent3); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.error .toast-icon { color: #ef4444; }
.toast.info { border-color: rgba(0,212,255,0.3); }
.toast.info .toast-icon { color: var(--accent); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg { font-size: 13px; color: var(--text); line-height: 1.4; }

/* Back to top */
.back-top {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  font-size: 14px;
  text-decoration: none;
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: all 0.3s;
  cursor: none;
}
.back-top.visible {
  opacity: 1; pointer-events: all;
}
.back-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}
[data-tooltip]:hover::before { opacity: 1; }

/* Code block */
.code-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  overflow-x: auto;
}

/* Highlight text effect */
.text-highlight {
  background: linear-gradient(120deg, rgba(0,212,255,0.15) 0%, rgba(0,212,255,0.15) 100%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: left center;
  transition: background-size 0.4s ease;
  padding: 0 4px;
  border-radius: 3px;
}
.text-highlight.visible {
  background-size: 100% 100%;
}

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 20px 0;
}

/* Tag group */
.tag-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag-item {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}
.tag-item.cyan {
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.18);
  color: var(--accent);
}
.tag-item.purple {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  color: var(--accent2);
}
.tag-item.green {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--accent3);
}
.tag-item.amber {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--accent4);
}

/* ── Relevant Coursework ─────────────────────────────────────── */
.cw-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(34,211,238,0.04);
  transition: box-shadow 0.3s;
}
.cw-terminal:hover {
  box-shadow: 0 24px 64px rgba(0,0,0,0.65), 0 0 40px rgba(34,211,238,0.07);
}

/* Chrome bar — macOS-style dots + path */
.cw-terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.cw-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}
.cw-dot-red    { background: #ff5f57; }
.cw-dot-yellow { background: #ffbd2e; }
.cw-dot-green  { background: #28ca41; }
.cw-terminal-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  margin-left: 10px;
  flex: 1;
  letter-spacing: 0.2px;
}
.cw-terminal-path::before {
  content: '$ ';
  color: var(--accent);
  font-weight: 600;
}
.cw-cursor {
  display: inline-block;
  color: var(--accent);
  animation: cw-blink 1s step-end infinite;
  font-size: 10px;
  vertical-align: middle;
  margin-left: 2px;
}
@keyframes cw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cw-terminal-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.3px;
  white-space: nowrap;
  margin-left: auto;
}

/* 2×2 grid inside the terminal */
.cw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cw-category {
  padding: 36px 36px 32px;
  position: relative;
}
/* Grid dividers */
.cw-category:nth-child(1),
.cw-category:nth-child(3) { border-right: 1px solid var(--border); }
.cw-category:nth-child(1),
.cw-category:nth-child(2) { border-bottom: 1px solid var(--border); }

/* Category header */
.cw-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.cw-cat-accent {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}
.cw-cat--ai   .cw-cat-accent { background: var(--accent);  box-shadow: 0 0 8px rgba(34,211,238,0.6); }
.cw-cat--cs   .cw-cat-accent { background: var(--accent2); box-shadow: 0 0 8px rgba(167,139,250,0.6); }
.cw-cat--math .cw-cat-accent { background: var(--accent3); box-shadow: 0 0 8px rgba(52,211,153,0.6); }
.cw-cat--sci  .cw-cat-accent { background: var(--accent4); box-shadow: 0 0 8px rgba(251,191,36,0.6); }

.cw-cat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 600;
  flex: 1;
}
.cw-cat--ai   .cw-cat-label { color: var(--accent); }
.cw-cat--cs   .cw-cat-label { color: var(--accent2); }
.cw-cat--math .cw-cat-label { color: var(--accent3); }
.cw-cat--sci  .cw-cat-label { color: var(--accent4); }

.cw-cat-count {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cw-cat--ai   .cw-cat-count { color: var(--accent);  border: 1px solid rgba(34,211,238,0.22);  background: rgba(34,211,238,0.07); }
.cw-cat--cs   .cw-cat-count { color: var(--accent2); border: 1px solid rgba(167,139,250,0.22); background: rgba(167,139,250,0.07); }
.cw-cat--math .cw-cat-count { color: var(--accent3); border: 1px solid rgba(52,211,153,0.22);  background: rgba(52,211,153,0.07); }
.cw-cat--sci  .cw-cat-count { color: var(--accent4); border: 1px solid rgba(251,191,36,0.22);  background: rgba(251,191,36,0.07); }

/* Course pills */
.cw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cw-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2px;
  line-height: 1.3;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid;
  transition: all 0.2s;
  cursor: default;
}
/* Resting state */
.cw-cat--ai   .cw-pill { color: rgba(34,211,238,0.72);  border-color: rgba(34,211,238,0.14);  background: rgba(34,211,238,0.04); }
.cw-cat--cs   .cw-pill { color: rgba(167,139,250,0.72); border-color: rgba(167,139,250,0.14); background: rgba(167,139,250,0.04); }
.cw-cat--math .cw-pill { color: rgba(52,211,153,0.72);  border-color: rgba(52,211,153,0.14);  background: rgba(52,211,153,0.04); }
.cw-cat--sci  .cw-pill { color: rgba(251,191,36,0.72);  border-color: rgba(251,191,36,0.14);  background: rgba(251,191,36,0.04); }
/* Hover glow */
.cw-cat--ai   .cw-pill:hover { color: var(--accent);  border-color: rgba(34,211,238,0.42);  background: rgba(34,211,238,0.1);  box-shadow: 0 0 12px rgba(34,211,238,0.14);  transform: translateY(-1px); }
.cw-cat--cs   .cw-pill:hover { color: var(--accent2); border-color: rgba(167,139,250,0.42); background: rgba(167,139,250,0.1); box-shadow: 0 0 12px rgba(167,139,250,0.14); transform: translateY(-1px); }
.cw-cat--math .cw-pill:hover { color: var(--accent3); border-color: rgba(52,211,153,0.42);  background: rgba(52,211,153,0.1);  box-shadow: 0 0 12px rgba(52,211,153,0.14);  transform: translateY(-1px); }
.cw-cat--sci  .cw-pill:hover { color: var(--accent4); border-color: rgba(251,191,36,0.42);  background: rgba(251,191,36,0.1);  box-shadow: 0 0 12px rgba(251,191,36,0.14);  transform: translateY(-1px); }

/* Responsive */
@media (max-width: 900px) {
  .cw-grid { grid-template-columns: 1fr; }
  .cw-category:nth-child(1),
  .cw-category:nth-child(3) { border-right: none; }
  .cw-category:nth-child(1),
  .cw-category:nth-child(2) { border-bottom: none; }
  .cw-category { border-bottom: 1px solid var(--border); padding: 28px 28px 24px; }
  .cw-category:last-child { border-bottom: none; }
  .cw-terminal-meta { display: none; }
}
@media (max-width: 480px) {
  .cw-category { padding: 24px 20px; }
  .cw-terminal-bar { padding: 12px 16px; }
  .cw-terminal-path { font-size: 11px; }
  .cw-pill { font-size: 10.5px; padding: 5px 11px; }
  .cw-cat-label { font-size: 9.5px; }
}

