/* styles.css - TokyoNight TUI portfolio */

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

:root {
  --bg: #011628;
  --bg-dark: #011423;
  --bg-highlight: #143652;
  --bg-search: #0a64ac;
  --bg-visual: #275378;
  --fg: #cbe0f0;
  --fg-dark: #b4d0e9;
  --fg-gutter: #627e97;
  --border: #547998;
  --error: #f07178;
  --warning: #ffcb6b;
  --info: #82aaff;
  --success: #c3e88d;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Fira Code", "JetBrains Mono", "Cascadia Code", monospace;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Bufferline */
.bufferline {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg-dark);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.buffer {
  max-width: 300px;
  overflow-x: auto;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: transparent;
  border: none;
  color: var(--fg-dark);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: all 0.2s ease;
}

.buffer:hover {
  background-color: var(--bg-highlight);
  color: var(--fg);
}

.buffer-active {
  color: var(--fg);
  background-color: var(--bg);
  border-bottom: 2px solid var(--bg-search);
  text-shadow: 0 0 2px var(--bg-search);
  font-weight: bold;
}

/* Main dashboard – fills remaining space */
.tui-dashboard {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 1rem;
}

#dashboard {
  width: 100%;
  height: 100%;
}

/* Footer */
.tui-footer {
  flex-shrink: 0;
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--fg-gutter);
  font-family: monospace;
  text-align: center;
}

.mode-normal {
  background-color: var(--bg-search);
  color: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: bold;
}

.mode-visual {
  background-color: #ff69b4;
  color: #011628;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: bold;
  text-shadow: none;
}

/* Home page */
.dashboard-container {
  text-align: center;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.ascii-panda {
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--fg);
  font-family: monospace;
  white-space: pre;
  display: inline-block;
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
}

.tui-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.tui-item {
  font-family: monospace;
  font-size: 1.3rem;
  padding: 0.75rem 2rem;
  color: var(--fg-dark);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.1s ease;
  width: fit-content;
}

.tui-item:hover {
  color: var(--fg);
  background-color: var(--bg-highlight);
}

.tui-active {
  color: var(--fg);
  border-left-color: var(--bg-search);
  background-color: var(--bg-highlight);
  transform: translateX(4px);
  text-shadow: 0 0 2px var(--bg-search);
}

/* Projects file explorer */
.projects-container {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0;
  background-color: var(--bg-dark);
  border-radius: 8px;
  overflow: hidden;
}

.file-tree {
  flex: 0 0 280px;
  background-color: var(--bg);
  border-right: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.9rem;
}

.tree-header {
  color: var(--info);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.tree-node {
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0;
  white-space: nowrap;
}

.tree-node:hover {
  background-color: var(--bg-highlight);
}

.tree-node.selected {
  background-color: var(--bg-visual);
  color: var(--fg);
}

.tree-node .toggle {
  display: inline-block;
  width: 1.2rem;
  text-align: center;
}

.tree-node .icon {
  margin-right: 0.3rem;
}

.tree-children {
  margin-left: 1.5rem;
  display: none;
}

.tree-children.expanded {
  display: block;
}

.file-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  padding: 1rem;
  overflow-y: auto;
}

.file-header {
  color: var(--fg-gutter);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
  font-family: monospace;
}

.file-preview {
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
  overflow-x: auto;
  flex: 1;
}

/* Markdown styling */
.markdown-body {
  background-color: var(--bg);
  color: var(--fg);
  padding: 1rem;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-y: auto;
  height: 100%;
}

.markdown-body h1 {
  font-size: 1.8rem;
  color: var(--info);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
  margin-top: 0;
}

.markdown-body h2 {
  font-size: 1.4rem;
  color: var(--bg-search);
  margin-top: 1rem;
}

.markdown-body h3,
h4,
h5,
h6 {
  color: var(--fg);
}

.markdown-body a {
  color: #00ff88;
  text-decoration: none;
  border-bottom: 1px dashed #00ff88;
}

.markdown-body a:hover {
  color: var(--bg-search);
  border-bottom-color: var(--bg-search);
}

.markdown-body code {
  background-color: var(--bg-highlight);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--warning);
}

.markdown-body pre {
  background-color: var(--bg-dark);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  border-left: 3px solid var(--bg-search);
  margin: 1rem 0;
}

