/* Core Document Properties */
:root {
  --bg-color: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #555555;
  --accent-color: #2563eb; /* Royal blue accents */
  --code-bg: #f4f4f5;
  --border-color: #e4e4e7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* Smooth transitions when clicking sidebar links */
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  display: flex; /* Aligns sidebar and content side-by-side */
}

/* Sidebar Styling */
aside {
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  padding: 3rem 1.5rem;
  border-right: 1px solid var(--border-color);
}

aside ul {
  list-style: none;
}

aside ul li {
  margin-bottom: 1rem;
}

aside ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

aside ul li a:hover {
  color: var(--accent-color);
}

/* Main Content Area */
main {
  margin-left: 240px; /* Offset the width of the fixed sidebar */
  max-width: 840px; /* Restricts line-width for ideal academic readability */
  padding: 4rem 3rem;
  width: 100%;
}

section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
}

h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* Authors and Link Buttons */
.authors {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.authors a {
  color: #991b1b; /* A deep, professional academic red */
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* .authors a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
} */

.affiliations {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.project-links {
  margin: 1.5rem 0;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: var(--text-main);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  margin-right: 0.75rem;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
}

/* Media Figures */
figure {
  margin: 2rem 0;
}

figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Minimalist Tables */
.table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

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

th {
  font-weight: 600;
  background-color: #fcfcfd;
}

/* Centers the entire title, author, and button block */
.hero-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

/* Tweaks the buttons so they balance perfectly when centered */
.hero-header .project-links {
  display: flex;
  justify-content: center; /* Aligns buttons right in the middle */
  gap: 0.75rem;            /* Replaces margin-right with a clean, centered gap */
  margin: 1.5rem 0 0 0;
}

.hero-header .btn {
  margin-right: 0; /* Clears out the old left-aligned margin */
}

/* Generates a clean, scannable spacing rule between introduction blocks */
.intro-paragraph {
  margin-bottom: 1.5rem; /* This creates the exact "one line space" look */
  font-size: 1.05rem;    /* Keeps the font highly legible for long reading */
  color: #27272a;        /* A slightly softer charcoal tone for professional text */
  text-align: justify;   /* Optional: Gives it a crisp, formal academic text edge */
}

/* Container for the deep dive layout */
.framework-deep-dive {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Splits into two balanced columns */
  gap: 1.5rem;
  margin-top: 3rem;
}

/* Individual card styling */
.mechanism-card {
  background-color: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mechanism-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.mechanism-card h4 {
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.mechanism-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.mechanism-card ul {
  padding-left: 1.25rem;
}

.mechanism-card li {
  font-size: 0.9rem;
  color: #27272a;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.mechanism-card li strong {
  color: var(--text-main);
}

/* Responsive collapse for mobile viewports */
@media (max-width: 768px) {
  .framework-deep-dive {
    grid-template-columns: 1fr; /* Stack cards vertically on smaller devices */
    gap: 1rem;
  }
}

/* Subheading adjustments within method */
#method h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem 0;
  color: var(--text-main);
}

/* Minimalist table styling specifically for the data schema */
.schema-container {
  overflow-x: auto;
  margin: 1.5rem 0 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.schema-table th, .schema-table td {
  padding: 0.75rem 1rem;
}

.schema-table th {
  background-color: #f8f8f8;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.schema-table td {
  border-bottom: 1px solid #f0f0f0;
  color: #3f3f46;
}

.schema-table tr:last-child td {
  border-bottom: none; /* Clears border on the last item */
}

/* Technical system prompt box styling */
.code-diagnostic-box {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.diagnostic-header {
  background-color: #eaeaea;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #52525b;
  text-transform: uppercase;
}

.code-diagnostic-box pre {
  padding: 1rem;
  margin: 0;
  overflow-x: auto;
}

.code-diagnostic-box code {
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #18181b;
}

/* Styling for the key findings list */
.results-list {
  padding-left: 0; /* Removes default bullet indentation */
  margin-top: 2rem;
  list-style-type: none; /* Removes standard bullets for a cleaner look */
}

.results-list li {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #3f3f46;
  background-color: #fafafa;
  border-left: 4px solid var(--accent-color); /* Adds a sleek colored accent bar to the left */
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
}

.results-list li strong {
  color: var(--text-main);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  display: block; /* Puts the bold title on its own line */
}

/* Citation Box */
.citation-box {
  background-color: var(--code-bg);
  border-radius: 8px;
  padding: 1.25rem;
  font-family: monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin-top: 1rem;
}

.citation-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  aside {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  aside ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
  aside ul li {
    margin-bottom: 0;
  }
  main {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }
}