@import "./vars.css";

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 
    -apple-system, 
    BlinkMacSystemFont, 
    "Segoe UI", 
    Roboto, 
    Oxygen, 
    Ubuntu, 
    Cantarell, 
    "Open Sans", 
    "Helvetica Neue", 
    sans-serif;
  line-height: 1.6;
  max-width: 1150px;
  margin: 0 auto;
  padding: 2rem;
  overflow: visible;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

h1 { 
  font-size: 2.5rem; 
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

h2 { 
  font-size: 2rem; 
  color: var(--accent-color);
}

/* Enhanced Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color) 80%, white);
  text-decoration: underline;
}

/* Improved Code Blocks */
code, pre {
  background-color: var(--code-bg);
  border-radius: 6px;
  font-family: 
    'Cascadia Code', 
    'Fira Code', 
    Consolas, 
    'Courier New', 
    monospace;
  font-size: 0.9rem;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border-color);
}

code {
  padding: 0.2rem 0.4rem;
  margin: 0 0.2rem;
}

/* Enhanced Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* Subtle Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 5px;
}

/* Additional Subtle Effects */
* {
  transition: background-color 0.2s ease, color 0.2s ease;
}

blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  font-style: italic;
  color: var(--text-secondary);
}

img {
  max-width: 100%;
}

header ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 10px;
  padding-top: 20px;
  padding-bottom: 20px;
}
header ul a {
  padding: 10px 20px;
  border-radius: 8px;
  outline: 1px solid var(--accent-color);
  background: rgba(255,255,255,0);
  transition: 100ms ease all;
}
ul a:hover {
  background: rgba(255,255,255,0.05);
}

.highlight .nt {
  color: #2587EE;
}

footer {
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 20px;
}

.wrapper {
  display: flex;
  justify-content: space-between;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

.toc {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  width: 250px;
  position: sticky;
  top: 20px;
  padding: 15px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-left: 20px;
  z-index: 10;
}

.toc h3 {
  margin-top: 0;
}

.toc ul {
  padding-left: 0;
  list-style-type: decimal;
}

.toc ul li ul {
  padding-left: 10px;
}

.toc ul li ul li ul {
  padding-left: 20px;
}

.toc ul li ul li ul li ul {
  padding-left: 30px;
}

.toc ul li {
  margin-bottom: 5px;
}

.toc ul li a {
  text-decoration: none;
}

.toc ul li a:hover {
  text-decoration: underline;
}
