/* ============================================
   TermSite — Terminal-style personal homepage
   Shared stylesheet
   ============================================ */

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

body {
  font-family: "Cascadia Code", "JetBrains Mono", "Fira Code", "Consolas", monospace;
  background: #fafafa;
  color: #111;
  line-height: 1.7;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

/* ---- Header ---- */
header { margin-bottom: 48px; }
.prompt-line {
  color: #888;
  font-size: 13px;
  margin-bottom: 4px;
}
.prompt-line span { color: #2b6; }
.site-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.site-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
  margin-top: -2px;
}
.subtitle { color: #888; font-size: 13px; margin-bottom: 16px; }
nav { margin: 12px 0 0; }
nav a {
  color: #111;
  text-decoration: none;
  margin-right: 20px;
  font-size: 13px;
}
nav a:hover {
  background: #111;
  color: #fafafa;
  padding: 1px 2px;
}
nav a.active {
  background: #111;
  color: #fafafa;
  padding: 1px 2px;
}

/* ---- Section header (homepage) ---- */
.sec-header {
  display: flex;
  align-items: baseline;
  margin: 0 0 8px;
}
.sec-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #888;
}
.sec-count {
  font-size: 11px;
  color: #bbb;
  margin-left: 8px;
}

/* ---- Page title (list pages) ---- */
.page-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #888;
  margin: 0 0 4px;
}
.page-title::before { content: "## "; color: #ccc; }
.page-count {
  font-size: 12px;
  color: #bbb;
  margin-bottom: 20px;
}

/* ---- More link ---- */
.more-link {
  display: inline-block;
  margin: 12px 0 40px;
  font-size: 12px;
  color: #888;
  text-decoration: none;
}
.more-link:hover {
  color: #111;
  background: #eee;
  padding: 1px 2px;
}

/* ---- Article list ---- */
.article-entry {
  display: flex;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dotted #ddd;
}
.article-entry:last-child { border-bottom: none; }
.article-date {
  color: #aaa;
  font-size: 12px;
  min-width: 90px;
  flex-shrink: 0;
}
.article-link {
  color: #111;
  text-decoration: none;
  font-size: 14px;
}
.article-link:hover { text-decoration: underline; }
.article-tag {
  font-size: 11px;
  color: #888;
  border: 1px solid #ddd;
  padding: 0 6px;
  margin-left: 8px;
}

/* ---- Article page (reading) ---- */
.article-body {
  margin-top: 32px;
}
.article-body h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 8px;
}
.article-body h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 8px;
}
.article-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 6px;
}
.article-body p {
  margin: 12px 0;
  line-height: 1.8;
}
.article-body code {
  background: #eee;
  font-family: inherit;
  font-size: 13px;
  padding: 1px 4px;
}
.article-body pre {
  background: #eee;
  padding: 12px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}
