/* Shared blog styles — matches the galaviel.com design system */
:root {
  --bg: #05050b;
  --bg-soft: #0b0b18;
  --card: rgba(255, 255, 255, 0.055);
  --card-strong: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.11);
  --text: #ffffff;
  --muted: #a8afc1;
  --gold: #ffd45a;
  --orange: #ff962e;
  --coral: #ff6f83;
  --blue: #67b7ff;
  --green: #6fe0a6;
  --gradient: linear-gradient(135deg, #ffd45a 0%, #ff962e 52%, #ff6f83 100%);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --max-width: 1180px;
  --content-width: 760px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 150, 46, 0.16), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(103, 183, 255, 0.14), transparent 34%),
    linear-gradient(160deg, #090914 0%, #05050b 48%, #0a0711 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: #000;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navigation */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: linear-gradient(to bottom, rgba(5, 5, 11, 0.88), rgba(5, 5, 11, 0));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 15, 27, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  font-size: 15px;
  font-weight: 760;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(255, 150, 46, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #d9dbea;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  color: #120d05;
  background: var(--gradient);
  box-shadow: 0 14px 34px rgba(255, 150, 46, 0.24);
}

.button-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
}

.button-small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

/* Generic section spacing */
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Blog header */
.blog-header {
  padding: 70px 0 30px;
  text-align: center;
}

.blog-header h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-header p {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

/* Controls: search + tags */
.controls {
  margin: 8px auto 36px;
  width: min(100%, var(--content-width));
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.search-box input::placeholder {
  color: #7e879b;
}

.search-box input:focus {
  border-color: rgba(255, 212, 90, 0.5);
  background: rgba(255, 255, 255, 0.07);
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-chip {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #d9dbea;
  font-size: 13px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.tag-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tag-chip[aria-pressed="true"] {
  color: #120d05;
  background: var(--gradient);
  border-color: transparent;
}

/* Post list */
.post-list {
  display: grid;
  gap: 18px;
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding-bottom: 40px;
}

.post-card {
  display: block;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--card-strong);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #8f97aa;
  font-size: 13px;
}

.post-meta time {
  color: var(--gold);
  font-weight: 650;
}

.post-card h2 {
  margin-bottom: 8px;
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.post-card .excerpt {
  color: var(--muted);
  font-size: 15.5px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.post-tags span {
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #b9c0d0;
  font-size: 12px;
  font-weight: 600;
}

.no-results {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

.no-results[hidden] {
  display: none;
}

/* Single post / article */
.article-wrap {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding: 40px 0 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: color 180ms ease;
}

.back-link:hover {
  color: #fff;
}

.article-header h1 {
  margin-bottom: 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.article-body {
  margin-top: 36px;
  color: #e4e7f0;
  font-size: 17.5px;
}

.article-body h2 {
  margin: 38px 0 14px;
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -0.03em;
}

.article-body h3 {
  margin: 28px 0 10px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 18px 1.4em;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  margin: 0 0 18px;
  padding: 14px 20px;
  border-inline-start: 3px solid var(--gold);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.article-body code {
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.article-body pre {
  margin: 0 0 18px;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
}

.article-body pre code {
  padding: 0;
  background: none;
}

.article-body img {
  max-width: 100%;
  border-radius: 16px;
}

.article-footer {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 15px;
}

/* RTL support for Hebrew posts */
[dir="rtl"] .search-box svg {
  left: auto;
  right: 18px;
}

[dir="rtl"] .search-box input {
  padding: 0 46px 0 18px;
}

[dir="rtl"] .back-link svg {
  transform: scaleX(-1);
}

/* Footer */
footer {
  padding: 42px 0 54px;
  color: #8d95a8;
  font-size: 13px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

@media (max-width: 640px) {
  .container,
  .article-wrap {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .nav-links {
    display: none;
  }

  .brand span {
    display: none;
  }

  .post-card {
    padding: 22px 20px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

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