/* ===== FLUIR Blog — shared styles ===== */

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

:root {
  --blue: #5BB8E8;
  --blue-bright: #7dd3f7;
  --blue-dark: #2d8cbf;
  --black: #000000;
  --dark: #050508;
  --dark2: #08080f;
  --white: #ffffff;
  --gray: #8a8a9a;
  --gray-light: #c8c8d8;
  --glow-sm: 0 0 20px rgba(91,184,232,0.25);
  --glow-md: 0 0 40px rgba(91,184,232,0.35);
}

html { scroll-behavior: smooth; }
body.blog-page {
  background: var(--black);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  cursor: none;
  min-height: 100vh;
}

body.blog-page::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.22;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue-dark), var(--blue)); border-radius: 3px; }

/* Cursor */
#cursor-dot {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, opacity 0.2s;
  box-shadow: 0 0 10px var(--blue), 0 0 20px rgba(91,184,232,0.6);
}
#cursor-ring {
  position: fixed; pointer-events: none; z-index: 9997;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(91,184,232,0.45);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s, transform 0.15s ease;
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--blue);
  background: rgba(91,184,232,0.06);
}

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 22px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.1rem; font-weight: 900;
  letter-spacing: 0.24em;
  background: linear-gradient(135deg, #5BB8E8, #b8e8ff, #5BB8E8);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 1.6s linear infinite;
}
.loader-bar-track { width: 200px; height: 2px; background: rgba(91,184,232,0.15); border-radius: 2px; overflow: hidden; }
.loader-bar { height: 100%; background: var(--blue); box-shadow: 0 0 12px var(--blue); animation: loader-fill 1.2s ease forwards; }
@keyframes loader-fill { from { width: 0; } to { width: 100%; } }
.loader-text { font-size: 0.68rem; color: var(--gray); letter-spacing: 0.3em; text-transform: uppercase; }
@keyframes shimmer-text { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 48px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(91,184,232,0.08);
}
.nav-logo svg { height: 42px; width: auto; transition: filter 0.3s; }
.nav-logo:hover svg { filter: drop-shadow(0 0 16px rgba(91,184,232,0.7)); }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gray-light); text-decoration: none;
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 9px 18px;
  border: 1px solid rgba(91,184,232,0.2);
  border-radius: 10px;
  background: rgba(6,6,14,0.5);
  transition: border-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.nav-back:hover {
  color: var(--blue); border-color: var(--blue);
  transform: translateX(-2px);
  box-shadow: var(--glow-sm);
}

/* Backdrop effects */
.aurora { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.aurora::before {
  content: ''; position: absolute;
  width: 950px; height: 950px;
  background: radial-gradient(circle, rgba(91,184,232,0.1) 0%, transparent 65%);
  top: -220px; left: -220px;
  animation: aurora-drift 14s ease-in-out infinite alternate;
}
.aurora::after {
  content: ''; position: absolute;
  width: 780px; height: 780px;
  background: radial-gradient(circle, rgba(61,214,245,0.06) 0%, transparent 65%);
  bottom: -120px; right: -150px;
  animation: aurora-drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes aurora-drift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,30px) scale(1.12); }
}
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(91,184,232,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,184,232,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 25%, transparent 100%);
  z-index: 0;
}

/* ===== LIST PAGE ===== */
.blog-list-stage {
  position: relative;
  min-height: 100vh;
  padding: 140px 40px 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-header {
  position: relative;
  z-index: 1;
  margin-bottom: 72px;
  max-width: 720px;
}

.section-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--blue); }

.blog-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #b8e8ff 55%, #5BB8E8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 6s linear infinite;
}
.blog-sub {
  font-size: 1.08rem; color: var(--gray-light);
  line-height: 1.75; font-weight: 300;
  max-width: 580px;
}

.blog-grid-wrap { position: relative; z-index: 1; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px;
  border: 1px solid rgba(91,184,232,0.12);
  border-radius: 16px;
  background: rgba(6,6,14,0.55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,184,232,0.6), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.post-card:hover {
  border-color: rgba(91,184,232,0.35);
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.6), var(--glow-sm);
}
.post-card:hover::before { opacity: 1; }

.post-card-top { display: flex; gap: 8px; flex-wrap: wrap; min-height: 24px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(91,184,232,0.25);
  color: var(--blue);
  font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600;
}
.post-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.28;
  color: var(--white);
  margin: 2px 0 0;
}
.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--gray-light);
  line-height: 1.65;
  font-weight: 300;
  flex-grow: 1;
}
.post-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.7rem;
  color: var(--gray);
  letter-spacing: 0.08em;
  margin-top: 4px;
  flex-wrap: wrap;
}
.post-card-meta .sep { opacity: 0.4; }

.blog-empty {
  text-align: center;
  padding: 60px 40px;
  border: 1px dashed rgba(91,184,232,0.2);
  border-radius: 20px;
  background: rgba(5,5,15,0.45);
}
.empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(91,184,232,0.22);
  color: var(--blue);
  margin-bottom: 22px;
  background: radial-gradient(circle, rgba(91,184,232,0.08), transparent);
}
.empty-icon svg { width: 28px; height: 28px; }
.blog-empty h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  margin-bottom: 10px; color: var(--white);
}
.blog-empty p { color: var(--gray-light); margin-bottom: 24px; }

