@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Roboto:wght@700&family=Roboto+Mono&display=swap');

:root {
  /* Retro 90s/00s Techno Palette */

  /* Primary Colors */
  --bg-color: #1a1a2e; /* Deep Navy */
  --text-color: #e0e0e0; /* Off-white */
  --accent-color: #00f0ff; /* Electric Cyan */
  --border-color: #4a4a5e; /* Muted Purple/Gray */
  --card-bg: #2a2a3e; /* Darker Navy/Purple */

  /* Accent Colors */
  --link-color: #f038ff; /* Vibrant Magenta */
  --link-hover: #00f0ff; /* Electric Cyan */
  --code-bg: #101020; /* Even Darker Navy */
  --code-color: #00f0ff; /* Electric Cyan */

  /* Graph-specific colors */
  --graph-bg: #1a1a2e;
  --graph-node-bg: #2a2a3e;
  --graph-node-border: #00f0ff;
  --graph-link-color: #f038ff;
  --graph-text-color: #e0e0e0;
  --graph-hover-color: #f038ff;
}

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

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 17px;
}

.container {
  max-width: 100%;
  padding: 0 1rem;
}

header {
  position: relative;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}


.header-title {
  text-align: center;
  padding: 2rem 0;
}

.header-title h1 {
  margin: 0 0 0.5rem 0;
}

.subtitle {
  margin: 0;
  font-style: italic;
  color: var(--accent-color);
  font-size: 1.1rem;
  opacity: 0.8;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  gap: 2rem;
}

.logo {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 2.5rem; /* Match h1 for consistency */
  letter-spacing: 1px;
}

nav a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--link-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  margin: 2rem 0 1rem;
  line-height: 1.3;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

h1 { font-size: 2.5rem; } /* Site title - largest */
h2 { font-size: 1.8rem; } /* Page titles - smaller than site title */
h3 { font-size: 1.5rem; } /* Section headers */

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--link-hover);
  border-bottom: 1px solid var(--link-hover);
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

code {
  font-family: 'Roboto Mono', monospace;
  background-color: var(--code-bg);
  color: var(--code-color);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--border-color);
}

pre {
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

blockquote {
  border-left: 3px solid var(--accent-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-color);
  opacity: 0.8;
  font-style: italic;
}

/* Notes listing styles */
.notes-list {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

/* Notes Section Grouping */
.notes-section {
  margin-bottom: 3rem;
}

.notes-section .notes-entry {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  transition: box-shadow 0.2s ease;
  position: static;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.notes-section .notes-entry::before {
  display: none;
}

.notes-section .notes-entry:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notes-section .notes-entry h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
}

.notes-section .notes-entry h3 a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: normal;
}

.notes-section .notes-entry h3 a:hover {
  color: var(--accent-color);
}

.notes-section .notes-entry p {
  margin: 0.5rem 0;
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.5;
}

.note-meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 1;
}

.note-authors {
  display: block;
}

.notes-entry .note-authors a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: normal;
  font-size: 1rem;
  border-bottom: none;
}

.notes-entry .note-authors a:hover {
  color: var(--accent-color);
  text-decoration: underline;
  border-bottom: none;
}

