/* ---- Base ---- */
:root {
  --ink: #000000;
  --muted: #555;
  --line: #000000;
  --line-soft: #e3e3e3;
  --bg: #ffffff;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

/* ---- Header / nav ---- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 2px solid var(--line);
}
.site-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-title:hover { text-decoration: underline; }
.site-nav a {
  margin-left: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a:first-child { margin-left: 0; }

/* ---- Main ---- */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h2 { font-weight: 800; letter-spacing: -0.01em; }

.intro-links a { display: inline-block; margin-right: 1.5rem; font-weight: 600; }

/* ---- Blog list ---- */
.post-list { list-style: none; padding: 0; }
.post-list li {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.post-date { color: var(--muted); min-width: 6.5rem; }
.post-meta { color: var(--muted); margin-top: -0.5rem; }
.back-link { margin-top: 2.5rem; }

/* ---- Blog grid of clickable cards ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 1.1rem 1.1rem 1rem;
  border: 2px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.post-card:hover {
  background: var(--ink);
  color: var(--bg);
}
.post-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.post-card-section {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.post-card-lang {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
  padding: 0.05rem 0.35rem;
}
.post-card-title {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}
.post-card-date {
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- Project grid of clickable cards ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 240px;
  padding: 1.1rem;
  border: 2px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.project-card:hover {
  background: var(--ink);
  color: var(--bg);
}
.project-card-title {
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.project-card-tagline { font-size: 0.9rem; margin-top: 0.4rem; }

/* ---- Button ---- */
.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.button:hover {
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}

/* ---- Project QR code ---- */
.project-qr {
  margin-top: 1.5rem;
}
.project-qr img {
  display: block;
  width: 160px;
  height: 160px;
  border: 2px solid var(--ink);
  padding: 0.5rem;
  background: #fff;
}
.project-qr p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ---- Footer ---- */
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
