@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --blog-bg: #09090b;
  --blog-surface: #151518;
  --blog-surface-soft: #1c1c20;
  --blog-border: rgba(255, 255, 255, 0.11);
  --blog-border-accent: rgba(205, 98, 90, 0.42);
  --blog-text: #f7f4f1;
  --blog-text-secondary: #cec7c5;
  --blog-text-muted: #938c8b;
  --blog-accent: #a85454;
  --blog-accent-hover: #c46b6b;
  --blog-green: #38d487;
  --blog-yellow: #f5bd45;
  --blog-container: 1200px;
  --blog-article: 820px;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--blog-bg);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--blog-bg);
  scroll-behavior: smooth;
}

body.blog-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--blog-bg);
  color: var(--blog-text);
  font-size: 16px;
  line-height: 1.6;
}

body.blog-page.menu-open {
  overflow: hidden;
}

.blog-page a {
  color: inherit;
}

.blog-page button,
.blog-page input {
  font: inherit;
}

.blog-page button {
  border: 0;
}

.blog-page img {
  max-width: 100%;
}

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid rgba(168, 84, 84, 0.18);
  background:
    radial-gradient(circle at 14% 0%, rgba(168, 84, 84, 0.14), transparent 38%),
    radial-gradient(circle at 86% 12%, rgba(46, 204, 113, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(22, 22, 24, 0.9) 0%, rgba(11, 11, 13, 0.9) 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.header.scrolled {
  border-bottom-color: rgba(168, 84, 84, 0.3);
  background:
    radial-gradient(circle at 14% 0%, rgba(168, 84, 84, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(17, 17, 19, 0.98) 0%, rgba(9, 9, 11, 0.98) 100%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

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

.logo,
.mobile-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--blog-text);
  font-weight: 800;
  text-decoration: none;
}

.logo-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.logo-text {
  position: relative;
  font-size: 1.3rem;
  line-height: 1.1;
}

.logo-text::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blog-yellow), var(--blog-green));
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--blog-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--blog-text);
  background: rgba(255, 255, 255, 0.06);
}

.header-actions {
  display: flex;
  align-items: center;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn-primary {
  background: var(--blog-accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--blog-accent-hover);
  transform: translateY(-1px);
}

.mobile-menu-btn,
.mobile-nav {
  display: none;
}

.blog-main {
  width: min(var(--blog-container), calc(100% - 48px));
  min-height: 62vh;
  margin: 0 auto;
  padding: 144px 0 88px;
}

.blog-archive-head {
  max-width: 820px;
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
}

.blog-eyebrow,
.blog-article-kicker {
  margin: 0;
  color: #e47b73;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-archive-head h1,
.blog-article h1,
.blog-empty h1 {
  margin: 0;
  color: var(--blog-text);
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: 0;
}

.blog-archive-head > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--blog-text-secondary);
  font-size: 20px;
  line-height: 1.55;
}

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--blog-border);
}

.blog-category-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--blog-border);
  border-radius: 999px;
  color: var(--blog-text-secondary);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.blog-category-link:hover,
.blog-category-link:focus-visible,
.blog-category-link.is-active {
  border-color: var(--blog-border-accent);
  background: rgba(205, 98, 90, 0.12);
  color: var(--blog-text);
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.blog-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-surface);
  transition: border-color 150ms ease, transform 150ms ease, background-color 150ms ease;
}

.blog-card:hover {
  border-color: var(--blog-border-accent);
  background: #19191d;
  transform: translateY(-2px);
}

.blog-card-meta {
  min-height: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--blog-text-muted);
  font-size: 12px;
}

.blog-card-category {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(205, 98, 90, 0.12);
  color: #f0a39d;
  font-weight: 700;
}

.blog-card time {
  margin-left: auto;
}

.blog-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.25;
}

.blog-card h2 a {
  text-decoration: none;
}

.blog-card h2 a:hover,
.blog-card h2 a:focus-visible {
  color: #f0a39d;
}

.blog-card > p {
  margin: 0 0 22px;
  color: var(--blog-text-secondary);
  line-height: 1.65;
}

.blog-card-link {
  width: fit-content;
  margin-top: auto;
  color: #eda09a;
  font-weight: 750;
  text-decoration: none;
}

.blog-card-link span {
  margin-left: 5px;
}

.blog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--blog-text-muted);
  font-size: 14px;
}

.blog-breadcrumbs a {
  color: var(--blog-text-secondary);
  text-decoration: none;
}

.blog-breadcrumbs a:hover {
  color: var(--blog-text);
}

.blog-article {
  width: min(var(--blog-article), 100%);
  margin: 0 auto;
  color: var(--blog-text-secondary);
}

.blog-article h1 {
  margin-top: 12px;
}

.blog-article-lead {
  margin: 22px 0 10px;
  color: #ded7d4;
  font-size: 21px;
  line-height: 1.55;
}

.blog-article-meta {
  margin: 0 0 46px;
  color: var(--blog-text-muted);
  font-size: 14px;
}

.blog-article h2 {
  margin: 54px 0 18px;
  color: var(--blog-text);
  font-size: 32px;
  line-height: 1.2;
}

.blog-article h3 {
  margin: 36px 0 14px;
  color: var(--blog-text);
  font-size: 24px;
  line-height: 1.3;
}

.blog-article p,
.blog-article li {
  font-size: 18px;
  line-height: 1.78;
}

