:root {
  --bg: #000000;
  --line: #830000;
  --hover: #BC0202;
  --accent: #FF0000;
  --text: #E8E0DC;
  --muted: #8A7F7B;
  --font: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.muted { color: var(--muted); }

/* header */
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  color: var(--text);
}
.brand-name { font-size: 20px; font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

/* page area and the fade htmx triggers while swapping */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px;
  min-height: 70vh;
  transition: opacity 150ms ease;
}
.wrap.htmx-swapping { opacity: 0; }

/* hero */
.hero {
  padding: 120px 0 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}
.path { font-size: 14px; color: var(--muted); }
.hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.2;
  font-weight: 500;
  max-width: 760px;
}
.hero p { margin: 0; font-size: 18px; color: var(--muted); max-width: 620px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
}
.btn:hover { background: var(--line); color: var(--text); }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 6px;
}

/* sections */
.section { padding: 64px 0 96px; }
.section h2 { margin: 0 0 28px; font-size: 20px; font-weight: 500; color: var(--text); }
.prompt { color: var(--accent); }

/* notes list */
.list { display: flex; flex-direction: column; }
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  align-items: baseline;
  min-height: 44px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.row .date { font-size: 14px; color: var(--muted); min-width: 120px; }
.row .title { flex: 1 1 320px; }
.row .arrow { color: var(--hover); }
.row:hover .title { color: var(--accent); }

/* project cards */
.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.card {
  flex: 1 1 280px;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text);
}
.card:hover { border-color: var(--hover); }
.card .name { font-size: 18px; font-weight: 500; }
.card .desc { font-size: 14px; color: var(--muted); }
.card .go { font-size: 14px; color: var(--accent); margin-top: 8px; }

/* detail pages */
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  margin-bottom: 24px;
}
.detail h2 { margin: 0 0 16px; }
.detail p { margin: 0 0 16px; color: var(--muted); max-width: 620px; }

/* contact */
.mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}
.cursor { color: var(--accent); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .bar, .foot { padding-left: 24px; padding-right: 24px; }
  .wrap { padding: 0 24px; }
  .hero { padding: 72px 0 64px; }
  .hero h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .wrap { transition: none; }
  .cursor { animation: none; }
}
