@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Rajdhani:wght@400;600;700&display=swap');

/* ═══ RESET & BASE ═══ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

::selection {
  background: rgba(0,213,255,0.2);
  color: #00d5ff;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #00d5ff44; border-radius: 2px; }

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Share Tech Mono', monospace;
  background: #030609;
  color: #00d5ff;
  background-image:
    linear-gradient(rgba(0,213,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,213,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ═══ LOADER ═══ */
#loader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  gap: 10px;
}

#loader pre {
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  color: #00d5ff;
  text-align: left;
  white-space: pre-wrap;
  line-height: 2;
}

#loader.done {
  animation: fadeOut 0.6s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* ═══ APP SHELL ═══ */
#app {
  display: flex;
  min-height: 100vh;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#app.visible {
  visibility: visible;
  opacity: 1;
}

/* ═══ SIDEBAR ═══ */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 240px;
  background: rgba(3,6,9,0.97);
  border-right: 1px solid rgba(0,213,255,0.2);
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  z-index: 100;
  transition: transform 0.35s ease;
  box-shadow: 4px 0 30px rgba(0,213,255,0.06);
}

#sidebar.closed {
  transform: translateX(-100%);
}

.sidebar-logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #00d5ff;
  text-shadow: 0 0 20px rgba(0,213,255,0.6);
  margin-bottom: 4px;
}

.sidebar-sub {
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(0,213,255,0.5);
  margin-bottom: 32px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(0,213,255,0.55);
  font-size: 13px;
  letter-spacing: 2px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  outline: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Share Tech Mono', monospace;
}

.nav-item:hover {
  color: #00d5ff;
  background: rgba(0,213,255,0.07);
  border-color: rgba(0,213,255,0.15);
}

.nav-item.active {
  color: #00d5ff;
  background: rgba(0,213,255,0.1);
  border-color: rgba(0,213,255,0.3);
  border-left: 3px solid #00d5ff;
  text-shadow: 0 0 8px rgba(0,213,255,0.4);
}

.nav-item:focus { outline: none; }
.nav-item:active { outline: none; }

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(0,213,255,0.4);
  padding-top: 20px;
  border-top: 1px solid rgba(0,213,255,0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  animation: pulse-green 2s ease infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #00ff88; }
  50% { opacity: 0.5; box-shadow: 0 0 3px #00ff88; }
}

/* ── MOBILE SIDEBAR TAB (only visible on phone when sidebar is closed) ── */
#sidebarTab {
  display: none;
}

@media (max-width: 768px) {
  #sidebarTab {
    display: flex;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 22px;
    height: 72px;
    background: rgba(0,0,0,0.9);
    border: 1px solid rgba(0,213,255,0.35);
    border-left: none;
    border-radius: 0 8px 8px 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: opacity 0.3s, transform 0.3s;
    writing-mode: vertical-rl;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(0,213,255,0.7);
    box-shadow: 3px 0 12px rgba(0,213,255,0.15);
  }
  #sidebarTab.hidden { opacity: 0; pointer-events: none; }
}

/* ═══ MAIN CONTENT ═══ */
#main {
  margin-left: 240px;
  padding: 36px 36px 36px 40px;
  flex: 1;
  transition: margin-left 0.35s ease;
  min-height: 100vh;
}

#main.expanded {
  margin-left: 0;
  padding-top: 90px;
}

/* ═══ PAGE TABS ═══ */
.page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ PAGE HEADING ═══ */
.page-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 20px rgba(0,213,255,0.4);
  border-bottom: 1px solid rgba(0,213,255,0.2);
  padding-bottom: 14px;
  margin-bottom: 28px;
}

/* ═══ CARD ═══ */
.card {
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,213,255,0.18);
  border-radius: 14px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 0 20px rgba(0,213,255,0.05);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,213,255,0.35);
  box-shadow: 0 0 30px rgba(0,213,255,0.12);
}

/* ═══ DASHBOARD GRID ═══ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}

.col-span-3 { grid-column: span 3; }

/* Hero Card */
.hero-card {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(0,0,0,0.75);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,213,255,0.06) 0%, transparent 70%);
}

.hero-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #00d5ff;
  text-shadow: 0 0 30px rgba(0,213,255,0.7), 0 0 60px rgba(0,213,255,0.3);
  position: relative;
  animation: glitch 4s infinite;
}

