:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6168;
  --line: #e2e3e5;
  --accent: #500000;          /* Aggie maroon */
  --accent-soft: #f5ecec;
  --code-bg: #f2f3f4;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1a1b1e;
    --text: #e6e7e9;
    --muted: #a0a4ab;
    --line: #2c2e33;
    --accent: #e08a8a;
    --accent-soft: #2a1d1e;
    --code-bg: #1f2124;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, video { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 0.9rem 1rem; border-radius: 6px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

main { padding: 2rem 0 3rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; margin: 2.4rem 0 0.7rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.08rem; margin: 1.6rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.3rem; }

.lede { font-size: 1.12rem; color: var(--muted); max-width: 46rem; }
.meta { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; padding: 0; list-style: none; }
.tags li { font-family: var(--mono); font-size: 0.78rem; background: var(--accent-soft); color: var(--accent); padding: 0.15rem 0.55rem; border-radius: 999px; margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.5rem 0 1.5rem; font-size: 0.95rem; }

.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 0.7rem 1rem; border-radius: 0 6px 6px 0; margin: 1rem 0 1.4rem; }
.status { display: inline-block; font-family: var(--mono); font-size: 0.78rem; border: 1px solid var(--accent); color: var(--accent); padding: 0.1rem 0.5rem; border-radius: 4px; }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin: 1rem 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.card:hover { border-color: var(--accent); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #fff; border-bottom: 1px solid var(--line); }
.card .body { padding: 0.8rem 1rem 1rem; }
.card h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card .meta { margin: 0 0 0.4rem; }

/* Figures */
figure { margin: 1.2rem 0; }
figure img, figure video { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
.grid-2, .grid-3 { display: grid; gap: 0.8rem; margin: 1.2rem 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 figure, .grid-3 figure { margin: 0; }
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 1.65rem; }
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--code-bg); }

/* Skills / about */
.skill-row { display: grid; grid-template-columns: 9rem 1fr; gap: 0.3rem 1rem; margin-bottom: 0.6rem; }
@media (max-width: 600px) { .skill-row { grid-template-columns: 1fr; } }
.skill-row dt { font-weight: 600; }
.skill-row dd { margin: 0; color: var(--muted); }
.entry { margin-bottom: 1.4rem; }
.entry .head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; }
.entry .head strong { font-size: 1.02rem; }

.site-footer { border-top: 1px solid var(--line); padding: 1.4rem 0 2rem; color: var(--muted); font-size: 0.88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
