/* Base styles */
:root {
  --primary: #2563eb;
  --text: #1f2937;
  --bg: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover { color: var(--primary); }

/* Content */
main { min-height: 70vh; }

.content header {
  margin-bottom: 2rem;
}

.content h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.description {
  color: var(--muted);
  font-size: 1.1rem;
}

.body h2 { margin: 2rem 0 1rem; font-size: 1.5rem; }
.body h3 { margin: 1.5rem 0 0.75rem; font-size: 1.25rem; color: var(--primary); }
.body p { margin-bottom: 1rem; }
.body ul, .body ol { margin: 1rem 0 1rem 2rem; }
.body a { color: var(--primary); }

/* Tables (for paper database) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.9rem;
  table-layout: fixed;
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* Column widths for paper database */
th:first-child, td:first-child { width: 22%; }  /* Reference */
th:nth-child(2), td:nth-child(2) { width: 58%; }  /* Title */
th:last-child, td:last-child { width: 20%; }  /* Journal */

th {
  background: #f9fafb;
  font-weight: 600;
}

tr:hover { background: #f9fafb; }

td:nth-child(2) {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Page list */
.page-list {
  list-style: none;
}

.page-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.page-list a {
  color: var(--primary);
  text-decoration: none;
}

.page-list a:hover { text-decoration: underline; }

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  margin: -2rem -1rem 2rem -1rem;
  border-radius: 0 0 1rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Homepage sections */
.homepage {
  max-width: 900px;
  margin: 0 auto;
}

/* Intro section */
.intro {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
}

.intro p {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* Principles section - the 15 insights */
.principles {
  display: grid;
  gap: 1.5rem;
}

.principles h2 {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem 0.5rem 0 0;
  margin: 0;
  font-size: 1.1rem;
}

.principles h2 + p {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  margin: 0;
  border: 1px solid var(--border);
  border-top: none;
}

/* Guarantee section */
.guarantee {
  text-align: center;
  padding: 3rem 1rem;
  margin-top: 3rem;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  border-radius: 1rem;
}

.guarantee h2 {
  color: white;
  margin-bottom: 1rem;
}

.guarantee p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1rem;
}

/* CTA section */
.cta {
  margin-top: 3rem;
  padding: 2rem 0;
}

.cta h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.cta-card {
  display: block;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.cta-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.cta-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .content h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 2rem 1rem; }
  table { font-size: 0.8rem; }
  th, td { padding: 0.25rem; }
}
