:root {
  --bg: #1e1e1e;
  --sidebar-bg: #252526;
  --accent: #007acc;
  --fg: #d4d4d4;
  --inactive-fg: #858585;
  --border: #3c3c3c;
  --sidebar-width: 220px;
  font-family: 'Fira Code', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--fg);
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100%;
}

/* Explorer */
.explorer {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--inactive-fg);
}

.explorer-header {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--inactive-fg);
}

.file-tree {
  list-style: none;
}

.file {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.file span {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.file.active,
.file:hover {
  background: #37373d;
  color: var(--accent);
}

/* Editor */
.tab-bar {
  display: flex;
  background: #2d2d2d;
}

.tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--inactive-fg);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.tab.active {
  background: var(--bg);
  color: var(--fg);
}

.tab span {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.editor-content {
  flex: 1;
  overflow-y: auto;
}

.content {
  display: none;
}

.content.active {
  display: block;
}

h1,
h2 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.embedded-image {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin: 0.5rem 0;
}

figure {
  margin: 0.5rem 0;
}

figcaption {
  font-size: 0.85rem;
  color: var(--inactive-fg);
  margin-top: 0.25rem;
}

/* Status Bar */
.status-bar {
  height: 24px;
  background: #007acc10;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  color: var(--inactive-fg);
  border-top: 1px solid var(--border);
}

.status-item {
  margin-right: 1rem;
  display: flex;
  align-items: center;
}

.status-item.codicon {
  margin-right: 0.25rem;
}

/* Table styling */
table.sql-table {
  border-collapse: collapse;
  margin: 1rem 0;
}

table.sql-table th,
table.sql-table td {
  min-width: 250px;
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
  font-family: 'Fira Code', monospace;
}

table.sql-table th {
  background: #2d2d2d;
  color: var(--fg);
}

pre,
pre code {
  height: 100%;
}

/* Console output styling */
.console-output {
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.console-output pre {
  margin: 0;
  font-family: 'Fira Code', monospace;
  color: #d4d4d4;
}

/* Ensure editor content fills between tab-bar and status-bar */
.editor {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.editor-content {
  flex: 1;
  overflow: auto;
}

/* Make active section a flex container so split can stretch */
.content.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.content {
  display: none;
}

/* Split view adjustments */
.split-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.split-pane {
  flex: 1;
  overflow: auto;
}

.split-divider {
  height: 5px;
  width: 100%;
  cursor: row-resize;
  background: rgba(255, 255, 255, 0.1);
}

.code-pane pre,
.console-pane .console-output {
  margin: 0;
}

.code-pane {
  flex: 1;
  /* 1 part */
}

.console-pane {
  flex: 3;
  /* 3 parts: console takes 3/4 */
}

.console-output pre {
  margin: 0;
  font-family: 'Fira Code', monospace;
}

.unselectable {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.tab-bar {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
}

.tab {
  flex: none;
}

.split-pane {
  overflow-x: auto;
  overflow-y: auto;
  min-width: 0;
  /* allow flex child to shrink */
}

.code-pane pre,
.console-output pre {
  white-space: pre;
  /* preserve formatting */
  display: block;
}

/* Hide explorer on mobile, enable drawer */
@media (max-width: 768px) {
  .explorer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10;
    width: var(--sidebar-width);
  }

  .explorer.show {
    transform: translateX(0);
  }

  .container {
    position: relative;
  }

  .top-bar {
    display: flex;
    align-items: center;
  }

  #hamburger {
    display: block;
    background: none;
    border: none;
    color: var(--inactive-fg);
    font-size: 1.25rem;
    margin: 0.5rem;
  }

  .tab-bar {
    overflow-x: auto;
    white-space: nowrap;
  }

  .tab {
    flex: none;
  }
}

/* Desktop resets */
@media (min-width: 769px) {
  #hamburger {
    display: none;
  }

  .explorer {
    position: relative;
    transform: none;
  }

  .top-bar {
    display: none;
  }

  .tab-bar {
    overflow: hidden;
  }
}

/* Split-view click behavior CSS classes */
.split-container.full-code .code-pane {
  flex: 1;
}

.split-container.full-code .console-pane {
  flex: 0;
}

.split-container.full-console .code-pane {
  flex: 0;
}

.split-container.full-console .console-pane {
  flex: 1;
}

#contact h2 {
  color: #d4d4d4 !important;
  text-align: center;
}

#contact div.console-output {
  width: max-content;
}

.contact-item {
  padding: 8px;
  background-color: #292929;
  border-radius: 5px;
  border: 1px solid;
  border-color: #3c3c3c;
  display: inline-block;
}

#contact-map {
  display: block;
  clear: both;
  margin: auto;
  margin-top: 10px;
  border-radius: 10px;
  width: 500px;
  height: 350px;
  border-radius: 5px;
  border: 1px solid;
  border-color: #3c3c3c;
}

.contact-item a {

  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none !important;
  color: #d4d4d4 !important;
}

#profile {
  display: flex;
  flex-direction: row;
  margin-bottom: 15px;
}

img.profile-element {
  width: 150px;
  border-radius: 15px;
  margin-right: 10px;
}

div.profile-element {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.console-output a {
  color: var(--fg);
}

.console-output h2 {
  color: var(--fg);
}

.red {
  color: red;
}

.orange {
  color: orange;
}

.green {
  color: green;
}

 .purple {
  color: blueviolet;
}

.cyan {
  color: cyan;
}

#git-result, #git-result-pred {
  font-weight: bolder;
}

.hidden {
  display: none !important;
}

.console-output.md h2, .console-output.md h3 {
  border-bottom: var(--border) 1px solid;
}

.console-output.md img {
  max-width: 500px;
  min-width: 300px;
}

.selectable {
  -webkit-user-select: text !important;
  -khtml-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

table.md-table {
  border-collapse: collapse;
  margin: 1rem 0;
}

table.md-table th,
table.md-table td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
  font-family: 'Fira Code', monospace;
}

table.md-table th {
  background: #2d2d2d;
  color: var(--fg);
}

/* Minimal thin scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}

::-webkit-scrollbar-track {
  background: transparent;
}
