/* ==========================================================================
   MinedKibbles21 - Developer Portfolio
   ========================================================================== */

:root {
  --bg-void: #090b10;
  --bg-card: #0e131f;
  --bg-card-hover: #151d2f;
  --border-dim: #1e293b;
  --border-bright: #334155;
  --accent: #10b981; /* Terminal Emerald */
  --accent-cyan: #06b6d4;
  --accent-alert: #f43f5e;
  
  --github-color: #38bdf8;
  --gitlab-color: #fc6d26;

  --text-main: #cbd5e1;
  --text-white: #ffffff;
  --text-dim: #64748b;

  --font-mono: 'JetBrains Mono', monospace, monospace;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-mono);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  position: relative;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-white);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-accent { color: var(--accent) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-github { color: var(--github-color) !important; }
.text-gitlab { color: var(--gitlab-color) !important; }
.text-white { color: var(--text-white) !important; }
.text-dim { color: var(--text-dim) !important; }

/* Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  color: var(--text-white);
  transition: all 0.15s ease-in-out;
  border-radius: 0;
}

.btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #34d399;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.775rem;
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.725rem;
}

/* Top System Status Bar */
.top-sys-bar {
  background: #04060a;
  border-bottom: 1px solid var(--border-dim);
  padding: 0.4rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sys-tag {
  color: var(--accent);
  font-weight: 700;
}

/* Main Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 11, 16, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dim);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: #05070c;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.brand-avatar {
  width: 32px;
  height: 32px;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.nav-link {
  color: var(--text-main);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent);
}

/* Page Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Hero Section */
.hero-box {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.hero-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.hero-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.skin-frame {
  width: 160px;
  height: 190px;
  border: 1px solid var(--border-bright);
  background: #05070c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.skin-frame img {
  max-height: 170px;
  object-fit: contain;
}

.namemc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  padding: 0.35rem 0.75rem;
  background: #070a11;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: all 0.15s ease;
}

.namemc-pill:hover {
  background: var(--accent);
  color: #000;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--accent);
}

.dot-green {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.hero-heading {
  font-size: 2.2rem;
  line-height: 1.2;
}

.hero-bio {
  color: var(--text-main);
  font-size: 0.95rem;
  max-width: 700px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

/* Terminal Console Widget */
.terminal-section {
  background: #05080f;
  border: 1px solid var(--accent);
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.terminal-header {
  background: #0a0e1a;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-buttons {
  display: flex;
  gap: 6px;
}

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

.terminal-title {
  font-size: 0.775rem;
  color: var(--text-dim);
}

.terminal-status {
  font-size: 0.725rem;
  font-weight: 700;
}

.terminal-body {
  padding: 1.25rem;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
  max-height: 480px;
  overflow-y: auto;
}

.t-line {
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.t-input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.t-prompt {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.t-input-line input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
}

/* Minigame Overlay */
.minigame-container {
  background: #020408;
  border: 1px solid var(--border-bright);
  padding: 1rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.minigame-container.hidden {
  display: none;
}

.game-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.5rem;
}

#game-canvas {
  background: #090e18;
  border: 1px solid var(--accent);
  max-width: 100%;
  height: auto;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.game-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Section Controls & Headers */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-dim);
}

.section-head h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Search & Filters */
.controls-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  padding: 1rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-input-wrap input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.2rem;
  background: #05070c;
  border: 1px solid var(--border-bright);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--accent);
}

.search-icon-text {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.3rem 0.75rem;
  font-size: 0.775rem;
  background: #05070c;
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--border-bright);
  color: var(--text-white);
}

.chip.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

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

.project-card-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.platform-tag {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.platform-tag.github { color: var(--github-color); }
.platform-tag.gitlab { color: var(--gitlab-color); }

.card-title {
  font-size: 1.15rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.5;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-item {
  background: #05070c;
  color: var(--text-dim);
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-dim);
  font-size: 0.7rem;
}

.link-action {
  color: var(--accent);
  font-weight: 700;
}
.link-action:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-dim);
  background: #04060a;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .hero-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-avatar-col { margin: 0 auto; }
  .hero-buttons { justify-content: center; }
}