.article-body pre code {
  background: none;
  padding: 0;
}
.article-body blockquote {
  border-left: 3px solid #ddd;
  padding-left: 16px;
  margin: 12px 0;
  color: #666;
}
.article-body ul, .article-body ol {
  margin: 12px 0;
  padding-left: 24px;
}
.article-body li { margin: 4px 0; }
.article-body a { color: #111; }
.article-body a:hover { color: #666; }
.article-body hr {
  border: none;
  border-top: 1px dotted #ddd;
  margin: 32px 0;
}
.article-body img {
  max-width: 100%;
  border: 1px solid #ddd;
  margin: 16px 0;
}

/* ---- Software list ---- */
.software-entry {
  padding: 12px 0;
  border-bottom: 1px dotted #ddd;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.software-entry:last-child { border-bottom: none; }
.software-entry .article-date::before {
  content: "";
}
.software-entry .article-date {
  color: #2b6;
  font-size: 12px;
  min-width: 28px;
}
.software-entry .article-link {
  color: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}
.software-entry .article-link:hover {
  text-decoration: underline;
}
.software-desc {
  width: 100%;
  color: #666;
  font-size: 13px;
  margin: 2px 0 4px 28px;
}
.software-meta {
  width: 100%;
  font-size: 11px;
  color: #aaa;
  margin-left: 28px;
}
.software-meta a {
  color: #111;
  text-decoration: none;
}
.software-meta a:hover { text-decoration: underline; }

/* ---- Software detail page ---- */
.soft-detail-header {
  margin-bottom: 32px;
}
.soft-detail-header .name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.soft-detail-header .name::before {
  content: "> ";
  color: #2b6;
  font-size: 20px;
}
.soft-detail-header .version {
  color: #888;
  font-size: 12px;
  margin-bottom: 8px;
}
.soft-detail-header .tagline {
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
}
.soft-detail-header .actions {
  margin-top: 12px;
}
.soft-detail-header .actions a {
  display: inline-block;
  margin-right: 16px;
  padding: 4px 12px;
  font-size: 13px;
  color: #111;
  text-decoration: none;
  border: 1px solid #111;
}
.soft-detail-header .actions a:hover {
  background: #111;
  color: #fafafa;
}
.soft-detail-body {
  margin-top: 32px;
}
.soft-detail-body h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dotted #ddd;
}
.soft-detail-body h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 20px 0 6px;
}
.soft-detail-body p {
  margin: 10px 0;
  line-height: 1.8;
  color: #333;
}
.soft-detail-body ul, .soft-detail-body ol {
  margin: 10px 0;
  padding-left: 20px;
  color: #333;
}
.soft-detail-body li { margin: 4px 0; }
.soft-detail-body code {
  background: #eee;
  font-family: inherit;
  font-size: 13px;
  padding: 1px 4px;
}
.soft-detail-body pre {
  background: #eee;
  padding: 12px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}
.soft-detail-body .screenshot {
  margin: 20px 0;
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  background: #f5f5f5;
}
.soft-detail-body .screenshot img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}
.soft-detail-body .screenshot .caption {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
}
.soft-detail-body hr {
  border: none;
  border-top: 1px dotted #ddd;
  margin: 28px 0;
}
.soft-detail-body blockquote {
  border-left: 3px solid #ddd;
  padding-left: 16px;
  margin: 12px 0;
  color: #666;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.feature-item {
  border: 1px solid #eee;
  padding: 12px;
  font-size: 13px;
}
.feature-item .label {
  font-weight: 700;
  color: #111;
  display: block;
  margin-bottom: 2px;
}
.feature-item .val {
  color: #666;
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}
.changelog {
  margin: 16px 0;
}
.changelog .ver {
  font-weight: 700;
  color: #111;
  margin: 12px 0 4px;
}
.changelog .ver-date {
  color: #aaa;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 400;
}
.changelog ul {
  margin: 4px 0 4px 14px;
  padding: 0;
}
.changelog li {
  font-size: 13px;
  color: #555;
  margin: 2px 0;
}

/* ---- About page ---- */
.about-body {
  margin-top: 20px;
}
.about-body p {
  margin: 12px 0;
  line-height: 1.8;
}
.about-body .label {
  color: #888;
  font-size: 12px;
  display: inline-block;
  min-width: 80px;
}
.about-links {
  margin-top: 24px;
}
.about-links a {
  color: #111;
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  margin-right: 20px;
}
.about-links a:hover { text-decoration: underline; }

/* ---- Footer ---- */
footer {
  margin-top: 80px;
  padding-top: 16px;
  border-top: 1px dotted #ddd;
  font-size: 12px;
  color: #aaa;
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #111;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---- Back link ---- */
.back-link {
  display: inline-block;
  font-size: 12px;
  color: #888;
  text-decoration: none;
  margin-bottom: 12px;
}
.back-link:hover { color: #111; }

/* ---- Media ---- */
@media (max-width: 600px) {
  .container { padding: 32px 16px 80px; }
  .article-entry { flex-direction: column; padding: 10px 0; }
  .article-date { min-width: auto; margin-bottom: 2px; }
}
