/* AI Lab Portal — shared stylesheet
   Friendly engineering-notebook look: blue header, serif body, card-based layout. */

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

:root {
  --blue-dark: #1F3864;
  --blue-mid: #2E5FA3;
  --blue-light: #D6E4F0;
  --border: #C8D8E8;
  --bg: #F7FAFD;
  --white: #ffffff;
  --muted: #555;
  --amber: #B8860B;
  --amber-bg: #FFF6E0;
  --amber-border: #E8C766;
  --green: #2E7D4F;
  --green-bg: #EAF7EF;
  --green-border: #B7E0C6;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: #222;
  line-height: 1.6;
}

a { color: var(--blue-mid); }
a:hover { color: var(--blue-dark); }

/* Header + nav */
.page-header {
  background: var(--blue-dark);
  color: var(--white);
  padding: 28px 20px 22px;
  text-align: center;
}
.page-header h1 { font-size: 1.8rem; }
.page-header .subtitle {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  color: #C0D8F0;
  margin-top: 8px;
}

.site-nav {
  background: var(--blue-mid);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
}
.site-nav ul {
  list-style: none;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.site-nav a {
  display: block;
  color: #E8F1FB;
  text-decoration: none;
  padding: 10px 12px;
}
.site-nav a:hover { background: var(--blue-dark); color: var(--white); }

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.container.wide { max-width: 1000px; }

h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--blue-dark);
  font-size: 1.3rem;
  margin: 28px 0 12px;
}
h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--blue-dark);
  font-size: 1.05rem;
  margin: 20px 0 8px;
}
p { margin-bottom: 12px; }
ul, ol { margin: 0 0 12px 22px; }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.card {
  display: block;
  background: linear-gradient(180deg, var(--white), var(--bg));
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue-mid);
  border-radius: 4px;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.9),
    inset 0 -2px 0 rgba(0,0,0,0.06),
    0 3px 8px rgba(0,0,0,0.08);
  transition: box-shadow .18s ease, transform .1s ease-in-out, border-left-color .15s ease;
}
.card:hover {
  border-left-color: var(--blue-dark);
  transform: translateY(-4px);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.95),
    inset 0 -3px 0 rgba(0,0,0,0.1),
    0 10px 18px rgba(0,0,0,0.16);
}
.card:active {
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.9),
    inset 0 -2px 0 rgba(0,0,0,0.08),
    0 4px 8px rgba(0,0,0,0.12);
}
.card h2, .card h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 6px; }
.card .card-link {
  display: inline-block;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: bold;
  color: var(--blue-mid);
}

/* Field Guide chapter TOC + permalinks */
.field-guide-toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 20px 14px;
  margin: 16px 0 24px;
}
.field-guide-toc h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--blue-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 14px 0 8px;
}
.field-guide-toc ol {
  margin: 0 0 0 20px;
  columns: 2;
  column-gap: 24px;
}
.field-guide-toc li { margin-bottom: 4px; break-inside: avoid; font-size: 0.92rem; }
h2.chapter .anchor-link {
  margin-left: 6px;
  font-size: 0.75em;
  font-weight: normal;
  color: var(--blue-mid);
  text-decoration: none;
  opacity: 0.4;
}
h2.chapter .anchor-link:hover { opacity: 1; text-decoration: underline; }

/* Field Guide roadmap panel */
.roadmap-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--green);
  border-radius: 4px;
  padding: 8px 20px 16px;
  margin: 16px 0 24px;
}
.roadmap-panel h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--blue-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 14px 0 10px;
}
.roadmap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 16px;
}
.roadmap-list li {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.9rem;
}
.roadmap-list li.done { color: var(--text, #222); }
.roadmap-list li.done::before { content: "✅ "; }
.roadmap-list li.todo { color: var(--muted); }
.roadmap-list li.todo::before { content: "⬜ "; }

/* Code / log block */
.code-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre;
  margin: 12px 0;
  color: #222;
}

/* Status banners */
.status-banner {
  border-radius: 4px;
  padding: 12px 18px;
  margin: 16px 0;
  font-weight: bold;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.95rem;
}
.status-success {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-left: 5px solid var(--green);
  color: var(--green);
}
.status-pending {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-left: 5px solid var(--amber);
  color: var(--amber);
}

/* Side-by-side figure pair */
.figure-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.figure-row figure { flex: 0 1 35%; margin: 0; }
.figure-row figure img { max-width: 100%; }
@media (max-width: 600px) {
  .figure-row figure { flex-basis: 100%; }
}

/* Diagram box */
.diagram {
  background: var(--white);
  border: 1px dashed var(--blue-mid);
  border-radius: 4px;
  padding: 20px;
  font-family: 'Courier New', monospace;
  white-space: pre;
  text-align: center;
  color: var(--blue-dark);
  margin: 16px 0;
  overflow-x: auto;
}

/* Lessons Learned box */
.lessons {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-left: 5px solid var(--amber);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 16px 0;
}
.lessons h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--amber);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

/* Quote of the Day box */
.quote-box {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-left: 5px solid var(--green);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 16px 0;
  font-style: italic;
}
.quote-box h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--green);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-style: normal;
  margin: 0 0 6px;
}

/* Image placeholder (no real screenshot yet) */
.img-placeholder {
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: 4px;
  padding: 40px 16px;
  text-align: center;
  color: #888;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.85rem;
  margin: 12px 0;
}
.img-placeholder .caption {
  margin-top: 8px;
  font-style: italic;
  color: var(--muted);
}
figure { margin: 0 0 16px; }
figure img { max-width: 100%; border-radius: 4px; border: 1px solid var(--border); display: block; }
figure a { display: block; }
figure a img { cursor: zoom-in; }
figure.img-60 img { max-width: 60%; margin: 0 auto; }
figure.img-42 img { max-width: 42%; margin: 0 auto; }
figure.img-25 img { max-width: 25%; margin: 0 auto; }

/* Wide figure — breaks out of the 900px container for large diagrams,
   only on screens with room for it; falls back to normal responsive
   figure behavior below that. */
@media (min-width: 1100px) {
  figure.img-wide {
    width: 1050px;
    max-width: 1050px;
    margin-left: 50%;
    transform: translateX(-50%);
  }
}
figcaption {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}
.img-comment {
  font-size: 0.92rem;
  color: #444;
  font-style: italic;
  border-left: 3px solid var(--blue-light);
  padding: 4px 0 4px 14px;
  margin: -8px 0 20px;
}

/* Timeline (build journal entries) */
.timeline-entry {
  border-left: 3px solid var(--blue-mid);
  padding-left: 18px;
  margin-bottom: 24px;
  position: relative;
}
.timeline-entry::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 11px;
  height: 11px;
  background: var(--blue-mid);
  border-radius: 50%;
}
.timeline-date {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat list (hardware/model specs) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.9rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.spec-table th { color: var(--blue-dark); width: 40%; }

/* Note cards (engineering notebook) */
.note {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.note h3 { margin-top: 0; }
.note code, code {
  background: var(--blue-light);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

/* Footer */
.site-footer {
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
  padding: 24px 20px 40px;
}

/* Participation level cards */
.level-badge {
  display: inline-block;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--white);
  background: var(--blue-mid);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .page-header h1 { font-size: 1.4rem; }
  .site-nav a { padding: 8px; font-size: 12px; }
}
