/* ============================================================
   ALISHA.SH PORTFOLIO v3.1
   Clean, Accessible, Auto-Updating
   ============================================================ */

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

:root {
  --bg: #0a0a0f;
  --bg-rgb: 10, 10, 15;
  --surface: rgba(18, 20, 32, 0.85);
  --surface-solid: #121420;
  --border: rgba(100, 200, 255, 0.15);
  --border-hover: rgba(100, 200, 255, 0.4);
  --cyan: #4fc3f7;
  --cyan-dim: rgba(79, 195, 247, 0.12);
  --cyan-glow: rgba(79, 195, 247, 0.25);
  --magenta: #f06292;
  --magenta-dim: rgba(240, 98, 146, 0.12);
  --green: #69f0ae;
  --green-dim: rgba(105, 240, 174, 0.12);
  --gold: #ffd54f;
  --gold-dim: rgba(255, 213, 79, 0.12);
  --purple: #ba68c8;
  --text: #e8eaf6;
  --text-dim: #b0b8d4;
  --text-faint: #7a82a3;
  --text-muted: #5a6078;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Canvas Background ---- */
#networkCanvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* ---- Scanlines ---- */
.scanlines {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.06) 0px,
    rgba(0,0,0,0.06) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 2;
}

/* ---- Boot Overlay ---- */
.boot-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.boot-overlay.done {
  animation: bootFade 0.8s ease forwards;
  animation-delay: 0.3s;
}

@keyframes bootFade {
  to { opacity: 0; visibility: hidden; }
}

.boot-content {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 2.2;
  color: var(--text-dim);
  max-width: 600px;
  width: 90%;
}

.boot-line {
  opacity: 0;
  transform: translateX(-20px);
  animation: bootLine 0.4s ease forwards;
}

.boot-line:nth-child(1) { animation-delay: 0.2s; }
.boot-line:nth-child(2) { animation-delay: 0.6s; }
.boot-line:nth-child(3) { animation-delay: 1.0s; }
.boot-line:nth-child(4) { animation-delay: 1.4s; }
.boot-line:nth-child(5) { animation-delay: 1.8s; }

@keyframes bootLine {
  to { opacity: 1; transform: translateX(0); }
}

.boot-final {
  color: var(--green);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 4px;
  margin-top: 12px;
  text-shadow: 0 0 20px var(--green-dim);
}

/* ---- Main Interface ---- */
.main-interface {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.main-interface.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---- Top Bar ---- */
.top-bar {
  height: 48px;
  background: rgba(10, 10, 15, 0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sys-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: sysPulse 2s infinite;
}

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

.sys-name {
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 2px;
  font-size: 13px;
}

.sys-version {
  color: var(--text-muted);
}

.sys-status {
  color: var(--green);
  letter-spacing: 3px;
  font-weight: 600;
  text-shadow: 0 0 10px var(--green-dim);
}

.sys-location {
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ---- Workspace ---- */
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 200px;
  background: rgba(10, 10, 15, 0.7);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  transition: width 0.3s ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin: 2px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cyan);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-item:hover {
  background: rgba(79, 195, 247, 0.06);
  color: var(--text);
}

.nav-item.active {
  background: rgba(79, 195, 247, 0.1);
  color: var(--cyan);
}

.nav-item.active::before {
  opacity: 1;
  box-shadow: 0 0 10px var(--cyan);
}

.nav-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.threat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.threat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 15px var(--green-dim);
}

/* ---- Content Area ---- */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ---- Glass Panel ---- */
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(79, 195, 247, 0.06);
}

/* ---- Dashboard Grid ---- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  max-width: 1200px;
}

.dash-col-12 { grid-column: span 12; }
.dash-col-8 { grid-column: span 8; }
.dash-col-6 { grid-column: span 6; }
.dash-col-4 { grid-column: span 4; }
.dash-col-3 { grid-column: span 3; }

@media (max-width: 1024px) {
  .dash-col-8, .dash-col-6, .dash-col-4, .dash-col-3 { grid-column: span 6; }
}

@media (max-width: 768px) {
  .dash-col-12, .dash-col-8, .dash-col-6, .dash-col-4, .dash-col-3 { grid-column: span 12; }
}

/* ---- Profile Card ---- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--bg);
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(79, 195, 247, 0.2);
  position: relative;
  overflow: hidden;
}

.profile-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  animation: avatarSpin 4s linear infinite;
}

@keyframes avatarSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.profile-info h1 {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

.profile-info .handle {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
  margin-top: 4px;
}

.profile-info .title {
  font-size: 15px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.7;
  max-width: 600px;
}

/* ---- Glitch Effect ---- */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.8;
}

.glitch::before {
  color: var(--magenta);
  animation: glitch1 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
  color: var(--cyan);
  animation: glitch2 2s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-1px, 2px); }
}

@keyframes glitch2 {
  0%, 85%, 100% { transform: translate(0); }
  87% { transform: translate(2px, -1px); }
  89% { transform: translate(-2px, 1px); }
  91% { transform: translate(1px, -2px); }
}