@keyframes glitch {
  0%, 90%, 100% { transform: none; text-shadow: 0 0 30px rgba(0,213,255,0.7); }
  92% { transform: translateX(-3px); text-shadow: -3px 0 #ff0066, 3px 0 #00d5ff; }
  94% { transform: translateX(3px); text-shadow: 3px 0 #ff0066, -3px 0 #00d5ff; }
  96% { transform: none; text-shadow: 0 0 30px rgba(0,213,255,0.7); }
}

.hero-sub {
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(0,213,255,0.7);
  margin-top: 8px;
}

.hero-typing {
  font-size: 14px;
  color: rgba(0,213,255,0.9);
  margin-top: 14px;
}

.hero-typing::before { content: '> '; color: rgba(0,213,255,0.5); }

.cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: #00d5ff;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

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

/* Skill bars */
.card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(0,213,255,0.8);
  margin-bottom: 18px;
  text-transform: uppercase;
}

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

.skill-name {
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(0,213,255,0.7);
  width: 140px;
  flex-shrink: 0;
}

.skill-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(0,213,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0099bb, #00d5ff);
  border-radius: 3px;
  width: 0%;
  box-shadow: 0 0 8px rgba(0,213,255,0.5);
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

.skill-pct {
  font-size: 11px;
  color: #00d5ff;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* Stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,213,255,0.08);
}
.stat-row:last-child { border-bottom: none; }

.stat-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(0,213,255,0.55);
}

.stat-val {
  font-size: 20px;
  font-weight: 700;
  color: #00d5ff;
  text-shadow: 0 0 10px rgba(0,213,255,0.4);
}

.stat-online {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #00ff88;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 8px #00ff88;
}

/* Discord Lanyard */
.lanyard-img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* Commit heatmap */
.heatmap-grid {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(0,213,255,0.06);
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
}
.heatmap-cell:hover { transform: scale(1.4); z-index: 10; }
.heatmap-cell.l1 { background: rgba(0,213,255,0.2); }
.heatmap-cell.l2 { background: rgba(0,213,255,0.45); }
.heatmap-cell.l3 { background: rgba(0,213,255,0.75); }
.heatmap-cell.l4 { background: #00d5ff; box-shadow: 0 0 6px rgba(0,213,255,0.6); }

/* ═══ PROJECTS ═══ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.proj-card {
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,213,255,0.15);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.25s ease;
}

.proj-card:hover {
  border-color: rgba(0,213,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(0,213,255,0.1);
}

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

.proj-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #00d5ff;
  text-shadow: 0 0 10px rgba(0,213,255,0.3);
}

.badge {
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}
.badge-active  { background: rgba(0,255,100,0.12); color: #00ff88; border: 1px solid rgba(0,255,100,0.4); }
.badge-wip     { background: rgba(255,200,0,0.12);  color: #ffc800; border: 1px solid rgba(255,200,0,0.4); }
.badge-archive { background: rgba(255,60,60,0.12);  color: #ff4444; border: 1px solid rgba(255,60,60,0.4); }

.proj-desc {
  font-size: 12px;
  color: rgba(0,213,255,0.55);
  margin-bottom: 14px;
  line-height: 1.5;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tech-tag {
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 8px;
  background: rgba(0,213,255,0.08);
  border: 1px solid rgba(0,213,255,0.2);
  border-radius: 4px;
  color: rgba(0,213,255,0.8);
}

.btn-github {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  background: rgba(0,213,255,0.06);
  border: 1px solid rgba(0,213,255,0.25);
  color: rgba(0,213,255,0.8);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  outline: none;
}
.btn-github:hover {
  background: rgba(0,213,255,0.15);
  color: #00d5ff;
  border-color: rgba(0,213,255,0.5);
}
.btn-github:focus { outline: none; }

/* ═══ SEARCH PAGES (Music & Anime) ═══ */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(0,213,255,0.25);
  color: #00d5ff;
  padding: 12px 18px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input::placeholder { color: rgba(0,213,255,0.3); }
.search-input:focus { border-color: rgba(0,213,255,0.6); box-shadow: 0 0 12px rgba(0,213,255,0.1); }

.btn-search {
  padding: 12px 28px;
  background: rgba(0,213,255,0.1);
  border: 1px solid rgba(0,213,255,0.5);
  color: #00d5ff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  outline: none;
}
.btn-search:hover {
  background: #00d5ff;
  color: #000;
  box-shadow: 0 0 20px rgba(0,213,255,0.4);
}
.btn-search:focus { outline: none; }
.btn-search:active { outline: none; transform: scale(0.97); }

.empty-state {
  text-align: center;
  padding: 60px;
  color: rgba(0,213,255,0.3);
  font-size: 13px;
  letter-spacing: 3px;
  border: 1px dashed rgba(0,213,255,0.15);
  border-radius: 12px;
}

/* Music cards */
.music-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.music-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,213,255,0.14);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.2s ease;
}
.music-card:hover {
  border-color: rgba(0,213,255,0.35);
  transform: translateY(-2px);
}

