:root {
  --bg: #ffffff;
  --fg: #2c2834;
  --accent: #8f74b0;
  --accent-secondary: #a67fa8;
  --bg-alt: #ebe6f2;
  --bg-muted: #e0dbe6;
  --fg-muted: #6a6272;
  --hero-title: #c5e6e8;
  --hero-subtitle: #b8a2d4;
  --btn-fill-bg: #f0e8f2;
  --btn-fill-fg: #3d3348;
  --footer-bg: #a59bb0;
  --footer-fg: #3a3442;
  --max: 1120px;
  --header-h: 72px;
  --radius-pill: 100px;
  --shadow-card: 0 10px 30px rgba(90, 70, 120, 0.1);
  --font-display: "Outfit", "Albert Sans", sans-serif;
  --font-body: "Albert Sans", "Outfit", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(90, 85, 96, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(70, 50, 90, 0.14) 0%, rgba(60, 42, 80, 0.24) 100%),
    url("../img/hero.jpg") center / cover no-repeat;
  transform: scale(1.02);
  animation: hero-zoom 18s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 72px 24px;
  max-width: 720px;
  animation: fade-up 0.8s ease both;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hero-title);
  text-shadow:
    0 1px 0 rgba(70, 50, 90, 0.12),
    0 8px 28px rgba(60, 42, 80, 0.35);
  line-height: 1.05;
}

.hero-tilde {
  display: inline-block;
  animation: tilt 2.8s ease-in-out infinite;
  transform-origin: bottom left;
}

.hero-subtitle {
  margin: 14px 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--hero-subtitle);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--btn-fill-bg);
  color: var(--btn-fill-fg);
  border: 1.5px solid var(--accent);
  box-shadow: 0 8px 20px rgba(143, 116, 176, 0.22);
}

.btn-primary:hover {
  background: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.92);
  color: var(--fg);
  border: 1.5px solid rgba(35, 32, 36, 0.75);
}

.btn-outline:hover {
  background: #fff;
}

/* Feature cards */
.feature-section {
  background: var(--bg-alt);
  padding: 64px 24px;
}

.feature-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 820px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 24px;
  text-decoration: none;
  border-radius: 24px;
  background: transparent;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  box-shadow: 0 10px 24px rgba(143, 116, 176, 0.3);
}

.feature-icon img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}

.feature-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 1rem;
}

/* Home recent posts */
.home-posts {
  padding: 56px 24px 80px;
  background: var(--bg);
}

.home-posts-inner {
  max-width: 820px;
  margin: 0 auto;
}

.home-posts-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.home-posts-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.home-posts-all {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.home-posts-all:hover {
  text-decoration: underline;
}

.post-list-home .post-card-title {
  font-size: 1.25rem;
}

/* Inner pages */
.page-hero {
  background:
    linear-gradient(135deg, rgba(143, 116, 176, 0.14), rgba(166, 127, 168, 0.12)),
    var(--bg-alt);
  padding: 72px 24px 56px;
  text-align: center;
}

.page-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 12px 0 0;
  color: var(--fg-muted);
  font-size: 1.1rem;
}

.content-section,
.blogs-section {
  padding: 56px 24px 80px;
  background: var(--bg);
}

.content-inner,
.blogs-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.placeholder-note {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px;
  background: var(--bg-alt);
  border-radius: 18px;
  color: var(--fg-muted);
  text-align: center;
}

.placeholder-note a {
  color: var(--accent);
  font-weight: 600;
}

.placeholder-note code {
  font-size: 0.92em;
  background: rgba(143, 116, 176, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Blogs hub */
.blog-category {
  margin-bottom: 56px;
}

.blog-category:last-child {
  margin-bottom: 0;
}

.category-title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  text-align: center;
}

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

.blog-link {
  --blog-color: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(90, 85, 96, 0.12);
  border-left: 4px solid var(--blog-color);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(90, 70, 120, 0.05);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fade-up 0.55s ease both;
}

.blog-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blog-color) 10%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.blog-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.blog-link:hover::before {
  opacity: 1;
}

.blog-link-title,
.blog-link-description {
  position: relative;
  z-index: 1;
}

.blog-link-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blog-color);
}

.blog-link-description {
  color: var(--fg-muted);
  font-size: 0.98rem;
}

.blog-link:nth-child(1) { animation-delay: 0.05s; }
.blog-link:nth-child(2) { animation-delay: 0.1s; }
.blog-link:nth-child(3) { animation-delay: 0.15s; }
.blog-link:nth-child(4) { animation-delay: 0.2s; }

/* Post list (blogs index) */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}

.post-card {
  padding: 28px 26px;
  background: #fff;
  border: 1px solid rgba(90, 85, 96, 0.12);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(90, 70, 120, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--fg-muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.post-card-cats,
.post-cats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(143, 116, 176, 0.14);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.post-card-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-card-title a {
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--accent);
}

.post-card-excerpt {
  margin: 0 0 14px;
  color: var(--fg-muted);
}

.post-card-more {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.post-card-more:hover {
  text-decoration: underline;
}

/* Single post */
.post-header {
  background:
    linear-gradient(135deg, rgba(143, 116, 176, 0.14), rgba(166, 127, 168, 0.12)),
    var(--bg-alt);
  padding: 64px 24px 48px;
}

.post-header-inner,
.post-body-inner {
  max-width: 760px;
  margin: 0 auto;
}

.post-meta {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.post-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.post-back {
  margin: 18px 0 0;
}

.post-back a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.post-back a:hover {
  text-decoration: underline;
}

.post-body {
  padding: 40px 24px 72px;
}

.post-body-inner {
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-body-inner p,
.post-body-inner ul,
.post-body-inner ol {
  margin: 0 0 1.1em;
}

.post-body-inner li {
  margin-bottom: 0.35em;
}

.post-body-inner a {
  color: var(--accent);
  font-weight: 600;
}

.post-body-inner pre,
.post-body-inner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.post-body-inner pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 12px;
  background: #f2edf6;
  border: 1px solid rgba(90, 85, 96, 0.1);
}

.post-body-inner code {
  font-size: 0.92em;
}

.post-body-inner :not(pre) > code {
  background: rgba(143, 116, 176, 0.12);
  padding: 1px 6px;
  border-radius: 6px;
}

.post-body-inner img {
  border-radius: 12px;
  margin: 1em 0;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  text-align: center;
  padding: 22px 16px;
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

/* Motion */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-zoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

@keyframes tilt {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-8deg); }
}

/* Responsive */
@media (max-width: 960px) {
  .feature-grid,
  .feature-grid-2,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid rgba(90, 85, 96, 0.1);
    padding: 8px 0 16px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 24px;
  }

  .feature-grid,
  .feature-grid-2,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 560px;
  }

  .feature-section,
  .page-hero,
  .home-posts {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-posts-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
