@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;1,300&family=IBM+Plex+Sans:wght@300;400&display=swap');

:root {
  --bg:       #0d0d0d;
  --bg2:      #141414;
  --text:     #c8c8c8;
  --muted:    #555;
  --accent:   #e8ff70;
  --link:     #c8c8c8;
  --border:   #222;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.wordmark:hover {
  text-shadow: 0 0 12px var(--accent);
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }

/* Main */
main { flex: 1; }

/* Home */
.tagline {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 3rem;
  font-style: italic;
}

.post-list {
  list-style: none;
}

.post-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-date {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.post-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s;
}

.post-list a:hover {
  color: var(--accent);
}

/* Single post */
.post { max-width: 100%; }

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post h1 {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.tag {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  font-size: 0.72rem;
}

.post-content {
  font-family: var(--font-sans);
  font-size: 0.97rem;
  line-height: 1.85;
  color: #b8b8b8;
}

.post-content p { margin-bottom: 1.4rem; }
.post-content h2 { font-size: 1.1rem; font-weight: 400; margin: 2rem 0 0.8rem; color: var(--text); }
.post-content h3 { font-size: 0.95rem; font-weight: 400; margin: 1.5rem 0 0.6rem; color: var(--text); }
.post-content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.post-content a:hover { border-color: var(--accent); }
.post-content code { font-family: var(--font-mono); font-size: 0.85em; background: var(--bg2); padding: 0.1em 0.4em; }
.post-content pre { background: var(--bg2); padding: 1.2rem; overflow-x: auto; margin: 1.5rem 0; border-left: 2px solid var(--accent); }
.post-content pre code { background: none; padding: 0; }
.post-content blockquote { border-left: 2px solid var(--muted); padding-left: 1rem; color: var(--muted); margin: 1.5rem 0; font-style: italic; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.post-footer a:hover { color: var(--text); }

/* Archive */
.archive h2 {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Footer */
footer {
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.3rem;
}

/* Blinking cursor */
.blink {
  animation: blink 1.1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Glitch effect on wordmark */
@keyframes glitch {
  0%   { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 0); }
  20%  { clip-path: inset(60% 0 10% 0); transform: translate(2px, 0); }
  40%  { clip-path: inset(40% 0 40% 0); transform: translate(0, 0); }
  60%  { clip-path: inset(80% 0 5%  0); transform: translate(-1px, 0); }
  80%  { clip-path: inset(10% 0 70% 0); transform: translate(1px, 0); }
  100% { clip-path: inset(20% 0 60% 0); transform: translate(0, 0); }
}

/* Mobile */
@media (max-width: 480px) {
  body { padding: 0 1rem; }

  .post-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .post h1 { font-size: 1.3rem; }
}
