/* ============================================================
   CYBER-OS PORTFOLIO — Design System & HUD Styles
   Cyberpunk Command Center theme
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #050508;
  --bg-secondary: #08080f;
  --bg-tertiary: #0c0c16;
  --bg-hud: rgba(6, 6, 12, 0.7);
  --bg-hud-header: rgba(12, 12, 24, 0.8);
  --bg-terminal: rgba(2, 2, 4, 0.9);

  /* Neon Accents */
  --accent-cyan: #00f3ff;
  --accent-cyan-dim: rgba(0, 243, 255, 0.3);
  --accent-green: #39ff14;
  --accent-green-dim: rgba(57, 255, 20, 0.3);
  --accent-magenta: #ff007f;
  --accent-magenta-dim: rgba(255, 0, 127, 0.3);
  --accent-yellow: #ffea00;
  
  /* Text */
  --text-primary: #a3b8cc;
  --text-secondary: #6e8499;
  --text-bright: #e6f1fc;
  --text-dim: #445666;

  /* Borders & Glows */
  --hud-border: 1px solid rgba(0, 243, 255, 0.2);
  --hud-border-focus: 1px solid rgba(0, 243, 255, 0.6);
  --glow-cyan: 0 0 10px rgba(0, 243, 255, 0.25);
  --glow-green: 0 0 10px rgba(57, 255, 20, 0.25);
  --glow-magenta: 0 0 10px rgba(255, 0, 127, 0.25);

  /* Fonts */
  --font-hud: 'Share Tech Mono', 'JetBrains Mono', monospace;
  --font-code: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition-base: 0.25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  font-family: var(--font-hud);
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

::selection {
  background: var(--accent-cyan);
  color: #000;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-cyan-dim);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* ---------- Boot / Lock Screen ---------- */
.boot-screen {
  position: fixed;
  inset: 0;
  background: #030306;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-code);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-terminal {
  width: 90%;
  max-width: 600px;
  height: 350px;
  background: #000;
  border: 1px solid var(--accent-cyan-dim);
  box-shadow: var(--glow-cyan);
  padding: 20px;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
}

.boot-log {
  height: calc(100% - 60px);
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--accent-cyan);
}

.boot-log div {
  margin-bottom: 4px;
}

.boot-action {
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

.btn-boot {
  background: transparent;
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 10px 24px;
  font-family: var(--font-hud);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: var(--glow-green);
  display: none;
  animation: pulse-border 1.5s infinite;
}

.btn-boot:hover {
  background: var(--accent-green-dim);
  color: #fff;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(57, 255, 20, 0.4); }
  50% { border-color: rgba(57, 255, 20, 1); }
}

/* ---------- Grid Canvas Background ---------- */
#grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
}

/* ---------- CRT Scanline Overlay Effect ---------- */
.crt-overlay {
  position: absolute;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
}

.crt-overlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: radial-gradient(circle, transparent 70%, rgba(0, 0, 0, 0.4) 100%);
}

/* ---------- Main Dashboard Layout ---------- */
.os-desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* ---------- Header Status Bar ---------- */
.os-header {
  height: 36px;
  background: var(--bg-hud-header);
  border-bottom: var(--hud-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 15px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

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

.header-center {
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  text-shadow: 0 0 5px var(--accent-cyan-dim);
}

.status-node {
  display: flex;
  align-items: center;
  gap: 6px;
}

.indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: var(--glow-green);
  animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.btn-mute {
  background: transparent;
  border: 1px solid var(--accent-cyan-dim);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.75rem;
}
.btn-mute:hover {
  background: var(--accent-cyan-dim);
}

/* ---------- Workspace Layout ---------- */
.os-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

/* ---------- HUD Panels ---------- */
.hud-panel {
  background: var(--bg-hud);
  border: var(--hud-border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.hud-panel__header {
  height: 32px;
  background: var(--bg-hud-header);
  border-bottom: var(--hud-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 12px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hud-panel__title {
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-panel__control-dots {
  display: flex;
  gap: 5px;
}

.control-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--accent-cyan-dim);
}

.control-dot:nth-child(1) { background-color: var(--accent-magenta-dim); }
.control-dot:nth-child(2) { background-color: rgba(255, 234, 0, 0.3); }
.control-dot:nth-child(3) { background-color: var(--accent-green-dim); }

.hud-panel__body {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 15px;
}

/* ---------- CLI Terminal Pane ---------- */
.terminal-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-terminal);
}

.terminal-history {
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.terminal-line {
  margin-bottom: 6px;
  word-break: break-word;
}

.terminal-output {
  color: var(--text-primary);
  white-space: pre-wrap;
}

.terminal-output.success { color: var(--accent-green); }
.terminal-output.error { color: var(--accent-magenta); }
.terminal-output.info { color: var(--accent-cyan); }
.terminal-output.system { color: var(--accent-yellow); }

.prompt-prefix {
  color: var(--accent-cyan);
  margin-right: 8px;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(0, 243, 255, 0.1);
  padding-top: 8px;
}

.terminal-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--accent-green);
  font-family: var(--font-code);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ---------- Visual Panel Display System ---------- */
.display-widget {
  position: absolute;
  inset: 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  overflow-y: auto;
}

.display-widget.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* ---------- Widget Specific Styling ---------- */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.widget-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 243, 255, 0.1);
  border-radius: 4px;
  padding: 15px;
  position: relative;
}

.widget-box::before {
  content: "";
  position: absolute;
  top: -1px; left: 10px; right: 10px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan-dim), transparent);
}

