:root { --bg: #ffffff; --text: #1a1a1a; --muted: #666666; --line: #1a1a1a; --tile: #e6e6e6;
        --accent: #c0151b; --accent-bg: rgba(192, 21, 27, 0.08); }
@media (prefers-color-scheme: dark) {
  :root { --bg: #151515; --text: #e8e8e8; --muted: #999999; --line: #e8e8e8; --tile: #2a2a2a;
          --accent: #BF0707; --accent-bg: rgba(191, 7, 7, 0.12); }
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0 0 4rem;
  background: var(--bg); color: var(--text);
  font: 1.0625rem/1.65 Georgia, "Times New Roman", serif;
}

.wrap { max-width: 800px; margin: 0 auto; padding: 0 1rem; text-align: left; }
main { padding-top: 1.5rem; }

/* sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--text);
  padding-top: 1rem;
}


.title-line {
  padding: 1rem 0 0.25rem;
  font-size: 3rem;
  font-weight: bold;
  line-height: 1.1;
  text-align: left;
}

.title-line .name {
  color: var(--accent);
}


.site-header .links {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.25rem 0 0.75rem;
}

.site-header .links a {
  padding: 0.1rem 0.9rem;
  line-height: 1.4;
  font-size: 0.95rem;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 5px;
  transition: background 0.15s;
}

.site-header .links a:hover {
  background: var(--accent);
  color: var(--bg);
}

.site-header .links a[aria-current="page"] {
  font-weight: bold;
  border-bottom: 1px solid var(--accent);  /* cancels the old underline */
}
.box {
  min-width: 0;
  margin: 0 0 0.75rem;
  padding: 0.5rem 1.5rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.box legend {
  padding: 0 0.75rem;
  margin-left: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text);
}

.box > :last-child { margin-bottom: 0; }

/* about page */
.qualifications {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: 0;
}

.qualifications span {
  padding: 0.1rem 0.9rem;
  line-height: 1.4;
  font-size: 0.95rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 1px;
}

.job { text-align: left; margin-bottom: 1.5rem; }
.job-meta { margin-top: 0; color: var(--muted); }

a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--accent); margin: 1.5rem 0; }
p { margin: 0 0 1rem; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* anchor links won't hide under the sticky header */
html { scroll-padding-top: 8rem; }

/* blog list */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 1rem; text-align: left; }
.posts a { font-size: 1.15rem; }
.posts time { color: var(--muted); font-size: .95rem; white-space: nowrap; }

/* projects grid: 2 columns x 5 rows per page */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1.25rem; }
.tile { text-decoration: none; display: block; }
.thumb { aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile span { display: block; margin-top: .4rem; }
.tile:hover span { text-decoration: underline; }

/* page selector */
#pager a, #pager span { display: inline-block; min-width: 2rem; padding: .1rem .4rem; margin: 0 .15rem; }
#pager [aria-current="page"] { font-weight: bold; text-decoration: none; border-bottom: 1px solid var(--line); }
