@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&display=swap");

:root {
  --bg: #080808;
  --panel: #111111;
  --panel-2: #0d0d0d;
  --bar: #1a1a1a;
  --line: #4a4a4a;
  --line-soft: #343434;
  --text: #d8d8d8;
  --muted: #9f9f9f;
  --accent: #ffffff;
  --ok: #c6c6c6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

.bg-shape {
  display: none;
}

.site-header,
main,
.site-footer {
  width: 100%;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.42rem 2.8vw;
  border-bottom: 1px solid var(--line);
  background: var(--bar);
}

.brand {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  color: #f4f4f4;
  display: inline-flex;
  align-items: center;
}

.brand-left {
  color: #9ad0ff;
}

.brand-right {
  color: #8cffc3;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

.nav-list a {
  text-decoration: none;
  color: #cccccc;
  font-size: 0.78rem;
  border: 1px solid #303030;
  background: #171717;
  padding: 0.1rem 0.33rem;
  position: relative;
}

.nav-list a::after {
  content: attr(data-shortcut);
  position: absolute;
  left: 50%;
  top: calc(100% + 0.45rem);
  transform: translateX(-50%) translateY(-2px);
  font-size: 0.72rem;
  color: #d8d8d8;
  background: #0a0a0a;
  border: 1px solid #434343;
  padding: 0.16rem 0.36rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #ffffff;
  border-color: #7a7a7a;
  background: #222222;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-list a.shortcut-active {
  border-color: #c2c2c2;
  background: #353535;
}

main {
  padding-bottom: 5rem;
}

.hero,
.card-section {
  width: 100%;
  padding-inline: 2.8vw;
}

.hero {
  margin-top: 0.9rem;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: 2.1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  position: relative;
}

.hero::before {
  content: "[ session ] privacycoders.org  [ connected ]";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.34rem 0.75rem;
  font-size: 0.78rem;
  color: #d7d7d7;
  background: #1c1c1c;
  border-bottom: 1px solid #464646;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ok);
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  max-width: 18ch;
}

.hero-copy {
  margin-top: 1.1rem;
  margin-bottom: 1.4rem;
  max-width: 56ch;
  color: var(--muted);
}

.button {
  display: inline-block;
  text-decoration: none;
  color: #f2f2f2;
  border: 1px solid #616161;
  background: #252525;
  padding: 0.58rem 0.9rem;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.button:hover,
.button:focus-visible {
  background: #333333;
  border-color: #8d8d8d;
}

.card-section {
  margin-top: 0.9rem;
  padding-top: 2.1rem;
  padding-bottom: 1.9rem;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
  position: relative;
}

.card-section::before {
  content: "panel";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.26rem 0.72rem;
  font-size: 0.77rem;
  color: #d0d0d0;
  border-bottom: 1px solid #3e3e3e;
  background: #1a1a1a;
}

#about.card-section::before {
  content: "about.txt";
}

#projects.card-section::before {
  content: "projects.lst";
}

#contact.card-section::before {
  content: "contact.cfg";
}

h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  letter-spacing: 0.01em;
}

.card-section p,
.project-list {
  max-width: 70ch;
  color: #b8b8b8;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.resource-card {
  border: 1px solid #323232;
  background: #141414;
  padding: 0.7rem;
}

.resource-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: #ededed;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.resource-card p {
  margin: 0;
  font-size: 0.83rem;
  color: #aaaaaa;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  border: 1px solid #323232;
  background: #141414;
  padding: 0.7rem;
  margin-bottom: 0.65rem;
}

.post-link {
  color: #efefef;
  text-decoration: none;
  font-size: 0.95rem;
}

.post-link:hover,
.post-link:focus-visible {
  text-decoration: underline;
}

.post-meta {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: #9c9c9c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-excerpt {
  margin: 0.4rem 0 0;
  color: #afafaf;
  font-size: 0.84rem;
}

.post-content p,
.post-content ul,
.post-content ol {
  max-width: 74ch;
}

.post-content h2,
.post-content h3 {
  margin-top: 1.2rem;
}

.tree-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #303030;
  background: #101010;
}

.tree-post-item {
  margin: 0;
  padding: 0.45rem 0.55rem 0.5rem;
  border-bottom: 1px solid #252525;
  outline: none;
}

.tree-post-item:last-child {
  border-bottom: 0;
}

.tree-post-item.tree-active {
  background: #171717;
}

.tree-post-item:focus-visible {
  box-shadow: inset 0 0 0 1px #8f8f8f;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tree-toggle,
.tree-open {
  font: inherit;
  color: #dddddd;
  background: #161616;
  border: 1px solid #414141;
}

.tree-toggle {
  width: 1.6rem;
  height: 1.35rem;
  padding: 0;
  line-height: 1;
}

.tree-open {
  flex: 1;
  text-align: left;
  padding: 0.22rem 0.38rem;
}

.tree-toggle:hover,
.tree-toggle:focus-visible,
.tree-open:hover,
.tree-open:focus-visible {
  background: #242424;
  border-color: #7f7f7f;
}

.tree-description {
  margin: 0.4rem 0 0 2.1rem;
  color: #b0b0b0;
  font-size: 0.83rem;
  max-width: 80ch;
}

.post-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 100;
}

.post-modal[hidden] {
  display: none;
}

.post-modal-dialog {
  width: min(72rem, 96vw);
  max-height: 88vh;
  border: 1px solid #555555;
  background: #101010;
  display: flex;
  flex-direction: column;
}

.post-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #3a3a3a;
  background: #1a1a1a;
}

.post-modal-header h2 {
  margin: 0;
  font-size: 0.98rem;
}

.post-modal-body {
  overflow: auto;
  padding: 0.9rem;
}

.post-modal-body p,
.post-modal-body li,
.post-modal-body h2,
.post-modal-body h3 {
  max-width: 76ch;
}

.project-list {
  margin: 0;
  padding-left: 1.1rem;
}

.project-list li {
  margin-bottom: 0.35rem;
}

strong {
  color: #f1f1f1;
}

.site-footer {
  margin-top: 0.9rem;
  padding: 0.45rem 2.8vw 0.75rem;
  color: #aaaaaa;
  font-size: 0.79rem;
  border-top: 1px solid #3b3b3b;
  background: #131313;
}

.not-found {
  width: 100%;
  min-height: calc(100vh - 8rem);
  padding: 10vh 2.8vw 0;
}

.not-found h1 {
  max-width: none;
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding-inline: 0.9rem;
  }

  .hero,
  .card-section,
  .site-footer,
  .not-found {
    padding-inline: 0.9rem;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .nav-list {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}
