
:root {
  --bg:        #0f1214;
  --panel:     #131618;
  --panel-2:   #0a0c0e;
  --text:      #e6e2d6;
  --muted:     #888;
  --accent:    #0abdc6;
  --neon-pink: #ea00d9;
  --neon-purp: #711c91;
  --neon-cyan: #0abdc6;
  --border:    #252525;
  --nav-h:     54px;
  --content-w: 820px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Text selection ── */
::selection {
  background: rgba(113, 28, 145, 0.35);
  color: var(--text);
}

/* ── Top nav ── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  /* neon gradient line along the very top edge */
  border-top: 2px solid transparent;
  border-image: linear-gradient(to right, var(--neon-purp), var(--neon-pink)) 1;
}

.topnav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
  max-width: calc(var(--content-w) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink), 0 0 20px var(--neon-purp);
  flex-shrink: 0;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--text);
  text-decoration: none;
}
.brand-name:hover { color: var(--accent); }

.tagline {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .3px;
}

/* Desktop nav links */
nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: .2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
nav a:hover { color: var(--text); border-bottom-color: var(--border); }
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--neon-pink); }

.burger { display: none; }

/* ── Main content ── */
main {
  max-width: calc(var(--content-w) + 48px);
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* ── Content panel ── */
.content-panel {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--neon-purp);
  max-width: var(--content-w);
  margin: 0 auto 36px;
  padding: clamp(20px, 4vw, 36px);
}

/* ── Info cards (homepage + featured projects) ── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); padding: 14px 16px; }
.card h3 { margin: 0 0 6px; font-size: 11px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.meta { color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-title { margin: 28px 0 8px; color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }

/* ── Homepage hero ── */
.home-hero {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text);
  margin: 0 0 2rem;
  line-height: 1.55;
  font-weight: 400;
}
.home-hero::after {
  content: "█";
  padding-left: 5px;
  color: var(--neon-pink);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Links ── */
a { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover, a:focus-visible { outline: 2px solid var(--neon-cyan); outline-offset: 2px; text-decoration: none; }

/* ── Strong / bold ── */
strong, b { background: var(--text); color: var(--bg); font-weight: 600; padding: 0 2px; }
strong > a, b > a { background: transparent; color: var(--bg); text-decoration: underline; }

/* ── Post list ── */
.post-list { list-style: none; padding: 0; margin: 0; }

.post-entry { margin-bottom: 2.8rem; }

.post-entry > a { display: block; text-decoration: none; color: var(--text); }
.post-entry > a:hover { outline: none; }

.post-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}

.post-entry-title {
  font-size: 14px;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  line-height: 1.4;
}

.post-entry > a:hover .post-entry-title {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  padding: 0 3px;
}

.post-entry-date { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

.post-entry-cover { margin: 8px 0; overflow: hidden; }
.post-entry-cover img { width: 100%; display: block; filter: grayscale(100%); transition: filter .5s linear; }
.post-entry > a:hover .post-entry-cover img { filter: grayscale(0); transition: filter 1s linear; }

.post-excerpt { color: var(--muted); font-size: 12px; line-height: 1.65; margin-top: 6px; }

.continue-reading { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--muted); }
.all-posts-link { display: inline-block; margin-top: 1rem; font-size: 12px; color: var(--muted); }

/* ── Prose ── */
.prose h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 600;
  margin: 0 0 .3em;
  line-height: 1.3;
}
.prose h1::after {
  content: "█";
  padding-left: 5px;
  color: var(--neon-pink);
  animation: blink 1.1s steps(1) infinite;
  font-weight: 400;
}
.prose h2 { font-size: 1.15rem; font-weight: 600; margin: 2.2em 0 .5em; }
.prose h3 { font-size: 1rem; font-weight: 600; margin: 1.8em 0 .4em; }
.prose h4, .prose h5, .prose h6 { font-size: .9rem; font-weight: 600; color: var(--muted); margin: 1.5em 0 .3em; }
.prose p { margin: 0 0 1.4em; font-size: 13.5px; line-height: 1.8; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.8em 0; padding: 0 1.4em;
  color: var(--muted); font-style: italic;
}
.prose blockquote p { font-size: inherit; }
.prose pre { background: #091833; border: 1px solid var(--border); padding: 14px 16px; overflow-x: auto; margin: 1.5em 0 2.5em; line-height: 1.6; }
.prose code { font-family: inherit; font-size: .88em; background: #091833; border: 1px solid var(--border); padding: 1px 5px; }
.prose pre code { background: transparent; border: 0; padding: 0; font-size: inherit; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.prose li { margin-bottom: .45em; font-size: 13.5px; line-height: 1.7; }
.prose img { max-width: 100%; display: block; margin: 2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 3em 0; }
.prose a { color: var(--text); }
.prose strong, .prose b { background: var(--text); color: var(--bg); font-weight: 600; padding: 0 2px; }
.meta-line { color: var(--muted); font-size: 11px; margin-bottom: 2.2em; padding-bottom: 1em; border-bottom: 1px solid var(--border); }

/* ── Footer ── */
.footer {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; padding: 4px 9px;
  border: 1px solid var(--border);
  text-decoration: none; color: var(--muted);
  font-size: 11px; font-family: inherit;
}
.pill:hover { color: var(--text); border-color: var(--muted); }

/* ── Pagination ── */
.pagination { display: flex; gap: 12px; align-items: center; margin-top: 2rem; font-size: 12px; color: var(--muted); }
.pagination a { color: var(--muted); }

/* ── Mobile ── */
@media (max-width: 700px) {
  .tagline { display: none; }

  .burger {
    display: block;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 10px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
  }

  nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    gap: 0;
  }
  nav.open { display: flex; }

  nav a {
    border-bottom: none;
    border-left: 2px solid transparent;
    padding: 10px 10px;
  }
  nav a:hover { border-bottom: none; border-left-color: var(--border); }
  nav a[aria-current="page"] { border-bottom: none; border-left-color: var(--neon-pink); }

  main { padding: 24px 18px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
