/* DSC180 A08 — Previous layout (single column), light theme */

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --border: #e2e6ea;
  --text: #1a1d21;
  --text-muted: #4a5568;
  --accent: #5b21b6;
  --accent-dim: rgba(91, 33, 182, 0.1);
  --code-bg: #f1f3f5;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-width: 720px;
  --header-max: 860px;
  /* UCSD blue — header background (poster dark navy) */
  --ucsd-blue: #002147;
  --ucsd-blue-dark: #001a38;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
  width: 100%;
}

/* Header — UCSD blue background */
.site-header {
  background: var(--ucsd-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
}

.header-inner {
  max-width: var(--header-max);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.site-header .label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.5rem;
}

.site-header h1 {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: #ffffff;
}

.site-header .tagline {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem;
}

.site-header .team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1rem;
}

.site-header .team .mentors {
  width: 100%;
  margin-top: 0.25rem;
  font-style: italic;
}

.header-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.site-header .header-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.site-header .header-links a:hover {
  border-bottom-color: #ffffff;
  opacity: 0.95;
}

.header-link-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.header-link-icon .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.header-link-icon .icon svg {
  flex-shrink: 0;
  vertical-align: middle;
}
.site-header .header-link-icon .icon svg {
  color: #ffffff;
}
.site-header .header-link-icon .icon.icon-github svg {
  fill: #ffffff;
}
.site-header .header-link-icon .icon.icon-doc svg,
.site-header .header-link-icon .icon.icon-poster svg {
  stroke: #ffffff;
}

/* Sticky nav */
.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-inner a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-inner a:hover,
.nav-inner a.current {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Sections */
.section {
  padding: clamp(1.75rem, 4vw, 2.5rem) 1.5rem;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.section-inner {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--ucsd-blue);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
  color: var(--ucsd-blue);
}

.section h3:first-of-type {
  margin-top: 0;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.section p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.section ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.section li {
  margin-bottom: 0.4rem;
}

/* Two-column cards (intro) */
.two-col.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 0.9rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Poster-style figures */
.poster-fig {
  margin: 1.5rem 0;
  text-align: center;
}

.poster-fig img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.poster-fig figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Placeholder blocks */
.figure-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  text-align: center;
  color: var(--text-muted);
}

.figure-placeholder p {
  margin: 0 0 0.5rem;
}

.figure-placeholder .placeholder-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.9;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.results-table th,
.results-table thead th {
  font-weight: 500;
  color: var(--ucsd-blue);
  background: rgba(0, 33, 71, 0.2) !important;
}

.results-table td {
  color: var(--text-muted);
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.results-table thead th:not(:first-child),
.results-table td:not(:first-child) {
  text-align: right;
}

/* Footer */
.site-footer {
  border-bottom: none;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* BibTeX citation block */
.bibtex-wrap {
  position: relative;
  margin-top: 0.5rem;
}

.bibtex-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bibtex-copy:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.bibtex-copy.copied {
  color: #0d9488;
  border-color: #0d9488;
}

.bibtex-block {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  padding-top: 2.25rem;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
  line-height: 1.5;
  user-select: all;
  -webkit-user-select: all;
}

.bibtex-block code {
  background: none;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* Print */
@media print {
  .nav-sticky {
    position: static;
    background: var(--bg);
  }
  .section {
    break-inside: avoid;
  }
}