.widget-box__title {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  padding-bottom: 4px;
}

/* Avatar details widget */
.avatar-hud {
  display: flex;
  gap: 20px;
  align-items: center;
}

.avatar-screen {
  width: 100px;
  height: 100px;
  border: 1px solid var(--accent-cyan-dim);
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  overflow: hidden;
}

.avatar-screen svg {
  width: 60%;
  height: 60%;
  color: var(--accent-cyan);
}

.avatar-screen::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-cyan);
  opacity: 0.5;
  animation: scanline-move 3s linear infinite;
}

@keyframes scanline-move {
  0% { transform: translateY(0); }
  100% { transform: translateY(100px); }
}

.bio-details {
  flex: 1;
  font-size: 0.85rem;
}

.bio-row {
  display: flex;
  margin-bottom: 6px;
}

.bio-row span:first-child {
  width: 90px;
  color: var(--text-secondary);
}

.bio-row span:last-child {
  color: var(--text-bright);
}

/* System metrics simulation */
.sim-metric {
  margin-bottom: 12px;
}
.sim-metric__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sim-metric__bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.sim-metric__bar-fill {
  height: 100%;
  background: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  width: 0%;
  transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}
.sim-metric--green .sim-metric__bar-fill {
  background: var(--accent-green);
  box-shadow: var(--glow-green);
}
.sim-metric--magenta .sim-metric__bar-fill {
  background: var(--accent-magenta);
  box-shadow: var(--glow-magenta);
}

/* Projects grid HUD */
.projects-hud-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.project-hud-card {
  border: 1px solid rgba(0, 243, 255, 0.15);
  background: rgba(5, 5, 10, 0.6);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-base);
}

.project-hud-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  background: rgba(0, 243, 255, 0.05);
}

.project-hud-card__title {
  color: var(--text-bright);
  font-size: 0.95rem;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-hud-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

.project-hud-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.project-hud-card__tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(0, 243, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 243, 255, 0.15);
}

.project-hud-card__links {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
}

.project-hud-card__link {
  color: var(--accent-green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-hud-card__link:hover {
  text-decoration: underline;
}

/* Skills HUD */
.skills-hud-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.skill-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-bar-label {
  width: 120px;
  font-size: 0.85rem;
  color: var(--text-bright);
}

.skill-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent-green);
  width: 0%;
  transition: width 1s ease-out;
}

.skill-bar-percent {
  width: 40px;
  font-size: 0.8rem;
  color: var(--accent-green);
  text-align: right;
}

/* Timeline HUD */
.timeline-hud {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  padding-left: 20px;
}

.timeline-hud::before {
  content: "";
  position: absolute;
  left: 5px; top: 0; bottom: 0; width: 1px;
  background: var(--accent-cyan-dim);
}

.timeline-hud-node {
  position: relative;
}

.timeline-hud-node::before {
  content: "";
  position: absolute;
  left: -20px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.timeline-hud-node.active::before {
  background: var(--accent-magenta);
  border-color: var(--accent-magenta);
  box-shadow: var(--glow-magenta);
}

.timeline-hud-node__date {
  font-size: 0.75rem;
  color: var(--accent-magenta);
  margin-bottom: 4px;
}

.timeline-hud-node__title {
  color: var(--text-bright);
  font-size: 0.9rem;
  font-weight: bold;
}

.timeline-hud-node__comp {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.timeline-hud-node__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Contact HUD */
.contact-hud-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.contact-hud-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-hud-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-hud-form label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.contact-hud-form input,
.contact-hud-form textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--accent-cyan-dim);
  border-radius: 2px;
  padding: 8px 10px;
  color: var(--accent-green);
  font-family: var(--font-code);
  font-size: 0.8rem;
  outline: none;
}

.contact-hud-form input:focus,
.contact-hud-form textarea:focus {
  border-color: var(--accent-green);
  box-shadow: var(--glow-green);
}

.btn-hud-submit {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 6px 16px;
  font-family: var(--font-hud);
  font-size: 0.85rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

.btn-hud-submit:hover {
  background: var(--accent-green-dim);
  color: #fff;
}

.contact-hud-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-channel-hud {
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.01);
  padding: 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-channel-hud__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-cyan-dim);
  border-radius: 4px;
  color: var(--accent-cyan);
}

.contact-channel-hud__icon svg {
  width: 18px;
  height: 18px;
}

.contact-channel-hud__content {
  font-size: 0.8rem;
}

.contact-channel-hud__label {
  color: var(--text-secondary);
}

.contact-channel-hud__val {
  color: var(--text-bright);
}

/* ---------- Quick Reference Footer ---------- */
.os-footer {
  height: 24px;
  background: var(--bg-hud-header);
  border-top: var(--hud-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 15px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer-cmd-list {
  display: flex;
  gap: 15px;
}

.cmd-hint {
  color: var(--accent-yellow);
}

/* ---------- Animations ---------- */
@keyframes blink-cursor {
  50% { opacity: 0; }
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent-green);
  margin-left: 2px;
  animation: blink-cursor 1s step-end infinite;
}

/* ---------- Mobile Responsive Mode ---------- */
@media (max-width: 900px) {
  .os-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 250px 1fr;
  }
}
