/* ── rhygpu.dev shared theme ──────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=Fraunces:ital,opsz,wght@0,9..144,200;0,9..144,400;1,9..144,200;1,9..144,300&display=swap');

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

:root {
  --bg:           #080a0f;
  --bg2:          #0d1018;
  --surface:      #111520;
  --border:       rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text:         #dde0e8;
  --text-muted:   #5a6178;
  --text-dim:     #3a4055;
  --text-body:    #b8bdc8;
  --accent:       #c8d4f0;
  --accent2:      #7a9fff;
  --mono:         'DM Mono', monospace;
  --serif:        'Fraunces', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ambient glow */
body::after {
  content: '';
  position: fixed;
  top: -20%; left: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(120,150,255,0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── LAYOUT ───────────────────────────────────────────────────────────── */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── BACK LINK ────────────────────────────────────────────────────────── */

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 48px 0 0;
  transition: color 0.2s;
}

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

.back::before {
  content: '←';
  font-size: 13px;
  transition: transform 0.2s;
}

.back:hover::before { transform: translateX(-3px); }

/* ── ARTICLE HEADER ───────────────────────────────────────────────────── */

.post-header {
  padding: 36px 0 0;
  animation: fadeUp 0.8s ease both;
}

.kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 20px;
  font-family: var(--mono);
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 200;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 16px;
}

.post-subtitle {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
  font-style: italic;
}

.post-meta {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 52px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

/* ── PROSE ────────────────────────────────────────────────────────────── */

.prose {
  animation: fadeUp 0.8s 0.1s ease both;
}

.prose p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.85;
  margin: 1.4rem 0;
  font-weight: 300;
}

.prose a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 1px solid rgba(122,159,255,0.3);
  transition: border-color 0.2s, color 0.2s;
}

.prose a:hover {
  color: var(--accent);
  border-color: var(--accent2);
}

.prose ul,
.prose ol {
  margin: 1.4rem 0 1.8rem 1.2rem;
  padding-left: 1.1rem;
  color: var(--text-body);
}

.prose li {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.75;
  margin: 0.55rem 0;
  font-weight: 300;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--accent);
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.08rem 0.3rem;
}

.prose pre {
  overflow-x: auto;
  margin: 2rem 0;
  padding: 18px 20px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  color: var(--text-body);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
}

.prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

/* ── BLOCKQUOTES ──────────────────────────────────────────────────────── */

.prose blockquote {
  margin: 2.4rem 0;
  padding: 20px 24px;
  border-left: 2px solid var(--border-hover);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  font-style: italic;
  background: rgba(255,255,255,0.02);
}

.prose blockquote.idea {
  border-left-color: var(--accent2);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 200;
  font-style: italic;
  color: var(--accent);
  padding: 24px 28px;
  background: rgba(122,159,255,0.04);
}

/* ── COVERED COMMITS ──────────────────────────────────────────────────── */

.covered {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.covered h2 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 18px;
}

.covered p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── CLOSING / NEXT ───────────────────────────────────────────────────── */

.closing {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.closing a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── FOOTER ───────────────────────────────────────────────────────────── */

footer {
  margin-top: 80px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-status {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #4caf7a;
  animation: pulse 2.4s ease-in-out infinite;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent2); }

/* ── INDEX PAGE ───────────────────────────────────────────────────────── */

header { padding: 52px 0 0; animation: fadeUp 0.8s ease both; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--text-dim);
}

.site-name {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 200;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--accent);
  margin-bottom: 28px;
}

.site-name span {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.42em;
  letter-spacing: 0.04em;
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
}

.tagline {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.8;
  border-left: 2px solid var(--border-hover);
  padding-left: 18px;
  margin: 32px 0 0;
  font-weight: 300;
  font-style: italic;
}

.rule {
  margin: 52px 0 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hover), transparent);
  position: relative;
}

.rule::after {
  content: attr(data-label);
  position: absolute;
  top: -8px; right: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg);
  padding-left: 12px;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 3.2rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

.featured-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border-hover);
  background: var(--surface);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.25s;
  animation: fadeUp 0.8s 0.15s ease both;
  margin-bottom: 12px;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), transparent);
  opacity: 0.5;
  transition: opacity 0.3s;
}

.featured-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.featured-card:hover::before { opacity: 1; }

.card-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 14px;
}

.card-title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 300;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 12px;
  font-style: italic;
}

.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.75;
  font-weight: 300;
  max-width: 520px;
}

.card-arrow {
  position: absolute;
  bottom: 28px; right: 32px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  transition: color 0.2s, transform 0.2s;
}

.featured-card:hover .card-arrow { color: var(--accent2); transform: translateX(3px); }

.devlog-list { list-style: none; margin-top: 4px; }

.devlog-item { animation: fadeUp 0.7s ease both; }
.devlog-item:nth-child(1) { animation-delay: 0.25s; }
.devlog-item:nth-child(2) { animation-delay: 0.32s; }
.devlog-item:nth-child(3) { animation-delay: 0.39s; }
.devlog-item:nth-child(4) { animation-delay: 0.46s; }
.devlog-item:nth-child(5) { animation-delay: 0.53s; }

.devlog-link {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0 20px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s;
}

.devlog-link:hover { border-color: var(--border-hover); }
.devlog-link:hover .devlog-num { color: var(--accent2); }
.devlog-link:hover .devlog-title { color: var(--accent); }

.devlog-num {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  font-weight: 300;
  transition: color 0.2s;
  padding-top: 1px;
}

.devlog-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.2s;
}

.devlog-sub {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 300;
  margin-top: 5px;
  line-height: 1.5;
}

.devlog-chevron {
  font-size: 11px;
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
  align-self: center;
}

.devlog-link:hover .devlog-chevron { color: var(--accent2); transform: translateX(3px); }

/* ── ANIMATIONS ───────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── MOBILE ───────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .devlog-link { grid-template-columns: 40px 1fr auto; gap: 0 12px; }
  .featured-card { padding: 22px 20px; }
  .card-arrow { position: static; margin-top: 16px; display: block; }
  footer { flex-direction: column; gap: 12px; }
  .prose p { font-size: 14px; }
}