.blog-article p {
  margin: 0 0 20px;
}

.blog-article ul,
.blog-article ol {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding-left: 24px;
}

.blog-article a {
  color: #f0a39d;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.blog-article blockquote {
  margin: 34px 0;
  padding: 20px 22px;
  border-left: 3px solid var(--blog-accent);
  border-radius: 0 8px 8px 0;
  background: rgba(205, 98, 90, 0.09);
  color: var(--blog-text);
  font-size: 19px;
  font-style: italic;
}

.blog-article figure {
  margin: 34px 0;
}

.blog-article figure img,
.blog-article > img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.blog-article figcaption {
  margin-top: 8px;
  color: var(--blog-text-muted);
  font-size: 13px;
  text-align: center;
}

.blog-article table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--blog-border);
}

.blog-article th,
.blog-article td {
  padding: 12px;
  border-bottom: 1px solid var(--blog-border);
  text-align: left;
}

.blog-article th {
  color: var(--blog-text);
  background: var(--blog-surface-soft);
}

.blog-empty {
  max-width: 720px;
  padding: 36px;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  background: var(--blog-surface);
  text-align: center;
}

.blog-empty h2,
.blog-empty h1 {
  margin: 0 0 12px;
}

.blog-empty p {
  margin: 0 0 22px;
  color: var(--blog-text-secondary);
}

.blog-not-found {
  margin: 60px auto 0;
}

.footer {
  padding: 60px 24px 40px;
  border-top: 1px solid rgba(168, 84, 84, 0.2);
  background: rgba(12, 12, 14, 0.9);
}

.footer-inner {
  max-width: var(--blog-container);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer-brand .logo-img {
  width: 32px;
  height: 32px;
}

.footer-brand-description {
  max-width: 280px;
  margin: 0;
  color: var(--blog-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-column-title {
  margin: 0 0 16px;
  color: var(--blog-text);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-link {
  color: var(--blog-text-muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--blog-text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  max-width: 980px;
  margin: 0 auto;
  color: var(--blog-text-muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.footer-copyright a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent {
  position: fixed;
  z-index: 300;
  left: 18px;
  bottom: 18px;
  width: min(420px, calc(100% - 36px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(32, 32, 35, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent p {
  margin: 0;
  color: var(--blog-text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.cookie-consent button {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  background: #f5f3f2;
  color: #171719;
  cursor: pointer;
}

.blog-page :focus-visible {
  outline: 2px solid #f0a39d;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--blog-text);
    cursor: pointer;
  }

  .hamburger {
    width: 22px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .hamburger span {
    width: 100%;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-nav.active {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    padding: 18px 16px;
    background: #0b0b0d;
  }

  .mobile-nav-panel {
    width: min(100%, 430px);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
  }

  .mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
  }

  .mobile-nav-brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
  }

  .mobile-nav-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-nav-close {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--blog-text);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
  }

  .mobile-nav-list {
    display: grid;
    gap: 10px;
  }

  .mobile-nav-link {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid rgba(168, 84, 84, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--blog-text);
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-auth-section {
    margin-top: auto;
    padding-top: 20px;
  }

  .mobile-auth-section .btn {
    width: 100%;
  }

  .blog-card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .header-inner {
    width: 100%;
    min-height: 64px;
    padding: 8px;
    gap: 10px;
    border: 1px solid rgba(168, 84, 84, 0.24);
    border-radius: 18px;
    background: rgba(14, 14, 16, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
  }

  .header .logo {
    min-width: 0;
    flex: 1 1 auto;
    gap: 10px;
  }

  .header .logo-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .header .logo-img {
    width: 44px;
    height: 44px;
  }

  .header .logo-text {
    overflow: hidden;
    font-size: 1.1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-btn {
    border-radius: 14px;
  }

  .blog-main {
    width: min(100% - 32px, var(--blog-container));
    padding: 122px 0 64px;
  }

  .blog-archive-head {
    gap: 12px;
    margin-bottom: 26px;
  }

  .blog-archive-head h1,
  .blog-article h1,
  .blog-empty h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  .blog-archive-head > p:last-child,
  .blog-article-lead {
    font-size: 17px;
  }

  .blog-categories {
    flex-wrap: nowrap;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .blog-categories::-webkit-scrollbar {
    display: none;
  }

  .blog-category-link {
    flex: 0 0 auto;
  }

  .blog-card {
    padding: 20px;
  }

  .blog-card h2 {
    font-size: 22px;
  }

  .blog-card time {
    margin-left: 0;
  }

  .blog-breadcrumbs {
    margin-bottom: 24px;
  }

  .blog-article-meta {
    margin-bottom: 34px;
  }

  .blog-article h2 {
    margin-top: 42px;
    font-size: 27px;
  }

  .blog-article h3 {
    font-size: 22px;
  }

  .blog-article p,
  .blog-article li {
    font-size: 17px;
    line-height: 1.72;
  }

  .blog-article blockquote {
    margin: 28px 0;
    padding: 18px;
    font-size: 17px;
  }

  .blog-article table {
    display: block;
    overflow-x: auto;
  }

  .blog-empty {
    padding: 28px 20px;
  }

  .footer {
    padding: 48px 20px 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand-description {
    max-width: 100%;
  }

  .footer-links {
    align-items: center;
  }

  .cookie-consent {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