/* Legacy Notes List */
.notes-list .notes-entry {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.notes-list .notes-entry::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.notes-entry a {
  color: var(--link-color);
  font-weight: bold;
  text-decoration: none;
}

.notes-entry a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Note byline styles */
.note-byline {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.byline-section {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.byline-section:last-child {
  margin-bottom: 0;
}

.byline-label {
  color: var(--accent-color);
  font-weight: 600;
  font-style: italic;
}

.byline-content {
  color: var(--text-color);
}

.byline-content a {
  color: var(--link-color);
  text-decoration: none;
}

.byline-content a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Note metadata styles */
.note-metadata {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.metadata-section {
  margin-bottom: 0.75rem;
}

.metadata-section:last-child {
  margin-bottom: 0;
}

.metadata-section strong {
  color: var(--accent-color);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.metadata-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.metadata-list li {
  background: var(--code-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.metadata-list li a {
  color: var(--link-color);
  text-decoration: none;
}

.metadata-list li a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Contributors page styles */
.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .contributors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contributors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contributor-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.contributor-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contributor-card h3 {
  margin: 0 0 0.5rem 0;
}

.contributor-card h3 a {
  color: var(--link-color);
  text-decoration: none;
}

.contributor-card h3 a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.contributor-card p {
  color: var(--text-color);
  opacity: 0.8;
  margin: 0.5rem 0;
}

.contributor-stats {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat {
  background: var(--code-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-color);
}

/* Person page styles */
.person {
  max-width: 800px;
  margin: 0 auto;
}

.person-profile {
  float: left;
  width: 200px;
  margin-right: 2rem;
  margin-bottom: 1rem;
}

.person-headshot-inline {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.person-articles {
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

/* 404 Page Styles */
.not-found-container {
  text-align: center;
  margin-top: 4rem;
}

.not-found-container h1 {
  font-size: 6rem;
  margin: 0;
}

.not-found-container h2 {
  font-size: 2rem;
  margin: 1rem 0;
}

.not-found-container p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

#random-note-btn {
  background-color: var(--accent-color);
  color: var(--card-bg);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#random-note-btn:hover {
  background-color: var(--link-hover);
}

.person-articles h2 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.articles-section {
  margin-bottom: 2rem;
}

.articles-section h3 {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.articles-list li {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.articles-list li:hover {
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.articles-list li a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.articles-list li a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.article-description {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

/* Note specific styles */
.note {
  max-width: 800px;
  margin: 0 auto;
}

.note header {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

.backlinks {
  margin: 3rem 0;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 4px;
  border-left: 3px solid var(--accent-color);
}

.backlinks h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text-color);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.backlinks ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.backlinks li {
  margin-bottom: 0.5rem;
}

/* Notes grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.note-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.note-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.2rem;
}

.note-card p {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
}

/* Graph container */
.graph-container {
  margin: 3rem 0;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 4px;
}

.graph {
  height: 400px;
  width: 100%;
  background-color: var(--graph-bg);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  opacity: 0.6;
}

/* Graph Section */
.graph-section {
    margin: 2rem 0;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.graph-section h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.force-graph-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.force-graph-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Citations Styling */
.works-cited {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.works-cited h2 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.works-cited p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.works-cited em {
  font-style: italic;
  color: var(--text-color);
  opacity: 0.8;
}

.works-cited strong {
  font-weight: bold;
  color: var(--accent-color);
}

/* Bibliography Page */
.bibliography h1 {
  color: var(--accent-color);
  margin-bottom: 2rem;
}

.bibliography h2 {
  color: var(--accent-color);
  margin: 2rem 0 1rem 0;
  font-size: 1.2rem;
}

.bibliography p {
  margin-bottom: 1rem;
  line-height: 1.6;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

.bibliography-list {
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.bibliography-entry {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.bibliography-entry::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

/* Force-Directed Graph Styles */
.force-graph-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 1000;
}

.force-graph-control-btn {
  width: 30px;
  height: 30px;
  background: var(--card-bg);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.force-graph-control-btn:hover {
  background: var(--accent-color);
  color: var(--card-bg);
}

.force-graph-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-color);
  opacity: 0.6;
}

.force-graph-error div {
  text-align: center;
}

/* Graph node dragging states */
.force-graph-node-dragging {
  cursor: grabbing !important;
}

.force-graph-node-dragging .node-circle {
  filter: brightness(1.3);
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  header {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    margin-top: 1rem;
  }
  
  nav a {
    margin: 0 0.5rem;
  }
  
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

/* Contributor Page Styles */
.contributor-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.contributor-card {
  background-color: var(--card-bg);
  border-radius: 0; /* Removed rounded corners */
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 4px 4px 10px 0px rgba(0, 240, 255, 0.2); /* Sharper, bottom-right glow */
}

.contributor-card:hover {
  transform: translateY(-2px) translateX(-2px);
  box-shadow: 6px 6px 15px 0px rgba(0, 240, 255, 0.35); /* More pronounced glow on hover */
}

.contributor-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.contributor-headshot img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.contributor-info {
  padding: 1.2rem;
}

.contributor-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.4rem;
}

.contributor-position {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
}

.contributor-subtitle {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.contributor-description {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.contributor-stats {
  margin-top: 1rem;
}

.stat-line {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.7;
  margin: 0;
}

.stat-separator {
  color: var(--link-color);
}

@media (max-width: 1024px) {
  .contributor-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .contributor-list {
    grid-template-columns: 1fr;
  }
}

/* Person page layout */
.person-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.person-headshot {
  flex: 0 0 200px;
  max-width: 200px;
}

.person-headshot img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.person-bio {
  flex: 1;
  min-width: 0; /* Allows flex item to shrink below content size */
}

.person-subtitle {
  margin: 0 0 1rem 0;
  color: var(--accent-color);
  font-size: 1rem;
}

.person-position {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color);
}

.person-orcid {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.person-url {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
}

.person-url a {
  color: var(--accent-color);
  text-decoration: none;
}

.person-url a:hover {
  text-decoration: underline;
}

.person-orcid a {
  color: var(--text-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.person-orcid a:hover {
  color: var(--accent-color);
}

.person-orcid img {
  width: 16px;
  height: 16px;
}

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

.person-content {
  margin-bottom: 3rem;
}

/* Responsive layout for person page */
@media (max-width: 768px) {
  .person-header {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .person-headshot {
    flex: 0 0 auto;
    max-width: 150px;
    align-self: center;
  }
}