.music-art {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0,213,255,0.2);
}

.music-info { flex: 1; min-width: 0; }
.music-title {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.music-artist { font-size: 11px; color: rgba(0,213,255,0.5); }

.btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0,213,255,0.4);
  background: rgba(0,213,255,0.08);
  color: #00d5ff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  outline: none;
}
.btn-play:hover { background: #00d5ff; color: #000; }
.btn-play:focus { outline: none; }
.btn-play.playing { background: rgba(0,255,100,0.15); border-color: #00ff88; color: #00ff88; }

/* Anime cards */
.anime-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.anime-card {
  display: flex;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,213,255,0.14);
  border-radius: 10px;
  overflow: hidden;
  height: 180px;
  transition: all 0.2s ease;
}
.anime-card:hover {
  border-color: rgba(0,213,255,0.35);
  transform: translateY(-3px);
}

.anime-cover {
  width: 120px;
  flex-shrink: 0;
  object-fit: cover;
}

.anime-info {
  padding: 14px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anime-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anime-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.anime-badge {
  font-size: 10px;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0,213,255,0.08);
  border: 1px solid rgba(0,213,255,0.2);
  color: rgba(0,213,255,0.8);
}

.anime-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #ffc800;
}

.anime-synopsis {
  font-size: 11px;
  color: rgba(0,213,255,0.45);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══ TOOLS ═══ */
.tool-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0,213,255,0.2);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tool-tab {
  padding: 10px 22px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(0,213,255,0.45);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
}
.tool-tab:hover { color: #00d5ff; background: rgba(0,213,255,0.05); }
.tool-tab.active {
  color: #00d5ff;
  border-bottom-color: #00d5ff;
  background: rgba(0,213,255,0.06);
}
.tool-tab:focus { outline: none; }

.tool-pane { display: none; }
.tool-pane.active { display: block; }

.tool-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(0,213,255,0.55);
  margin-bottom: 8px;
  display: block;
}

.tool-textarea {
  width: 100%;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(0,213,255,0.2);
  color: #00d5ff;
  padding: 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  border-radius: 8px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  min-height: 130px;
}
.tool-textarea:focus { border-color: rgba(0,213,255,0.5); }
.tool-textarea[readonly] { color: rgba(0,213,255,0.9); background: rgba(0,213,255,0.03); }

.tool-input {
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(0,213,255,0.2);
  color: #00d5ff;
  padding: 10px 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.tool-input:focus { border-color: rgba(0,213,255,0.5); }

.tool-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-tool {
  padding: 10px 18px;
  background: rgba(0,213,255,0.08);
  border: 1px solid rgba(0,213,255,0.3);
  color: #00d5ff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.2s ease;
  outline: none;
}
.btn-tool:hover { background: #00d5ff; color: #000; }
.btn-tool:focus { outline: none; }
.btn-tool:active { outline: none; transform: scale(0.97); }
.btn-tool.flex-1 { flex: 1; }

/* Color tool */
.color-preview {
  width: 100%;
  height: 100px;
  border-radius: 10px;
  border: 1px solid rgba(0,213,255,0.2);
  transition: background 0.2s;
}

.color-vals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.color-val-box {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,213,255,0.15);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.color-val-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(0,213,255,0.4);
  margin-bottom: 6px;
}

.color-val-num {
  font-size: 15px;
  color: #00d5ff;
  font-weight: 600;
}

/* Timestamp */
.ts-current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,213,255,0.2);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.ts-label { font-size: 11px; letter-spacing: 2px; color: rgba(0,213,255,0.5); }
.ts-now { font-size: 28px; color: #00d5ff; text-shadow: 0 0 12px rgba(0,213,255,0.5); }
.ts-output {
  background: rgba(0,213,255,0.05);
  border: 1px solid rgba(0,213,255,0.3);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  font-size: 16px;
  color: #00d5ff;
  margin-top: 12px;
  display: none;
}
.ts-output.show { display: block; }

.discord-formats {
  margin-top: 20px;
  border: 1px solid rgba(0,213,255,0.1);
  border-radius: 8px;
  overflow: hidden;
}
.df-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(0,213,255,0.6);
  padding: 10px 14px;
  background: rgba(0,213,255,0.05);
  border-bottom: 1px solid rgba(0,213,255,0.1);
}
.df-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.df-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,213,255,0.06);
  border-right: 1px solid rgba(0,213,255,0.06);
}
.df-code { font-size: 11px; color: rgba(0,213,255,0.5); }
.df-name { font-size: 11px; color: rgba(255,255,255,0.6); }

