@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0d0f12;
  --surface: #161a20;
  --text: #e6e9ef;
  --text-muted: #8b919e;
  --accent: #7dd3b0;
  --accent-dim: #5ab896;
  --border: #2a2f38;
}

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

header {
  margin-bottom: 4rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

h2 a {
  color: inherit;
  text-decoration: none;
}

h2 a:hover {
  color: var(--accent);
}

.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.project-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.project-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.project-link:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

.resume-preview {
  width: 100%;
  height: 270px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 0.9rem;
  background: #0b0d11;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Contact form */
.contact-form label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-form p {
  margin-bottom: 1rem;
}

.contact-form p:last-of-type {
  margin-bottom: 0;
}

.contact-form input[type="email"],
.contact-form input[name="subject"],
.contact-form textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.contact-form textarea {
  min-height: 10rem;
  resize: vertical;
}

.contact-form button {
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--accent-dim);
}

/* Sticky “back to home” (contact + DSC 80 report) */
nav.subpage-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -1.5rem 2rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to bottom, rgba(13, 15, 18, 0.98), rgba(13, 15, 18, 0.9));
  border-bottom: 1px solid rgba(42, 47, 56, 0.9);
  backdrop-filter: blur(14px);
}

nav.subpage-nav .crumbs {
  font-size: 0.8rem;
  color: var(--text-muted);
}

nav.subpage-nav .crumbs a,
nav.subpage-nav .crumbs a:link,
nav.subpage-nav .crumbs a:visited {
  color: var(--accent);
  text-decoration: none;
}

nav.subpage-nav .crumbs a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

/* Long-form report pages (DSC 80, etc.) — matches home tokens */
.report-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.report-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.report-meta-label {
  opacity: 0.7;
  margin-right: 0.4rem;
}

.toc-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}

.toc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.toc-panel ul {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  padding-left: 0;
  font-size: 0.9rem;
}

.toc-panel li {
  list-style: none;
}

.toc-panel li + li {
  margin-top: 0.3rem;
}

.toc-panel a,
.toc-panel a:link,
.toc-panel a:visited {
  color: var(--accent);
  text-decoration: none;
}

.toc-panel a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

.report-prose section {
  margin-bottom: 2.25rem;
}

.report-prose p {
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.report-prose ul {
  margin: 0.4rem 0 0.7rem 1.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.report-prose li + li {
  margin-top: 0.25rem;
}

.report-prose strong {
  color: var(--text);
  font-weight: 600;
}

.report-prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--surface);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent);
}

.report-prose a,
.report-prose a:link,
.report-prose a:visited {
  color: var(--accent);
  text-decoration: none;
}

.report-prose a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

.callout {
  margin-top: 0.75rem;
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  background: var(--surface);
  border: 1px solid rgba(125, 211, 176, 0.25);
  font-size: 0.9rem;
  color: var(--text);
}

.callout strong {
  font-weight: 600;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
  margin-bottom: 0.9rem;
}

.metric {
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.metric-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Inline Plotly: border sized from export dimensions (--plot-max-w / --plot-min-h on each wrap) */
.plot-embed-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: min(100%, var(--plot-max-w, 600px));
  margin: 0.9rem auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.plot-embed-wrap .plotly-graph-div,
.plot-embed-wrap .dsc80-plot-div {
  width: 100% !important;
  min-height: var(--plot-min-h, 400px);
  box-sizing: border-box;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
}

.report-table th {
  text-align: left;
  font-weight: 600;
}

.report-table .num {
  text-align: right;
}

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