/* ============================================================
   LQQ.BLOG — minimal futuristic personal blog
   ============================================================ */

:root {
  --bg: #060608;
  --bg-2: #0b0b10;
  --ink: #ececf1;
  --muted: #8a8a96;
  --faint: #4a4a56;
  --accent: #5ee6ff;
  --accent-2: #8a7cff;
  --line: rgba(255, 255, 255, 0.08);
  --font-d: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-b: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-m: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html:not(.lenis) { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #04141a; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--faint); }

/* ---------- utilities ---------- */

.mono {
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

.u-mask { display: block; overflow: hidden; }
.char { display: inline-block; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45em 1.1em;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.grad-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- fixed layers ---------- */

.noise {
  position: fixed; inset: -20%;
  width: 140%; height: 140%;
  pointer-events: none;
  z-index: 900;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

.bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 2px;
  z-index: 950;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- custom cursor ---------- */

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 1200;
  border-radius: 50%;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: #fff; }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; border-color: #fff; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  body, a, button, [data-hover] { cursor: none; }
}

/* ---------- preloader ---------- */

.preloader {
  position: fixed; inset: 0;
  z-index: 1100;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--pad);
}
.preloader__inner { display: contents; }
.preloader__count {
  font-family: var(--font-d);
  font-size: clamp(4rem, 14vw, 11rem);
  font-weight: 500;
  line-height: 0.9;
  color: var(--ink);
}
.preloader__bar {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--line);
}
.preloader__bar span {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- header ---------- */

.site-head {
  position: fixed; top: 0; left: 0;
  width: 100%;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad);
  transition: transform 0.5s var(--ease), background 0.4s;
}
.site-head.is-hidden { transform: translateY(-110%); }
.site-head.is-solid {
  background: rgba(6, 6, 8, 0.82);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 0.6em;
}
.logo i {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

.site-nav { display: flex; gap: 2.4rem; }
.site-nav a {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding: 0.3em 0;
  transition: color 0.3s;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.head-meta { display: flex; align-items: center; gap: 1.6rem; }
@media (max-width: 760px) { .head-meta .mono:nth-child(2), .site-nav { display: none; } }

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad) 9vh;
}

.hero__eyebrow {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 3vh;
}
.hero__eyebrow .rule { flex: 0 0 56px; height: 1px; background: var(--faint); }

.hero__title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(3rem, 11.5vw, 10.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__title .row { display: flex; align-items: baseline; gap: 0.25em; flex-wrap: wrap; }
.hero__title .hollow {
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 236, 241, 0.65);
}

.caret {
  display: inline-block;
  width: 0.09em; height: 0.72em;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
  animation: blink 1.1s steps(2) infinite;
  transform: translateY(0.08em);
}
@keyframes blink { 50% { opacity: 0; } }

.hero__sub {
  margin-top: 4vh;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
}
.hero__sub strong { color: var(--ink); font-weight: 500; }

.hero__foot {
  margin-top: 6vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.scroll-hint { display: flex; align-items: center; gap: 0.8em; }
.scroll-hint .dot-move {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: drop 1.8s var(--ease) infinite;
}
@keyframes drop {
  0% { transform: translateY(-6px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  background: rgba(11, 11, 16, 0.4);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: mq 26s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex; align-items: center; gap: 2.4rem;
  padding-right: 2.4rem;
  font-family: var(--font-d);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.marquee__item em { color: var(--accent); font-style: normal; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */

.section { position: relative; z-index: 1; padding: 16vh var(--pad) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 6vh;
}
.section-head h2 {
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 0.7em;
}
.section-head h2 .idx { font-family: var(--font-m); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em; }

/* ---------- posts ---------- */

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

.post-row {
  display: grid;
  grid-template-columns: 4rem 1fr auto auto;
  align-items: center;
  gap: 2rem;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.post-row__idx {
  font-family: var(--font-m);
  font-size: 0.75rem;
  color: var(--faint);
  transition: color 0.3s;
}
.post-row__title {
  font-family: var(--font-d);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
  line-height: 1.25;
  transition: transform 0.5s var(--ease), color 0.3s;
}
.post-row__meta {
  display: flex; align-items: center; gap: 1.2rem;
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.post-row__meta .cat { color: var(--accent); }
.post-row__arrow {
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: transform 0.5s var(--ease), border-color 0.3s, color 0.3s;
  font-size: 0.9rem;
}
.post-row:hover .post-row__title { transform: translateX(1.2rem); color: var(--accent); }
.post-row:hover .post-row__idx { color: var(--accent); }
.post-row:hover .post-row__arrow {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 760px) {
  .post-row { grid-template-columns: 2.4rem 1fr; }
  .post-row__meta, .post-row__arrow { display: none; }
}

/* floating preview that follows the cursor */
.preview {
  position: fixed;
  top: 0; left: 0;
  width: 300px; height: 200px;
  z-index: 700;
  pointer-events: none;
  overflow: hidden;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}
.preview__art { position: absolute; inset: 0; }
.preview__art::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55));
}
.preview__label {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.tone-1 { background: radial-gradient(120% 140% at 15% 10%, #5ee6ff 0%, #0b3b4d 42%, #060608 100%); }
.tone-2 { background: conic-gradient(from 210deg at 60% 40%, #060608, #8a7cff 25%, #1d1440 55%, #060608 90%); }
.tone-3 { background: radial-gradient(100% 120% at 80% 20%, #b6f7c1 0%, #14532d 45%, #060608 100%); }
.tone-4 { background: linear-gradient(135deg, #060608 0%, #312e81 40%, #f472b6 100%); }
.tone-5 { background: radial-gradient(130% 110% at 30% 85%, #fbbf24 0%, #7c2d12 45%, #060608 100%); }

/* ---------- about ---------- */

.about { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 6vw; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

.about__text p {
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 1.6em;
}
.about__text p strong { color: var(--ink); font-weight: 500; }
.about__text .grad-text { font-weight: 500; }

.stats { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.stat {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.stat__num {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1;
  color: var(--ink);
}
.stat__num sup { font-size: 0.4em; color: var(--accent); margin-left: 0.1em; }
.stat__label { max-width: 12ch; text-align: right; }

/* ---------- footer ---------- */

.site-foot {
  position: relative;
  z-index: 1;
  margin-top: 18vh;
  border-top: 1px solid var(--line);
  padding: 12vh var(--pad) 2rem;
  background: linear-gradient(180deg, transparent, rgba(11, 11, 16, 0.85));
}

.foot-cta { text-align: center; margin-bottom: 12vh; }
.foot-cta .mono { display: block; margin-bottom: 2rem; }
.foot-mail {
  display: inline-block;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(1.8rem, 6.5vw, 5.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
  padding: 0.2em 0.35em;
}
.foot-mail::after {
  content: "";
  position: absolute; left: 0.35em; right: 0.35em; bottom: 0.12em;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease);
}
.foot-mail:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.foot-mail .magnet { display: inline-block; will-change: transform; }

.foot-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.socials { display: flex; gap: 1.8rem; }
.socials a {
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.socials a:hover { color: var(--accent); }

.to-top {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.to-top:hover { color: var(--accent); }

/* ---------- post / article page ---------- */

.article-hero {
  position: relative;
  z-index: 1;
  padding: 22vh var(--pad) 0;
  max-width: 1080px;
  margin: 0 auto;
}
.article-hero h1 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 4.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 2rem 0 2.4rem;
}
.article-hero .meta { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
.back-link {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.back-link:hover { color: var(--accent); }

.cover {
  position: relative;
  z-index: 1;
  margin: 6vh auto 0;
  max-width: 1080px;
  padding: 0 var(--pad);
}
.cover__frame {
  position: relative;
  height: clamp(260px, 48vh, 460px);
  border-radius: 8px;
  overflow: hidden;
}
.cover__art { position: absolute; inset: -10%; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}
.cover__frame::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, transparent 60%, rgba(6,6,8,0.5));
}
.cover__caption { margin-top: 0.9rem; display: flex; justify-content: space-between; }

.article {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 10vh var(--pad) 14vh;
}
.prose p { margin-bottom: 1.8em; font-size: 1.06rem; line-height: 2.05; color: #c9c9d2; }
.prose p.lead { font-size: 1.25rem; color: var(--ink); }
.prose h2 {
  font-family: var(--font-d);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 2.8em 0 1.1em;
  display: flex; align-items: baseline; gap: 0.7em;
}
.prose h2 .idx { font-family: var(--font-m); font-size: 0.7rem; color: var(--accent); }
.prose blockquote {
  margin: 2.4em 0;
  padding: 0.4em 0 0.4em 1.4em;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.9;
}
.prose code {
  font-family: var(--font-m);
  font-size: 0.85em;
  background: rgba(94, 230, 255, 0.08);
  border: 1px solid rgba(94, 230, 255, 0.18);
  border-radius: 4px;
  padding: 0.15em 0.5em;
  color: var(--accent);
}
.prose pre {
  margin: 2.2em 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
}
.prose pre code {
  background: none; border: 0; padding: 0;
  color: #a5f3fc;
  font-size: 0.85rem;
  line-height: 1.8;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }

.next-post {
  position: relative; z-index: 1;
  display: block;
  border-top: 1px solid var(--line);
  padding: 10vh var(--pad);
  text-align: center;
}
.next-post .mono { display: block; margin-bottom: 1.4rem; }
.next-post .title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem);
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.next-post:hover .title { color: var(--accent); }

.hollow-line {
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 236, 241, 0.65);
}

.not-found {
  position: relative;
  z-index: 1;
  padding: 34vh var(--pad);
  text-align: center;
}
.not-found .mono { display: block; margin-bottom: 1.6rem; }

/* ---------- reveal fallback (no gsap) ---------- */

.reveal-init [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-init [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- misc ---------- */

main { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
