:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #0b0b0b;
  --rule: #262626;
  --text: #e6e6e6;
  --muted: #9a9a9a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.top, main, footer { width: calc(100% - 8vw); margin-inline: auto; }
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

a { color: var(--text); text-decoration: underline; text-decoration-color: #555; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.muted, .meta, .status { color: var(--muted); }

.top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-inline: 0; padding: 1.25rem 4vw; background: rgb(0 0 0 / 58%); border-bottom: 1px solid rgb(255 255 255 / .08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.brand { font-size: 2.25rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; text-decoration: none; }
.top h1 { margin: 0; font-size: inherit; line-height: inherit; }
.brand-row { display: flex; align-items: baseline; gap: 1.25rem; }
.brand-links { display: flex; gap: 1rem; font-size: .9rem; }
.brand-links a { color: var(--muted); }
.top nav { display: flex; gap: 1.25rem; }
.top nav a { color: var(--muted); text-decoration: none; padding-block: .6rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }

main { display: grid; gap: 3.5rem; padding-block: 2.5rem 5rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .75rem; letter-spacing: -.01em; }
h2 { font-size: 1.125rem; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 .75rem; }
.intro p { color: var(--muted); max-width: calc((100% - 4rem) / 2 + 4.5rem); }
/* Home is one screen. ponytail: overflow clips on short windows; revisit with the project-display redesign. */
body.home { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.home main { flex: 1; min-height: 0; align-content: start; gap: 1.5rem; padding-block: .25rem 1rem; }
section > p, .interests { max-width: 44rem; }

ul { list-style: none; margin: 0; padding: 0; }
.project p { margin: .25rem 0 0; }
.status { font-weight: 400; font-size: .875rem; margin-left: .35rem; }
.meta { font-size: .875rem; }
.interests { display: grid; gap: .4rem; }

/* Home: Experience | Projects as hairline rows. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head a { font-size: .875rem; color: var(--muted); }
.rows > li { padding-block: .5rem; border-top: 1px solid var(--rule); }
.rows > li:last-child { padding-bottom: 0; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.rows p { margin: .25rem 0 0; }
.when { color: var(--muted); }
.stack { font: .78rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.point-links { margin-left: .35rem; font-size: .8rem; }
.point-links a { color: var(--muted); }
.summary { color: #c4c4c4; font-size: .925rem; }
.points { list-style: "▪  "; padding-left: 1.6rem; margin-top: .3rem; font-size: .875rem; line-height: 1.5; color: #c4c4c4; }
.points li::marker { color: #555; }
.points li + li { margin-top: .1rem; }
.rows .stack { margin-top: .35rem; letter-spacing: .02em; }

/* Home's project list: one level, ├ / └ connectors, no category folders. */
.tree { border-top: 1px solid var(--rule); padding-top: .4rem; }
.tree > li { position: relative; margin-left: .45rem; padding: .25rem 0 .25rem 1.3rem; }
.tree > li::before { content: ""; position: absolute; left: 0; top: 0; width: .9rem; height: 1.1rem; border-left: 1px solid #3d3d3d; border-bottom: 1px solid #3d3d3d; }
.tree > li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 1.1rem; bottom: 0; border-left: 1px solid #3d3d3d; }
.tree .row-head .meta { margin-left: .5rem; color: var(--muted); }
.project-link { text-decoration: none; }
.project-link:hover { text-decoration: underline; }

/* Project write-up pages (projects/<id>.html). */
.prose { max-width: 44rem; }
.prose h1 { font-size: 2.25rem; margin: .5rem 0 .25rem; }
.prose h2 { font-size: 1.05rem; margin: 2rem 0 .6rem; }
.prose p { line-height: 1.65; }
.prose ul { list-style: "▪  "; padding-left: 1.6rem; display: grid; gap: .3rem; }
.prose li::marker { color: #555; }
.prose code { font: .85em ui-monospace, SFMono-Regular, Menlo, monospace; color: #ddd; }
.crumb { font-size: .875rem; }
.crumb a { color: var(--muted); }
.tagline { color: #c4c4c4; font-size: 1.05rem; }
.facts { font: .8rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }

.panel { position: relative; margin-top: 1rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); overflow: hidden; }
.graph { display: block; width: 100%; }
.graph.full { height: max(28rem, 100vh - 20rem); touch-action: none; }
.fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); font-size: .875rem; margin-top: .5rem; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }

.directory-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.filters { display: flex; align-items: baseline; gap: 1rem; }
#directory-search { font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid #555; padding: .55rem 0; width: 100%; max-width: 20rem; min-width: 0; }

footer { color: var(--muted); font-size: .875rem; padding-block: 2rem; border-top: 1px solid var(--rule); }

/* Projects: two flat trees, with no card surfaces. Home's tree is unchanged. */
.project-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; border-top: 0; }
.project-index > li { min-width: 0; padding: .25rem 0 1rem 1.5rem; }
.project-index > li::before { top: 0; height: 1.25rem; }
.project-index > li::after { top: 1.25rem; }
.project-index > li:nth-last-child(-n+2 of :not([hidden]))::after { display: none; }
.project-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .8rem; }
.project-heading h3 { font-size: 1.125rem; overflow-wrap: anywhere; }
.project-index .meta, .project-links { font-size: .875rem; }
.project-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.project-index .points { font-size: .9375rem; line-height: 1.5; margin-top: .3rem; }
.project-index .points li + li { margin-top: .15rem; }
.project-stack { color: var(--muted); }
@media (max-width: 800px) {
  .project-index { grid-template-columns: minmax(0, 1fr); }
  .project-index > li:nth-last-child(2 of :not([hidden]))::after { display: block; }
  .project-links a { display: inline-flex; align-items: center; min-height: 44px; }
}