/* Text tools wrap */
.text-btn-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

/* ═══ TERMINAL ═══ */
#terminal-wrap {
  height: calc(100vh - 180px);
  min-height: 400px;
  background: #000;
  border: 1px solid rgba(0,213,255,0.25);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,213,255,0.08);
  position: relative;
}

#term-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #00d5ff;
}

.term-cmd  { color: #ffffff; }
.term-out  { color: #00d5ff; }
.term-warn { color: #ffc800; }
.term-ok   { color: #00ff88; }
.term-err  { color: #ff4444; }

#term-input-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,213,255,0.15);
  gap: 8px;
  background: rgba(0,0,0,0.5);
}

.term-prompt { color: rgba(0,213,255,0.7); white-space: nowrap; font-size: 13px; }

#term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  caret-color: #00d5ff;
}

/* Scanline overlay on terminal */
#terminal-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  border-radius: 12px;
}

/* ═══ LOADING SKELETON ═══ */
.skeleton {
  background: linear-gradient(90deg, rgba(0,213,255,0.06) 25%, rgba(0,213,255,0.12) 50%, rgba(0,213,255,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══ RESPONSIVE ═══ */

/* ── SIDEBAR OVERLAY BACKDROP (mobile only) ── */
#sidebarBackdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 90;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#sidebarBackdrop.show { display: block; }

/* ── TABLET ── */
@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

/* ── PHONE ── */
@media (max-width: 768px) {

  /* Sidebar floats over content as overlay */
  #sidebar {
    width: 240px;
    z-index: 150;
    transform: translateX(-100%);
    box-shadow: 8px 0 40px rgba(0,213,255,0.18);
  }
  #sidebar:not(.closed) {
    transform: translateX(0);
  }

  /* Main = always full width, no left push */
  #main {
    margin-left: 0 !important;
    padding: 66px 14px 50px !important;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Menu button always at top-left on mobile */
  #menuBtn {
    left: 12px !important;
    top: 12px !important;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* Single-column grids */
  .dash-grid,
  .projects-grid,
  .music-grid,
  .anime-grid,
  .tool-row,
  .color-vals,
  .df-grid     { grid-template-columns: 1fr !important; }
  .col-span-3  { grid-column: span 1 !important; }

  /* Hero */
  .hero-card   { padding: 28px 16px; }
  .hero-name   { font-size: 36px; letter-spacing: 4px; }
  .hero-sub    { font-size: 9px; letter-spacing: 2px; }

  /* Cards */
  .card { padding: 14px; border-radius: 10px; }

  /* Page title */
  .page-title { font-size: 18px; letter-spacing: 3px; margin-bottom: 18px; }

  /* Skill row */
  .skill-name { width: 95px; font-size: 10px; }
  .skill-pct  { font-size: 10px; }

  /* Stat */
  .stat-val { font-size: 16px; }

  /* Projects */
  .proj-name { font-size: 15px; }

  /* Anime card — stack vertically */
  .anime-card  { height: auto; flex-direction: column; }
  .anime-cover { width: 100%; height: 160px; flex-shrink: 0; }
  .anime-info  { padding: 12px; }

  /* Music */
  .music-art   { width: 46px; height: 46px; }
  .music-title { font-size: 12px; }

  /* Search */
  .search-bar  { flex-direction: column; gap: 8px; }
  .btn-search  { width: 100%; padding: 12px; font-size: 12px; }
  .search-input { font-size: 13px; }

  /* Tools */
  .tool-tabs   { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-shrink: 0; }
  .tool-tab    { padding: 9px 12px; font-size: 10px; white-space: nowrap; }
  .tool-btn-row { flex-direction: column; }
  .btn-tool.flex-1 { width: 100%; }
  .text-btn-wrap { gap: 6px; }
  .btn-tool    { padding: 9px 12px; font-size: 10px; }
  .tool-textarea { font-size: 12px; min-height: 110px; }

  /* Color tool */
  .ts-current  { flex-direction: column; gap: 4px; align-items: flex-start; }
  .ts-now      { font-size: 24px; }

  /* Heatmap — scrollable row */
  .heatmap-grid { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
  .heatmap-cell { width: 9px; height: 9px; }

  /* Terminal */
  #terminal-wrap { height: calc(100dvh - 150px); min-height: 300px; }
  #term-output   { font-size: 12px; }
  #term-input    { font-size: 12px; }
  .term-prompt   { font-size: 11px; }
}

/* ── VERY SMALL PHONES ── */
@media (max-width: 380px) {
  .hero-name  { font-size: 28px; }
  .skill-name { width: 80px; }
  .card       { padding: 12px; }
}
