/* Base styles */
body {
  font-family: "Courier New", Courier, monospace;
  margin: 0;
  padding: 0;
  background-color: #F5F5DC;  /* Warm beige background */
  color: black;
}

/* Container and layout */
.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .container {
    width: 100%;
    padding: 0.5rem;
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Consolas", "Courier New", monospace;
}

h2 {
  margin-bottom: 0.5rem;
}

h2:before {
  content: ">_ ";
}

/* Lists */
ul {
  list-style-type: none;
  padding-left: 2.5rem;
  margin-top: 10px;
}

ul li {
  margin-bottom: 10px;
}

li:before {
  content: "$ ";
  font-weight: bold;
}

li.subitem:before {
  content: "";
}

/* Links */
.styled-link,
.back-to-home {
  color: black;
  text-decoration: none;
}

.styled-link:hover,
.back-to-home:hover {
  text-decoration: underline;
}

.always-underlined {
  text-decoration: underline;
  color: blue;
}

/* Layout containers */
.page-container,
.project-container {
  margin-top: 20px;
}

/* Footer */
footer {
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  text-align: left;
  padding: 1rem;
  box-sizing: border-box;
  max-width: 640px;
  margin: 20px auto 0;
}

@media (max-width: 640px) {
  footer {
    text-align: center;
  }
}

/* Social media */
.socials-container {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin: 20px 0;
}

.social-icon {
  font-size: 24px;
  color: black;
  text-decoration: none;
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.social-icon:hover {
  color: grey;
}

@media (max-width: 640px) {
  .socials-container {
    justify-content: center;
  }
}

/* Headers and navigation */
.header-container,
.navigation-container {
  height: 80px;
  display: flex;
  align-items: center;
}

.navigation-container {
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #ddd;
}

/* Project layout */
.project-layout {
  display: flex;
  gap: 25px;
  padding: 20px;
  align-items: flex-start;
}

/* Sidebar */
.sidebar {
  width: 30%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 8px;
}

.sidebar li:before {
  content: none;
}

.sidebar li ul {
  margin-left: 20px;
}

.sidebar-links {
  color: darkblue;
  text-decoration: underline;
}

.sidebar-sections h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #333;
}

.sidebar-sections ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-sections li {
  margin-bottom: 0.5rem;
}

.sidebar-sections li:before {
  content: none;
}

.sidebar-sections a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-sections a:hover {
  color: #666;
}

.sidebar-sections ul ul {
  margin-left: 1rem;
  margin-top: 0.5rem;
}

/* Content area */
.content {
  width: 65%;
  padding-top: 0;
}

.content h1:first-of-type,
.content h2:first-of-type {
  margin-top: 0;
}

.content h2.project-header:before {
  content: "</> ";
  font-weight: bold;
  color: inherit;
}

.project-summary {
  background-color: #f6f8fa;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 10px;
}

/* Post styles */
.post-header h2:before,
.project-header h2:before,
.post-content h2:before {
  content: "";
}

.post-date {
  text-align: right;
  font-size: 14px;
  color: grey;
  margin-bottom: 20px;
}

/* Code blocks */
.post-content pre {
  background: #f6f8fa;
  padding: 16px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  padding: 0.2em 0.4em;
  background: #f6f8fa;
  border-radius: 3px;
}

/* Markdown content */
.post-content ul {
  list-style-type: disc !important;
  padding-left: 2em;
}

.post-content ol {
  list-style-type: decimal !important;
  padding-left: 2em;
}

.post-content li:before {
  content: none !important;
}

/* Tags */
.tags-filter {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item a {
  padding: 0.2rem 0.5rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.tag-item.active a {
  background: #333;
  color: white;
  border-color: #333;
}

.tag-item a:hover {
  background: #f0f0f0;
  color: #333;
}

.tag-item.active a:hover {
  background: #333;
  color: white;
}

/* Lists */
.post-list,
.project-list {
  list-style: none;
  padding: 0;
}

.post-item,
.project-item {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.post-tags,
.project-tags {
  display: inline-flex;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.tag-label {
  font-size: 0.8rem;
  color: #666;
}

/* Footnotes */
.footnotes-section {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e1e4e8;
}

.footnotes-section ol {
  list-style-type: decimal;
  padding-left: 2rem;
}

.footnotes-section ol li {
  display: list-item !important;
  margin-bottom: 10px;
}

.footnotes-section ol li:before {
  content: none !important;
}

.footnotes-section .footnote-backlink {
  margin-left: auto;
  font-size: 0.8em;
  color: grey;
  text-decoration: none;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Utilities */
.section-title {
  font-weight: normal;
  text-align: center;
  font-size: 18px;
  margin-bottom: 1rem;
}

br {
  display: none;
}

/* External Links Container */
.external-links {
  margin-top: auto;
  border-top: 1px solid #eee;
}

.external-links h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #333;
}

.external-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #0366d6;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.external-links a:hover {
  color: #035fc7;
  text-decoration: underline;
}

.external-links i {
  width: 16px;
}

/* Terminal Blog Post Styles */
.terminal-blog-container {
  max-width: 680px;
  margin: 2rem auto;
}

.terminal-post-card {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.terminal-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.terminal-post-card:after {
  content: "Click to read post →";
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: #27c93f;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.terminal-post-card:hover:after {
  opacity: 1;
}

.terminal-window-header {
  padding: 8px;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  position: relative;
  display: flex;
  align-items: center;
}

.terminal-window-dots {
  display: flex;
  gap: 6px;
  position: absolute;
  left: 12px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot-red {
  background: #ff5f56;
}

.terminal-dot-yellow {
  background: #ffbd2e;
}

.terminal-dot-green {
  background: #27c93f;
}

.terminal-window-title {
  width: 100%;
  text-align: center;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 14px;
  color: #666;
}

.terminal-window-content {
  background: #292929;
  color: #f0f0f0;
  padding: 20px;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.6;
  min-height: 120px;
}

.terminal-post-title {
  color: #f0f0f0;
  text-decoration: none;
  display: block;
  margin-left: 16px;
  font-size: 16px;
}

.terminal-post-title::before {
  content: "$ ";
  color: #27c93f;
  font-weight: bold;
}

.terminal-post-meta {
  margin: 8px 0 0 32px;
  font-size: 14px;
  color: #888;
}

.terminal-post-tags {
  margin: 8px 0 0 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.terminal-tag {
  color: #27c93f;
  font-size: 14px;
}

/* Remove default link styling inside the terminal */
.terminal-post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