.markdown-body pre code {
  background: none;
  color: var(--fg);
  padding: 0;
}

.markdown-body blockquote {
  border-left: 3px solid var(--bg-search);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--fg-dark);
  font-style: italic;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.markdown-body li {
  margin: 0.25rem 0;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* Skills page (checkhealth style) */
.health-container {
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: monospace;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.health-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.health-prompt {
  color: var(--bg-search);
  font-weight: bold;
}

.health-status {
  color: var(--fg-gutter);
}

.health-section {
  margin-bottom: 1.25rem;
}

.health-title {
  color: var(--info);
  margin-bottom: 0.4rem;
  font-weight: bold;
  font-size: 0.95rem;
}

.health-item {
  margin-left: 1rem;
  margin-bottom: 0.25rem;
  color: var(--fg-dark);
  font-size: 0.85rem;
  line-height: 1.4;
}

.health-item.warning {
  color: var(--warning);
}

.health-footer {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--fg-gutter);
  display: flex;
  justify-content: space-between;
}

/* About page */
.about-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.about-card {
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pfp-bubble {
  background: linear-gradient(135deg, var(--bg-search), var(--bg-visual));
  border-radius: 50%;
  padding: 5px;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(10, 100, 172, 0.4);
}

.pfp-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: block;
}

.name-title {
  flex: 1;
}

.about-name {
  font-size: 2rem;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.about-alias {
  font-size: 1rem;
  color: var(--fg-dark);
  margin-bottom: 0.75rem;
}

.alias-highlight {
  color: var(--info);
  font-weight: bold;
  background-color: var(--bg-highlight);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

.about-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  background-color: var(--bg);
  color: var(--fg-gutter);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  font-family: monospace;
}

.divider {
  height: 1px;
  background-color: var(--border);
  margin: 1rem 0;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-text h2,
.social-links h2 {
  font-size: 1.2rem;
  color: var(--info);
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.about-text p {
  color: var(--fg-dark);
  line-height: 1.6;
}

.skill-bar-container {
  width: 100%;
  background-color: var(--bg-highlight);
  border-radius: 12px;
  overflow: hidden;
  height: 6px;
  margin: 0.5rem 0;
}

.skill-fill {
  background-color: var(--bg-search);
  width: 85%;
  height: 100%;
  display: block;
  border-radius: 12px;
}

.social-links ul {
  list-style: none;
  padding: 0;
}

.social-links li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: monospace;
  background-color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--bg-search);
}

.social-icon {
  font-size: 1.2rem;
  min-width: 32px;
  color: var(--info);
}

.social-links a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--bg-search);
  text-decoration: underline;
}

.social-text {
  color: var(--fg-dark);
}

/* Feedback form */
.feedback-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
}

.feedback-card {
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-family: monospace;
}

.feedback-header {
  background-color: var(--bg);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.feedback-prompt {
  color: var(--bg-search);
  font-weight: bold;
}

.feedback-body {
  padding: 1.5rem;
}

.feedback-intro {
  color: var(--fg);
  margin-bottom: 1.5rem;
  font-style: italic;
  border-left: 3px solid var(--bg-search);
  padding-left: 0.75rem;
}

.form-row {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-row label {
  color: var(--info);
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  font-family: monospace;
}

.form-row input,
.form-row textarea {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--bg-search);
}

.submit-btn {
  background-color: var(--bg-search);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  width: fit-content;
}

.submit-btn:hover {
  background-color: var(--info);
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
}

.feedback-footer {
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  color: var(--fg-gutter);
  font-family: monospace;
}

@media (max-width: 768px) {
  .ascii-panda {
    font-size: 0.6rem;
  }
  .tui-item {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
  .buffer {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .about-card {
    padding: 1rem;
  }
  .social-links li {
    flex-wrap: wrap;
  }
}

.health-container {
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  font-family: monospace;
  max-width: 1000px;
  width: 90%;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.health-item {
  margin-left: 1rem;
  margin-bottom: 0.5rem;
  color: var(--fg-dark);
  font-size: 1rem;
  line-height: 1.5;
}

.tree-node .icon {
  margin-right: 0.5rem;
  color: var(--fg-gutter);
  display: inline-block;
  width: 1.2rem;
  text-align: right;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-search);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--info);
}

.dashboard-container {
  margin-top: 3rem;
}
