/* =========================================================
   PACOS-OS — AMBER INDUSTRIAL SYSTEM (FULL BUILD)
   Desktop + Mobile Responsive
========================================================= */

:root {
  --bg: #0c0c0c;
  --panel: #111111;
  --text: #f5f5f5;

  --accent: #ff9f1c;
  --accent-dim: rgba(255, 159, 28, 0.2);

  --live-green: #00ff88;
  --danger: #ff4d4d;

  --border: rgba(255,255,255,0.08);

  --font-mono: 'Fira Code', monospace;
  --font-sans: 'Inter', sans-serif;
}

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

body.pacos-os {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* =========================================================
   BACKGROUND SYSTEM
========================================================= */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, var(--accent-dim), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0,255,136,0.06), transparent 40%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
}

/* =========================================================
   TOP BAR
========================================================= */

.top-bar {
  height: 50px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;

  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;

  background: rgba(255,255,255,0.02);
}

.brand span {
  color: var(--accent);
}

#system-status {
  color: var(--live-green);
  font-weight: 600;
}

#system-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--live-green);
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--live-green);
  animation: pulse 1.5s infinite;
}

/* =========================================================
   LAYOUT
========================================================= */

.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
  width: 280px;
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  background: var(--panel);
}

/* profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.avatar {
  width: 45px;
  height: 45px;
  background: #000;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: bold;
}

.name { font-weight: 600; }
.role { font-size: 11px; opacity: 0.6; }

/* nav */
.nav-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.7;
  transition: 0.3s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent);
  opacity: 1;
  transform: translateX(6px);
}

/* =========================================================
   MAIN CONSOLE
========================================================= */

.console {
  flex: 1;
  overflow-y: auto;
  padding: 60px;
}

.console-content {
  max-width: 1000px;
  margin: 0 auto;
}

/* headings */
h1 {
  font-size: 60px;
  font-weight: 900;
  margin-bottom: 30px;
  letter-spacing: -1px;
}

/* path */
.path {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.5;
}

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

.btn-terminal {
  display: inline-block;
  border: 1px solid var(--accent);
  padding: 10px 15px;
  text-decoration: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: 0.3s;
}

.btn-terminal:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 15px var(--accent);
}

/* =========================================================
   MODULES (PROJECTS)
========================================================= */

.module-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.module-card {
  grid-column: span 6;
  border: 1px solid var(--border);
  padding: 25px;
  background: rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent,
    var(--accent-dim),
    transparent
  );
  opacity: 0;
  transition: 0.4s;
}

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

.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

/* tags */
.tag-cloud span {
  border: 1px solid var(--border);
  padding: 3px 6px;
  font-size: 10px;
  margin-right: 5px;
  opacity: 0.8;
}

/* =========================================================
   SKILLS
========================================================= */

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.cap-card {
  border: 1px solid var(--border);
  padding: 20px;
  background: rgba(255,255,255,0.02);
}

.cap-header {
  font-family: var(--font-mono);
  margin-bottom: 10px;
  color: var(--accent);
}

.skill-tag {
  font-size: 12px;
  margin-bottom: 5px;
  opacity: 0.8;
}

/* =========================================================
   CONTACT
========================================================= */

.port-card {
  border: 1px solid var(--border);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: 0.3s;
}

.port-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

/* =========================================================
   LOGS
========================================================= */

.terminal-log {
  border: 1px solid var(--border);
  padding: 15px;
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.3);
}

.log-crit {
  color: var(--danger);
}

/* =========================================================
   ANIMATION
========================================================= */

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

/* =========================================================
   MOBILE RESPONSIVE (REAL FIX)
========================================================= */

@media (max-width: 900px) {

  body.pacos-os {
    overflow-y: auto;
    height: auto;
  }

  .app-container {
    flex-direction: column;
  }

  /* sidebar becomes top panel */
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .console {
    padding: 30px 20px;
  }

  h1 {
    font-size: 36px;
  }

  /* modules stack */
  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    grid-column: span 1;
  }

  /* skills stack */
  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  /* contact stack */
  .port-grid {
    grid-template-columns: 1fr;
  }

  /* nav becomes compact */
  .nav-item {
    font-size: 11px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    margin-bottom: 6px;
  }
}
#boot-screen {
  position: fixed;
  inset: 0;
  background: #0c0c0c;
  color: #ff9f1c;

  display: flex;
  justify-content: center;
  align-items: center;

  font-family: var(--font-mono);
  z-index: 99999;
}

.boot-log {
  text-align: center;
  font-size: 14px;
  letter-spacing: 2px;
  animation: bootFlicker 1.2s infinite;
}

#boot-line {
  margin-top: 10px;
  color: #00ff88;
  font-size: 12px;
}

/* flicker */
@keyframes bootFlicker {
  0%,100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.mobile-controls {
  display: none;
  gap: 10px;
}

.mobile-controls button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: 0.3s;
}

.mobile-controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* MOBILE BEHAVIOR */
@media (max-width: 900px) {

  .mobile-controls {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 50px;
    left: -100%;
    height: calc(100vh - 50px);
    width: 80%;
    max-width: 320px;
    transition: 0.4s ease;
    z-index: 9999;
  }

  .sidebar.active {
    left: 0;
  }

  /* optional dark overlay */
  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
  }
}
@media (max-width: 900px) {
  .sidebar-footer {
    text-align: center;
    padding: 12px 0;
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: 0.7;

    border-top: 1px solid var(--border);
    margin-top: 20px;
  }

  .sidebar-footer p {
    margin: 0;
  }
}