/*
 * ricardofalasca.com — cyberpunk theme
 * palette: #182848 (deep navy) / #4b6cb7 (electric blue) / #00f5ff (neon cyan)
 */

@font-face {
  font-family: 'Quicksand';
  src: url('../fonts/Quicksand-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Quicksand';
  src: url('../fonts/Quicksand-Medium.ttf') format('truetype');
  font-weight: 500;
}
@font-face {
  font-family: 'Quicksand';
  src: url('../fonts/Quicksand-Bold.ttf') format('truetype');
  font-weight: 700;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Light.ttf') format('truetype');
  font-weight: 300;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Medium.ttf') format('truetype');
  font-weight: 500;
}

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --bg-deep:      #0b1120;
  --bg-dark:      #182848;
  --bg-mid:       #1e3260;
  --blue:         #4b6cb7;
  --neon:         #00f5ff;
  --neon-dim:     rgba(0, 245, 255, 0.55);
  --neon-faint:   rgba(0, 245, 255, 0.08);
  --magenta:      #b44fff;
  --text-bright:  #ffffff;
  --text-body:    #c2d3e8;
  --text-muted:   #52708e;
  --border:       rgba(75, 108, 183, 0.25);

  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Quicksand', 'Roboto', sans-serif;
}

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

/* ─── Base ──────────────────────────────────────────────── */
html {
  background-color: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-dark) 55%, var(--bg-mid) 100%);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  position: relative;
  overflow-x: hidden;
}

/* ─── Scanlines ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  z-index: 9000;
}

/* ─── Grid background ───────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ────────────────────────────────────────────── */
.site-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 110px;
  position: relative;
  z-index: 1;
}

/* ─── Header ────────────────────────────────────────────── */
.site-header {
  margin-bottom: 52px;
}

.prompt-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.prompt-symbol {
  color: var(--neon);
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 0 14px var(--neon);
  flex-shrink: 0;
}

/* ─── Glitch Title ──────────────────────────────────────── */
.site-title {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 4.5vw, 2.1rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.site-title::before,
.site-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.site-title::before {
  color: var(--neon);
  clip-path: polygon(0 25%, 100% 25%, 100% 45%, 0 45%);
  animation: glitch-a 5.5s infinite linear;
  opacity: 0;
}

.site-title::after {
  color: var(--magenta);
  clip-path: polygon(0 58%, 100% 58%, 100% 72%, 0 72%);
  animation: glitch-b 5.5s infinite linear;
  opacity: 0;
}

@keyframes glitch-a {
  0%, 89%, 100% { opacity: 0; transform: none; }
  90%  { opacity: 1; transform: translateX(-3px) skewX(-6deg); }
  92%  { opacity: 1; transform: translateX(3px)  skewX( 4deg); }
  94%  { opacity: 0; }
}
@keyframes glitch-b {
  0%, 87%, 100% { opacity: 0; transform: none; }
  88%  { opacity: 1; transform: translateX(3px)  skewX( 5deg); }
  91%  { opacity: 1; transform: translateX(-2px) skewX(-3deg); }
  93%  { opacity: 0; }
}

/* ─── Cursor ────────────────────────────────────────────── */
.cursor {
  display: inline-block;
  color: var(--neon);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 12px var(--neon);
  animation: blink 1.1s step-end infinite;
  margin-left: -2px;
}

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

/* ─── Tagline ────────────────────────────────────────────── */
.tagline {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  padding-left: 30px;
  margin-bottom: 22px;
}

/* ─── Social nav ─────────────────────────────────────────── */
.social-nav {
  padding-left: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  list-style: none;
}

.social-nav li + li::before {
  content: '/';
  color: var(--text-muted);
  margin-right: 10px;
}

.social-nav a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

.social-nav a:hover {
  color: var(--neon);
  text-shadow: 0 0 10px var(--neon-dim);
}

/* ─── Section divider ────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.section-divider span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--neon);
  opacity: 0.55;
  white-space: nowrap;
}

/* ─── Post list ──────────────────────────────────────────── */
.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  border-radius: 3px;
}

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

.post-item:hover {
  background: var(--neon-faint);
}

.post-num {
  color: var(--text-muted);
  font-size: 0.72rem;
  min-width: 26px;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  user-select: none;
}

.post-link {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.6;
  transition: color 0.2s;
  flex: 1;
}

.post-link:hover {
  color: var(--text-bright);
}

.post-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* ─── Empty state ─────────────────────────────────────────── */
.empty-state {
  padding: 32px 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border: 1px dashed var(--border);
  border-radius: 4px;
}

.empty-state .blink-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--neon);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
  box-shadow: 0 0 8px var(--neon);
  animation: blink 1.1s step-end infinite;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 13px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

footer a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--neon);
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--neon); }

/* ─── Selection ──────────────────────────────────────────── */
::selection {
  background: var(--neon);
  color: var(--bg-deep);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-wrap { padding: 48px 18px 100px; }
  .post-meta { display: none; }
  .prompt-row { gap: 7px; }
}
