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

:root {
  --bg: #0a0a0c;
  --surface: #141417;
  --line: #2a2a2f;
  --line-strong: #36363d;
  --text: #e4e4e8;
  --post-title: #e4e4e8;
  --muted: #a0a0aa;
  --link: #c8c8d6;
  --prose-link: #78a8ff;
  --prose-link-hover: #9abfff;
  --maxw: 980px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

main {
  padding-top: 0.9rem;
  flex: 1 0 auto;
}

.container {
  width: min(calc(100% - 2rem), var(--maxw));
  margin: 0 auto;
}

.hero {
  padding: 1.2rem 0 0.8rem;
  display: block;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-tagline {
  margin: 0.8rem 0 0;
  color: var(--muted);
  max-width: 48ch;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 0.45rem 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.pill-link {
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.pill-link:hover,
.pill-link:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
  background: #1a1a1f;
}

.pill-link:active {
  background: #202026;
}

.social-links .pill-link {
  color: #f7f7fb;
  border-color: rgba(255, 255, 255, 0.24);
  padding: 0.28rem 0.62rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transform: scale(1);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.social-links .pill-link:hover,
.social-links .pill-link:focus-visible {
  color: #ffffff;
  transform: scale(1.08);
  filter: saturate(1.18) brightness(1.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36), inset 0 0 0 999px rgba(255, 255, 255, 0.08);
}

.social-links .pill-link:active {
  transform: scale(1.03);
  filter: saturate(1);
}

.social-links .pill-link[href*="x.com"],
.social-links .pill-link[href*="twitter.com"] {
  background: linear-gradient(135deg, #000000 0%, #282c37 100%);
}

.social-links .pill-link[href*="mastodon"] {
  background: linear-gradient(135deg, #553fc5 0%, #4c31d1 100%);
}

.social-links .pill-link[href*="github.com"] {
  background: linear-gradient(135deg, #0e1117 0%, #171d28 100%);
}

.social-links .pill-link[href*="linkedin.com"] {
  background: linear-gradient(135deg, #3666bc 0%, #3c6fce 100%);
}

.social-links .pill-link[href*="one-minute-games.com"] {
  background: linear-gradient(135deg, #94281d 0%, #ff2d55 100%);
}

.section {
  padding: 1.2rem 0 1.4rem;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  letter-spacing: -0.01em;
}

.section-lead {
  margin: -0.2rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.button {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.14em;
  color: var(--muted);
  font-size: 0.92rem;
}

.button.ghost:hover {
  color: var(--text);
}

.card-grid {
  display: grid;
  gap: 1rem 1.2rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.post-card h3 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1rem;
  line-height: 1.25;
}

.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-card-link:hover h3,
.post-card-link:focus-visible h3,
.post-card-link:hover p,
.post-card-link:focus-visible p {
  color: var(--text);
}

.card-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-card-link:hover .card-meta,
.post-card-link:focus-visible .card-meta {
  color: var(--text);
}

.project-list {
  display: grid;
  gap: 0.9rem;
}

.project-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.25;
}

.project-main-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-main-link:hover h3,
.project-main-link:focus-visible h3,
.project-main-link:hover p,
.project-main-link:focus-visible p {
  color: var(--text);
}

.project-sources {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.source-link {
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  font-size: 0.88rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.source-link:hover,
.source-link:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
  background: #1a1a1f;
}

.source-link:active {
  background: #202026;
}

.post {
  padding-top: 1.1rem;
  padding-bottom: 1.8rem;
}

.post-header {
  margin-bottom: 0.85rem;
}

.post-header h1 {
  margin: 0;
  color: var(--post-title);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.post-meta {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.post-content {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.prose {
  font-size: 1.05rem;
  color: #c8c8c8;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: var(--post-title);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 1.2em;
  margin-bottom: 0.45em;
}

.prose h1 {
  font-size: 1.4rem;
}

.prose h2 {
  font-size: 1.2rem;
}

.prose h3 {
  font-size: 1.05rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin: 0 0 0.9rem;
}

.prose strong,
.prose b {
  color: var(--post-title);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 0.96em;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--text);
  background: #17171b;
  font-weight: 700;
}

.prose a {
  color: var(--prose-link);
  text-decoration-thickness: 1px;
}

.prose a:hover,
.prose a:focus-visible {
  color: var(--prose-link-hover);
}

.prose a.footnote-ref {
  text-decoration: none;
  font-size: 0.8em;
  vertical-align: super;
  margin-left: 0.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
  color: var(--muted);
}

.prose a.footnote-ref:hover,
.prose a.footnote-ref:focus-visible,
.prose a.footnote-ref.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  background: #1a1a1f;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #1a1a1f;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
  font-size: 0.9em;
}

.prose pre {
  position: relative;
  background: #151519;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  overflow-x: auto;
}

.prose .codehilite {
  margin: 0 0 0.9rem;
}

.prose .codehilite pre {
  margin: 0;
}

.prose pre[data-code-language] {
  padding-top: 2.35rem;
}

.prose pre[data-code-language]::before {
  content: attr(data-code-language);
  position: absolute;
  top: 0.65rem;
  left: 0.8rem;
  color: var(--muted);
  background: #1a1a1f;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.14rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.prose pre code {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
}

.prose blockquote {
  border-left: 2px solid var(--line-strong);
  margin-left: 0;
  padding-left: 0.8rem;
  color: var(--muted);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.1rem 0;
}

.footnotes-enhanced .prose .footnote {
  display: none;
}

.footnote-bubble {
  position: absolute;
  z-index: 40;
  width: min(360px, calc(100vw - 2rem));
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #17171b;
  color: #d2d2d8;
}

.footnote-bubble[hidden] {
  display: none;
}

.footnote-bubble-content {
  font-size: 0.92rem;
  line-height: 1.45;
}

.footnote-bubble-content > *:first-child {
  margin-top: 0;
}

.footnote-bubble-content > *:last-child {
  margin-bottom: 0;
}

.footnote-bubble-content p {
  margin: 0 0 0.5rem;
}

.footnote-bubble-content a {
  color: var(--prose-link);
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 1.4rem;
}

.footer-inner {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-note {
  opacity: 0.9;
}

.empty-state {
  color: var(--muted);
  padding: 0;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 1rem;
  }
}

@media (max-width: 760px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .project-card {
    flex-direction: column;
  }

  .project-sources {
    justify-content: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.65rem 0;
    min-height: unset;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