.btn-outline-soft {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--blue);
  border: 1px solid rgba(91,184,232,0.3);
  padding: 10px 22px; border-radius: 8px;
  text-decoration: none; font-size: 0.82rem;
  font-weight: 600; letter-spacing: 0.05em;
  transition: all 0.25s;
}
.btn-outline-soft:hover { border-color: var(--blue); background: rgba(91,184,232,0.06); }

.footer-note {
  margin-top: 72px;
  display: flex; align-items: center; gap: 18px;
  color: var(--gray);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.footer-note .sep { opacity: 0.3; }

/* ===== POST PAGE ===== */
.post-stage {
  position: relative;
  min-height: 100vh;
  padding: 120px 32px 100px;
}
.post-article {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.post-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 18px;
}
.post-excerpt {
  font-size: 1.12rem;
  color: var(--gray-light);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 22px;
  border-left: 2px solid var(--blue);
  padding-left: 18px;
}
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--gray);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin-bottom: 48px;
}
.post-meta .sep { opacity: 0.4; }

.post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--gray-light);
}
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-top: 2.4em;
  padding-top: 0.4em;
  position: relative;
}
.post-body h2::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 28px; height: 2px;
  background: var(--blue);
}
.post-body h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  margin-top: 2em;
}
.post-body p { color: var(--gray-light); }
.post-body strong { color: var(--white); font-weight: 600; }
.post-body a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(91,184,232,0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.post-body a:hover { text-decoration-color: var(--blue); }
.post-body ul, .post-body ol {
  padding-left: 1.3em;
}
.post-body li { margin-bottom: 0.5em; }
.post-body li::marker { color: var(--blue); }
.post-body blockquote {
  border-left: 3px solid var(--blue);
  padding: 14px 22px;
  margin-left: 0;
  background: rgba(91,184,232,0.04);
  border-radius: 0 12px 12px 0;
  color: var(--gray-light);
  font-style: italic;
}
.post-body code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  background: rgba(91,184,232,0.1);
  color: var(--blue-bright);
  padding: 2px 7px;
  border-radius: 6px;
}
.post-body pre {
  background: rgba(5,5,15,0.8);
  border: 1px solid rgba(91,184,232,0.15);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.55;
}
.post-body pre code {
  background: none;
  color: var(--gray-light);
  padding: 0;
  border-radius: 0;
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(91,184,232,0.12);
  margin: 1.4em 0;
}
.post-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,184,232,0.3), transparent);
  margin: 2.6em 0;
}

/* Skeleton */
.post-loading { display: flex; flex-direction: column; gap: 14px; }
.skeleton {
  height: 16px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(91,184,232,0.05), rgba(91,184,232,0.15), rgba(91,184,232,0.05));
  background-size: 200% 100%;
  animation: sk-shimmer 1.6s linear infinite;
}
.sk-title { height: 32px; width: 60%; }
.sk-line  { height: 16px; width: 100%; }
.sk-line.short { width: 75%; }
@keyframes sk-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.post-error {
  text-align: center;
  padding: 60px 40px;
  border: 1px dashed rgba(91,184,232,0.2);
  border-radius: 20px;
  background: rgba(5,5,15,0.45);
}
.post-error h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--white);
}
.post-error p { color: var(--gray-light); margin-bottom: 22px; }

.post-footer { margin-top: 72px; }
.post-cta {
  padding: 36px 32px;
  border: 1px solid rgba(91,184,232,0.18);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(91,184,232,0.08) 0%, rgba(5,5,15,0.6) 70%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.post-cta h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.post-cta p { color: var(--gray-light); margin-bottom: 22px; }
.post-cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: var(--black);
  padding: 12px 22px; border-radius: 8px;
  font-weight: 700; font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.25s;
}
.btn-primary:hover {
  background: var(--blue-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(91,184,232,0.5);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(91,184,232,0.4); color: var(--blue);
  padding: 12px 22px; border-radius: 8px;
  font-weight: 600; font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.25s;
}
.btn-outline:hover {
  border-color: var(--blue);
  background: rgba(91,184,232,0.06);
  transform: translateY(-2px);
}

.post-nav { margin-top: 28px; }
.back-link {
  color: var(--gray-light);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.back-link:hover { color: var(--blue); }

/* Responsive */
@media (max-width: 720px) {
  nav { padding: 14px 18px; }
  .nav-logo svg { height: 34px; }
  .nav-back span { display: none; }
  .nav-back { padding: 8px 10px; }
  .blog-list-stage { padding: 100px 20px 80px; }
  .post-stage { padding: 100px 20px 80px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-header { margin-bottom: 44px; }
  .footer-note { font-size: 0.56rem; letter-spacing: 0.16em; gap: 10px; }
  .post-cta { padding: 26px 22px; }
  body.blog-page { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
}

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