/* Brutalist Blog Theme - Main Styles */

/* Base Typography and Colors */
:root {
  --text-color: #212529;
  --bg-color: #ffffff;
  --border-color: #2b2b2b;
  --accent-color: #ff6b35;
  --accent-hover: #e85a2a;
  --link-color: #0066cc;
  --link-hover: #004499;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e1e1e1;
    --bg-color: #0f0f0f;
    --border-color: #404040;
    --accent-color: #ff8c61;
    --accent-hover: #ffa17a;
    --link-color: #6eb5ff;
    --link-hover: #a8d3ff;
  }
  
  body {
    background-color: var(--bg-color);
    color: var(--text-color);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
}

/* Navigation / Header */
.navbar {
  margin-bottom: 1.0rem;
  padding: 0.2rem 0;
}

.navbar-brand {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text-color) !important;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.navbar-brand:hover {
  color: var(--accent-color) !important;
}

.nav-link {
  color: var(--text-color) !important;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.25rem !important;
  transition: color 0.2s;
  text-decoration: none !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0.1875rem;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent-color) !important;
  text-decoration: none !important;
}

.nav-link.active {
  font-weight: 700;
  color: var(--accent-color) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  line-height: 1.3;
}

h1 {
  font-size: 2.0rem;
  margin-top: 0;
  color: var(--accent-color);
}

h2 {
  font-size: 1.5rem;
  padding-left: 1rem;
  margin-left: -1.25rem;
}

h3 {
  font-size: 1.375rem;
  color: var(--accent-color);
}

a {
  color: #0066cc;
  text-decoration: underline;
}

a:hover,
a:focus {
  color: #004499;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  a {
    color: #6eb5ff;
  }
  
  a:hover,
  a:focus {
    color: #a8d3ff;
  }
}

/* Footer */
.footer {
  border-top: 0.1875rem solid var(--border-color);
  margin-top: 5rem;
}

.footer-container {
  text-align: center;
}

.footer-icons {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.75rem;
  transition: transform 0.2s;
}

.footer-icon-links {
  text-decoration: none;
  color: var(--text-color);
  display: inline-block;
  padding: 0.5rem;
  transition: color 0.2s;
}

.footer-icon-links:hover,
.footer-icon-links:focus {
  text-decoration: none;
  color: var(--accent-color);
}

.footer-icon-links:hover .footer-icons {
  transform: translateY(-3px);
}

/* Page and Post Styles */
.page-title {
  font-size: 2.0rem;
  font-weight: 600;
  color: var(--accent-color);
  display: inline-block;
}

.body {
  min-height: 60vh;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

/* Blockquotes */
blockquote {
  border-left: 0.25rem solid var(--border-color);
  padding-left: 1rem;
  margin-left: 0;
  font-style: italic;
  color: var(--text-color);
}

/* Code blocks */
pre {
  background-color: #272822;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
}

code {
  background-color: #f4f4f4;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
  font-family: 'Courier New', Courier, monospace;
}

@media (prefers-color-scheme: dark) {
  code {
    background-color: #2d2d2d;
    color: #f8f8f2;
  }
}

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

/* Tables */
table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

table thead th {
  font-weight: 700;
  background-color: #f8f9fa;
}

@media (prefers-color-scheme: dark) {
  table thead th {
    background-color: #2d2d2d;
  }
}

/* Card Styles for Papers, Projects, and Research */
.card-entry,
.paper-entry,
.project-entry {
  display: block;
  background: transparent;
  padding: 0 0 1.75rem 0;
  margin-bottom: 1.75rem;
  border-bottom: 0.1875rem solid var(--border-color);
}

.card-entry:last-child,
.paper-entry:last-child,
.project-entry:last-child {
  border-bottom: none;
}

.card-title,
.paper-title,
.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  margin-top: 0;
  color: var(--text-color);
  line-height: 1.4;
}

.card-authors,
.paper-authors,
.project-authors {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.75;
  margin-bottom: 0.25rem;
  font-style: italic;
}

.card-meta,
.paper-meta,
.project-meta {
  font-size: 0.8125rem;
  color: var(--text-color);
  opacity: 0.65;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.card-description,
.paper-description,
.project-description {
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-top: 0.5rem;
  color: var(--text-color);
}

.card-buttons,
.paper-buttons,
.project-buttons {
  margin: 0.75rem 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.card-buttons a,
.paper-buttons a,
.project-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.2;
  border-radius: 0.375rem;
  transition: color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  z-index: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.card-buttons a::before,
.paper-buttons a::before,
.project-buttons a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-color);
  z-index: -1;
}

.card-buttons a:hover::before,
.paper-buttons a:hover::before,
.project-buttons a:hover::before {
  left: 0;
}

.card-buttons a:hover,
.paper-buttons a:hover,
.project-buttons a:hover {
  border-color: var(--accent-color);
  color: var(--bg-color);
  text-decoration: none;
  transform: translateY(-2px);
}

.card-buttons a.paper {
  background: #094c94;
  border-color: #094c94;
  color: #fff;
}

.card-buttons a.paper:hover {
  background: transparent;
  color: #094c94;
}

.card-buttons a.preprint {
  background: #800000;
  border-color: #800000;
  color: #fff;
}

.card-buttons a.preprint:hover {
  background: transparent;
  color: #800000;
}

.card-buttons a.github,
.paper-buttons a.github,
.project-buttons a.github {
  background: #333;
  border-color: #333;
  color: #fff;
}

.card-buttons a.github:hover,
.paper-buttons a.github:hover,
.project-buttons a.github:hover {
  background: transparent;
  color: #333;
}

@media (prefers-color-scheme: dark) {
  .card-buttons a.github:hover,
  .paper-buttons a.github:hover,
  .project-buttons a.github:hover {
    color: #fff;
  }
}

.card-buttons a.docs,
.project-buttons a.docs {
  background: #34699a;
  border-color: #34699a;
  color: #fff;
}

.card-buttons a.docs:hover,
.project-buttons a.docs:hover {
  background: transparent;
  color: #34699a;
}

.card-entry img,
.paper-entry img,
.project-entry img {
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
  border: none;
}

.card-group,
.project-group {
  margin: 0;
  padding: 0;
  width: 100%;
}

.card-entry,
.paper-entry,
.project-entry {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Hide badges */
.card-buttons img,
.project-buttons img,
.paper-buttons img {
  display: none;
}

/* CV Page Styles */
.cv-entry {
  display: block;
  background: transparent;
  padding: 0 0 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 0.1875rem solid var(--border-color);
}

.cv-entry:last-child {
  border-bottom: none;
}

.cv-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  margin-top: 0;
  color: var(--text-color);
}

.cv-meta {
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.75;
  margin-bottom: 0.75rem;
}

.cv-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

.cv-description ul {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

.cv-description li {
  margin-bottom: 0.375rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.125rem;
  }
  
  h1 {
    font-size: 1.875rem;
  }
  
  h2 {
    font-size: 1.5rem;
    margin-left: 0;
    padding-left: 0.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .page-title {
    font-size: 1.875rem;
  }
  
  .card-title,
  .paper-title,
  .project-title,
  .cv-title {
    font-size: 1.125rem;
  }
  
  .card-buttons,
  .paper-buttons,
  .project-buttons {
    flex-direction: column;
  }
}
