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

@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.4);
  --dim: rgba(80, 80, 80, 0.55);
  --border: rgba(120, 120, 120, 0.3);
  --font: "Fira Code", monospace;
  --content-w: 680px;
  --gap: 1.5rem;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.7;
}

/* ── Corners ── */
#corners {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--border);
  border-style: solid;
}

.corner.tl { top: 16px; left: 16px; border-width: 2px 0 0 2px; }
.corner.tr { top: 16px; right: 16px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: 16px; left: 16px; border-width: 0 0 2px 2px; }
.corner.br { bottom: 16px; right: 16px; border-width: 0 2px 2px 0; }

/* ── Header ── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 32px;
}

#logo {
  color: var(--fg);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

#nav {
  display: flex;
  gap: 1.8rem;
  margin-left: auto;
}

#nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  line-height: 1;
  transition: color 0.2s;
}

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

/* ── Main Content ── */
#main-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 24px 40px;
}

/* ── Home Title ── */
#home-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  user-select: none;
  text-align: center;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  #home-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 480px) {
  #home-title {
    font-size: 2rem;
  }
}

/* ── Post List ── */
#post-list {
  max-width: var(--content-w);
}

.post-item {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  justify-content: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

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

.post-date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 400;
}

.post-link {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  transition: opacity 0.2s;
}

.post-link:hover {
  opacity: 0.6;
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 2rem;
}

/* ── List Header ── */
#list-header {
  text-align: center;
  margin-bottom: 2.5rem;
  width: 100%;
  max-width: var(--content-w);
}

#list-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.list-content {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ── Single Post ── */
#post {
  width: 100%;
  max-width: var(--content-w);
}

#post-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

#post-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin-top: 0.5rem;
}

/* ── Content Typography ── */
#post-content {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.85;
}

#post-content h1,
#post-content h2,
#post-content h3,
#post-content h4 {
  font-weight: 600;
  margin: 2rem 0 0.8rem;
  letter-spacing: 0.03em;
}

#post-content h1 { font-size: 1.5rem; }
#post-content h2 { font-size: 1.25rem; }
#post-content h3 { font-size: 1.1rem; }

#post-content p {
  margin: 1rem 0;
}

#post-content a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--muted);
  transition: text-decoration-color 0.2s;
}

#post-content a:hover {
  text-decoration-color: var(--fg);
}

#post-content strong {
  font-weight: 600;
}

#post-content em {
  font-style: italic;
}

#post-content blockquote {
  border-left: 3px solid var(--muted);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  color: var(--muted);
  font-style: italic;
}

#post-content code {
  font-family: var(--font);
  font-size: 0.82rem;
  background: rgba(255,255,255,0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

#post-content pre {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

#post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.8rem;
  line-height: 1.6;
}

#post-content ul,
#post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

#post-content li {
  margin: 0.3rem 0;
}

#post-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem 0;
}

#post-content hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 2rem 0;
}

/* ── Post Footer ── */
#post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--fg);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  #site-header {
    padding: 16px 20px;
  }

  #logo {
    font-size: 1.0rem;
  }

  #nav {
    font-size: 1.0rem;
    gap: 0.7rem;
  }

  #hero-title {
    font-size: 1.8rem;
  }

  #post-title {
    font-size: 1.4rem;
  }

  .post-item {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  #post-content {
    font-size: 0.88rem;
  }

  .corner {
    width: 24px;
    height: 24px;
  }

  .corner.tl { top: 12px; left: 12px; }
  .corner.tr { top: 12px; right: 12px; }
  .corner.bl { bottom: 12px; left: 12px; }
  .corner.br { bottom: 12px; right: 12px; }
}

@media (max-width: 480px) {
  #site-header {
    padding: 12px 16px;
  }

  #hero-title {
    font-size: 1.4rem;
  }

  #post-title {
    font-size: 1.2rem;
  }
}
