/* Brian Cabral — site stylesheet */

:root {
  --bg: #303030;
  --bg-elevated: #3a3a3a;
  --border: #4a4a4a;
  --text: #e8e8e8;
  --muted: #a8a8a8;
  --gold: #dfaa00;
  --link: #6cb6ff;
  --link-visited: #9a8cff;
  --max-width: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

/* Homepage only: the spherical-barycentric-interpolation figure from
   Brian's own BRDF work, as a backdrop behind the content. Applied to
   <main> itself (not the full-width page) so it's scaled to the text
   frame's own width/height, not stretched edge-to-edge of the viewport. */
main.home-bg {
  background-image: url("SphericalBaricentric.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:visited { color: var(--link-visited); }
a:hover, a:focus { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #1c1c1c;
  padding: 8px 12px;
  z-index: 10;
}
.skip-link:focus { left: 8px; top: 8px; }

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; color: var(--gold); }

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
}

nav.site-nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 2px;
}
nav.site-nav a:hover,
nav.site-nav a:focus,
nav.site-nav a[aria-current="page"] {
  color: var(--gold);
  text-decoration: none;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1 {
  color: var(--gold);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 20px;
}

h2 {
  color: var(--gold);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
}

p { margin: 0 0 16px; }

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.hero img.avatar {
  width: 140px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.hero .intro h1 { margin-bottom: 4px; }
.hero .intro .title {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
}

.quicklinks {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.quicklinks a { font-size: 15px; }

section { margin-bottom: 36px; }

.entry {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.entry:last-child { border-bottom: none; }

.entry .entry-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.entry .entry-body {
  color: var(--muted);
  font-size: 14.5px;
}

.entry .entry-meta {
  color: var(--muted);
  font-size: 14px;
}

table.patent-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.patent-list caption {
  text-align: left;
  color: var(--gold);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-top: 24px;
}
table.patent-list caption:first-child { padding-top: 0; }
table.patent-list td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.patent-list td.num { white-space: nowrap; color: var(--muted); width: 110px; }

footer.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  padding: 24px 20px 40px;
}

@media (max-width: 480px) {
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .hero img.avatar { width: 120px; }
}
