/* Bridge stylesheet: Adapts projects.css design to markdown-generated HTML */

/* Import/assume projects.css variables are available */
/* This stylesheet should be loaded after projects.css */

/* Base typography - inherit from projects.css body styles */
/* Markdown content container */
article,
main,
.content {
  color: var(--white);
  font-family: var(--font-family);
  font-weight: bold;
}

/* Headers - adapt projects.css header styles */
h1 {
  background: var(--white);
  color: var(--background-color);
  display: inline-block;
  font-size: var(--font-size-large);
  line-height: 100%;
  margin: 10px 0;
  padding: 5px 5px 3px;
}

main h1 {
  background: none;
  color: var(--white);
  margin: 90px 0 40px;
  position: relative;
  text-transform: uppercase;
  width: 100%;
}

main h1::before,
main h1::after {
  background: var(--background-color);
  color: var(--white);
  content: "////////////////////////////////////";
  display: block;
  font-size: var(--font-size-base);
  left: 0;
  opacity: 0.2;
  position: absolute;
}

main h1::before {
  top: -25px;
}

main h1::after {
  bottom: -25px;
}

h2 {
  background: var(--gray-very-dark);
  border-top: 2px solid var(--orange);
  color: var(--white);
  display: inline-block;
  font-size: var(--font-size-base);
  font-weight: normal;
  margin: 0 0 10px;
  padding: 5px 5px 3px;
  text-transform: uppercase;
}

main h2 {
  margin-top: 30px;
}

/* Target main h2 that is immediately preceded by main h1 */
main h1 + h2 {
  margin-top: 0;
}

main h2::before {
  content: "// ";
}

h3 {
  color: var(--white);
  font-size: var(--font-size-base);
  font-weight: bold;
  margin: 20px 0 10px;
}

h4,
h5,
h6 {
  color: var(--white);
  font-size: var(--font-size-base);
  font-weight: bold;
  margin: 15px 0 8px;
}

/* Lists - adapt projects.css list styles */
ul,
ol {
  padding: 0 0 0 17px;
}

ul {
  list-style: disc;
}

li li {
  list-style: circle;
}

li::marker {
  color: var(--orange);
}

.contains-task-list {
  list-style: none;
  padding: 0;
}

li {
  margin: 10px 0;
}

/* Task list items (markdown checkboxes) */
li:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

/* Checkbox styling */
input[type="checkbox"] {
  appearance: none;
  background: transparent;
  border: 1px solid var(--gray-dark);
  flex-shrink: 0;
  height: 16px;
  margin: 2px 0 0;
  position: relative;
  width: 16px;
}

input[type="checkbox"]:checked {
  background: var(--gray-dark);
  border-color: var(--gray-dark);
}

input[type="checkbox"]:checked::after {
  color: var(--white);
  content: "✓";
  font-size: 11px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Completed tasks - gray out */
li:has(input[type="checkbox"]:checked) {
  color: var(--gray-dark);
  opacity: var(--opacity-unavailable);
  text-decoration: line-through;
}

/* Ensure nested content in completed tasks is also styled */
li:has(input[type="checkbox"]:checked) p,
li:has(input[type="checkbox"]:checked) span,
li:has(input[type="checkbox"]:checked) a {
  color: var(--gray-dark);
  text-decoration: line-through;
}

/* Links - use projects.css link styles */
a {
  color: var(--text-color);
  text-decoration: none;
}

a:hover {
  color: var(--white);
}

/* Paragraphs */
p {
  color: var(--white);
  margin: 10px 0;
}

/* Code blocks - style to match projects.css aesthetic */
pre {
  background: var(--gray-very-dark);
  border: 1px solid var(--gray-dark);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: var(--font-size-small);
  margin: 15px 0;
  overflow-x: auto;
  padding: 10px;
}

code {
  background: var(--gray-very-dark);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: var(--font-size-small);
  padding: 2px 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid var(--gray-very-dark);
  color: var(--gray-dark);
  margin: 15px 0;
}

/* Strong/emphasis */
strong,
b {
  color: var(--white);
  font-weight: bold;
}

em,
i {
  font-style: italic;
}

/* Strikethrough (for ~~text~~) */
del,
s {
  color: var(--gray-dark);
  opacity: var(--opacity-unavailable);
  text-decoration: line-through;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--gray-dark);
  color: var(--gray-light);
  margin: 15px 0;
  padding-left: 15px;
}

/* Nested lists */
ul ul,
ol ol,
ul ol,
ol ul {
  margin-left: 20px;
  margin-top: 5px;
}

/* List items with nested content */
li > p {
  margin: 5px 0;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  /* Make everything brighter on mobile */
  p,
  li {
    color: var(--white);
  }
  
  li:has(input[type="checkbox"]:checked) {
    color: var(--gray-medium);
  }
}

