/* ============================================
   Lifespace — Bold & Modern Blog
   Palette: cool blues / purples
   ============================================ */

:root {
  --bg: #0b0a1f;
  --bg-elev: #131233;
  --surface: #ffffff;
  --surface-tint: #f6f5ff;
  --ink: #0b0a1f;
  --ink-soft: #4a4870;
  --ink-mute: #8b89a8;
  --line: #e7e4f5;

  --accent: #7c5cff;       /* electric purple */
  --accent-2: #4a7dff;     /* electric blue  */
  --accent-3: #c8a6ff;     /* lilac          */
  --grad: linear-gradient(135deg, #4a7dff 0%, #7c5cff 50%, #c8a6ff 100%);

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;

  --maxw: 1120px;
  --maxw-prose: 720px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

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

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: var(--maxw-prose);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--grad);
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 500;
}

.nav-cta:hover {
  background: var(--accent);
  color: #fff !important;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bg);
  color: #fff;
  overflow: hidden;
  padding: 120px 0 140px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.55) 0%, rgba(124, 92, 255, 0) 70%);
  filter: blur(20px);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -300px;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(74, 125, 255, 0.45) 0%, rgba(74, 125, 255, 0) 70%);
  filter: blur(20px);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 600;
  margin-bottom: 22px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0 0 28px;
  max-width: 14ch;
}

.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.hero p.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  color: rgba(255, 255, 255, 0.78);
  max-width: 56ch;
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--grad);
  color: #fff !important;
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  color: #fff !important;
}

.btn-ghost {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff !important;
}

/* ---------- Sections ---------- */
section {
  padding: 100px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
  max-width: 22ch;
}

.section-head p {
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0;
}

/* ---------- Post grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.post-card > * {
  position: relative;
  z-index: 1;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 20px 50px rgba(74, 80, 200, 0.18);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card:hover .post-meta,
.post-card:hover h3,
.post-card:hover p,
.post-card:hover .read-more {
  color: #fff;
}

.post-meta {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
  font-weight: 500;
}

.post-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 500;
}

.post-card p {
  color: var(--ink-soft);
  margin: 0 0 24px;
  flex-grow: 1;
}

.read-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

@media (max-width: 720px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- About teaser ---------- */
.about-teaser {
  background: var(--bg);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 72px 64px;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}

.about-teaser::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200, 166, 255, 0.35) 0%, rgba(200, 166, 255, 0) 70%);
  filter: blur(20px);
}

.about-teaser-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.about-teaser h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.about-teaser p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 28px;
  font-size: 18px;
}

@media (max-width: 720px) {
  .about-teaser {
    padding: 48px 28px;
  }
}

/* ---------- About page ---------- */
.about-hero {
  background: var(--bg);
  color: #fff;
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(124, 92, 255, 0.5) 0%, rgba(124, 92, 255, 0) 70%);
  filter: blur(20px);
}

.about-hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.about-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 80px);
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 14px 0 24px;
}

.about-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  max-width: 56ch;
  margin: 0 auto;
}

.about-body {
  padding: 100px 0;
}

.about-body h2 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 48px 0 16px;
}

.about-body p {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 18px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.fact {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-tint);
}

.fact .label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 10px;
}

.fact .value {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 720px) {
  .fact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Post page ---------- */
.post-hero {
  background: var(--bg);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.post-hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(74, 125, 255, 0.45) 0%, rgba(74, 125, 255, 0) 70%);
  filter: blur(20px);
}

.post-hero .container {
  position: relative;
  z-index: 2;
  max-width: var(--maxw-prose);
}

.post-hero .meta {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 22px;
  font-weight: 600;
}

.post-hero .meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent-3);
}

.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  font-weight: 500;
}

.post-hero .lede {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.post-body {
  padding: 80px 0 100px;
}

.post-body p {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.85;
  margin: 0 0 24px;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  font-weight: 500;
}

.post-body blockquote {
  margin: 36px 0;
  padding: 28px 32px;
  border-left: 3px solid var(--accent);
  background: var(--surface-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.45;
}

.post-body ul {
  padding-left: 22px;
  margin: 0 0 24px;
}

.post-body ul li {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 18px;
}

.post-nav {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.post-nav a {
  font-weight: 500;
  font-size: 15px;
}

/* ---------- News page ---------- */
.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.source-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.source-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.source-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.source-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.refresh-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.refresh-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 200px;
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(74, 80, 200, 0.12);
}

.news-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.news-source::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--grad);
}

.news-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  font-weight: 500;
}

.news-card p {
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  flex-grow: 1;
}

.news-date {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: auto;
}

.news-status {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-mute);
  font-size: 15px;
}

.news-status.error {
  color: #b53b3b;
}

.news-skeleton {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skeleton-card {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(124, 92, 255, 0.08) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 720px) {
  .news-grid,
  .news-skeleton {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 40px;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .logo {
  color: #fff;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 640px) {
  .nav-links {
    gap: 18px;
  }
  .nav-links a:not(.nav-cta) {
    display: none;
  }
  .hero {
    padding: 80px 0 100px;
  }
  section {
    padding: 72px 0;
  }
}