/* ---- Stat Cards ---- */
.stat-card {
  text-align: center;
  padding: 20px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-dim);
}

.stat-label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 6px;
}

/* ---- Domain Cards ---- */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .domain-grid { grid-template-columns: repeat(2, 1fr); }
}

.domain-card {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.domain-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 10px 40px rgba(79, 195, 247, 0.1);
}

.domain-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.domain-name {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.domain-desc {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 6px;
}

/* ---- Section Title ---- */
.section-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ---- Arsenal / Skills ---- */
.skill-canvas-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

#skillRadar {
  max-width: 100%;
}

.skill-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.skill-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.skill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* ---- Projects ---- */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.project-id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.type-blue { background: var(--cyan-dim); color: var(--cyan); }
.type-red { background: var(--magenta-dim); color: var(--magenta); }
.type-gold { background: var(--gold-dim); color: var(--gold); }
.type-gray { background: rgba(255,255,255,0.04); color: var(--text-muted); }

.project-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-faint);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}

.project-link:hover {
  text-shadow: 0 0 10px var(--cyan-dim);
}

/* ---- GitHub Repo Cards ---- */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.repo-card {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.repo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.repo-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(79, 195, 247, 0.08);
}

.repo-card:hover::before { opacity: 1; }

.repo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.repo-icon { color: var(--text-faint); font-size: 14px; }
.repo-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
}
.repo-name:hover { text-decoration: underline; }
.repo-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}
.repo-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.repo-meta span { display: flex; align-items: center; gap: 4px; }
.lang-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ---- Medium Post Cards ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.post-card {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(79, 195, 247, 0.08);
}

.post-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--surface-solid);
}

.post-content { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.post-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--cyan); }
.post-excerpt {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 10px;
}
.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ---- Certificate Cards ---- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.cert-card {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(79, 195, 247, 0.08);
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.5;
}

.cert-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--surface-solid);
}

.cert-content { padding: 14px; }
.cert-issuer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cert-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.cert-date {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  text-decoration: none;
}
.cert-link:hover { text-decoration: underline; }

/* ---- TryHackMe Card ---- */
.thm-card {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.thm-logo {
  font-size: 40px;
  margin-bottom: 12px;
}

.thm-name {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.thm-handle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  margin-top: 4px;
}

.thm-summary {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.6;
}

.thm-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.thm-stat-box {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.thm-stat-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 15px var(--green-dim);
}

.thm-stat-label {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.thm-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  text-decoration: none;
}

.thm-link:hover { text-decoration: underline; }

/* ---- Social Link Cards ---- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.social-card:hover {
  border-color: var(--cyan);
  transform: translateX(4px);
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.08);
}

.social-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(79, 195, 247, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.social-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.social-info p {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ---- Connect / Contact ---- */
.contact-box {
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.contact-box h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.contact-box p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ---- Comm Links (Dashboard Profiles) ---- */
.comm-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(18, 20, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.comm-link:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.06);
}

.comm-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(79, 195, 247, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.comm-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.comm-info p {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ---- Loading & Error States ---- */
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  gap: 12px;
}
.loading-box i {
  font-size: 1.5rem;
  color: var(--cyan);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  text-align: center;
  padding: 2rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
}
.error-box i {
  font-size: 1.5rem;
  color: var(--magenta);
  margin-bottom: 0.5rem;
}

/* ---- Sync Badge ---- */
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--green);
  background: var(--green-dim);
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sync-badge i { font-size: 8px; animation: pulse 2s infinite; }

/* ---- Sub-Headers ---- */
.sub-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ---- Code blocks ---- */
code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(79,195,247,0.08);
  color: var(--cyan);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ---- Terminal Widget ---- */
.terminal-widget {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  z-index: 50;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

.terminal-widget.collapsed {
  height: 40px;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.term-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }

.term-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  flex: 1;
}

.term-toggle {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.terminal-body {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  max-height: 240px;
  overflow-y: auto;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.term-line {
  color: var(--text-dim);
  margin-bottom: 2px;
  word-break: break-word;
}

.term-line.error { color: var(--magenta); }
.term-line.success { color: var(--green); }
.term-line.warn { color: var(--gold); }
.term-cmd { color: var(--cyan); font-weight: 500; }

.term-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.term-prompt {
  color: var(--green);
  font-weight: 600;
  flex-shrink: 0;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  caret-color: var(--cyan);
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(105,240,174,0.3); }
  50% { box-shadow: 0 0 10px 3px rgba(105,240,174,0.1); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 8px;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 40;
    justify-content: space-around;
  }

  .nav-item {
    flex-direction: column;
    padding: 8px 12px;
    margin: 0;
    gap: 4px;
  }

  .nav-item::before { display: none; }
  .nav-label { font-size: 9px; }
  .sidebar-footer { display: none; }

  .content {
    padding: 16px;
    padding-bottom: 100px;
  }

  .terminal-widget {
    bottom: 80px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .domain-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .repo-grid, .post-grid, .cert-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Selection ---- */
::selection {
  background: var(--cyan-dim);
  color: var(--cyan);
}
