/*
 * Change the active theme by editing data-theme on the <html> element.
 * Keep theme definitions limited to design tokens so the layout stays simple.
 */

:root,
[data-theme="ocean-blue"] {
  color-scheme: light;
  --ink: #102a56;
  --muted: #526f98;
  --accent: #2563eb;
  --accent-strong: #1748b5;
  --page-base: #eaf3ff;
  --content-base: #eaf3ff;
  --page-start: #f8fbff;
  --page-middle: #cfe5ff;
  --page-end: #70aef8;
  --glow: rgba(96, 165, 250, 0.48);
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(255, 255, 255, 0.82);
  --shadow: 0 18px 50px rgba(30, 64, 175, 0.14);
  --shadow-strong: 0 22px 60px rgba(30, 64, 175, 0.23);
  --accent-gradient: linear-gradient(120deg, #1748b5, #2878e8);
  --accent-gradient-hover: linear-gradient(120deg, #123b99, #1d64d2);
  --image-placeholder: #d9eaff;
  --symbol-gradient: linear-gradient(145deg, #edf6ff, #bedaff);
  --footer: rgba(16, 42, 86, 0.65);
}

[data-theme="sky"] {
  --ink: #15324b;
  --muted: #58758e;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --page-base: #eefaff;
  --content-base: #eefaff;
  --page-start: #ffffff;
  --page-middle: #d7f1ff;
  --page-end: #8bd7f7;
  --glow: rgba(125, 211, 252, 0.48);
  --shadow: 0 18px 50px rgba(3, 105, 161, 0.12);
  --shadow-strong: 0 22px 60px rgba(3, 105, 161, 0.21);
  --accent-gradient: linear-gradient(120deg, #0369a1, #0ea5e9);
  --accent-gradient-hover: linear-gradient(120deg, #075985, #0284c7);
  --image-placeholder: #dff4ff;
  --symbol-gradient: linear-gradient(145deg, #f0faff, #c5ebff);
  --footer: rgba(21, 50, 75, 0.65);
}

[data-theme="deep-water"] {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #dcd3ff;
  --accent: #a185da;
  --accent-strong: #c9b8f3;
  --page-base: #0a0f2a;
  --content-base: #020064;
  --page-start: #300060;
  --page-middle: #6a00a8;
  --page-end: #b300b3;
  --glow: rgba(161, 133, 218, 0.24);
  --surface: rgba(10, 15, 42, 0.72);
  --surface-strong: rgba(14, 27, 62, 0.92);
  --border: rgba(220, 211, 255, 0.22);
  --shadow: 0 18px 50px rgba(15, 7, 40, 0.3);
  --shadow-strong: 0 25px 60px rgba(15, 7, 40, 0.45);
  --accent-gradient: linear-gradient(120deg, #2c0b74, #6a00a8);
  --accent-gradient-hover: linear-gradient(120deg, #3a1094, #8300c7);
  --image-placeholder: #17114b;
  --symbol-gradient: linear-gradient(145deg, #211858, #0a0f2a);
  --footer: rgba(220, 211, 255, 0.72);
}

:root {
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-base);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 36px 0;
  color: var(--ink);
  background: linear-gradient(135deg, var(--page-start), var(--page-middle), var(--page-end));
  background-attachment: fixed;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.site-shell {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 32px;
  background: var(--content-base);
  box-shadow: var(--shadow-strong);
}

.hero {
  position: relative;
  height: clamp(340px, 46vw, 440px);
  overflow: hidden;
  background: var(--content-base);
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-position, center 43%);
  transform: scale(1.025);
}

.hero-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, transparent 28%, rgba(3, 15, 38, 0.15) 64%, rgba(3, 15, 38, 0.42) 100%),
    linear-gradient(to bottom, rgba(5, 5, 51, 0.03) 32%, rgba(5, 5, 51, 0.82) 82%, var(--content-base) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 18px;
  left: 0;
  padding: 0 26px;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 5px;
  color: #bfdbfe;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.48);
}

.hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.15rem, 4vw, 2.45rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.48);
}

.hero-description {
  margin: 10px 0 15px;
  color: #dbeafe;
  font-size: 1rem;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.social-pills {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.social-pills a {
  display: grid;
  width: 40px;
  height: 40px;
  color: #1748b5;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 20px rgba(1, 8, 24, 0.3);
  place-items: center;
  transition: transform 180ms ease, background 180ms ease;
}

.social-pills a:hover,
.social-pills a:focus-visible {
  background: #fff;
  transform: translateY(-2px);
}

.social-pills svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.content-shell {
  padding: 18px 20px 32px;
  background: var(--content-base);
}

.content-section {
  margin-top: 40px;
  scroll-margin-top: 18px;
}

.content-section:first-child {
  margin-top: 11px;
}

.section-heading {
  width: min(100%, 680px);
  margin: 0 auto 14px;
  padding-right: 13px;
  border-right: 3px solid #60a5fa;
  text-align: right;
}

.section-heading p {
  margin: 0 0 2px;
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  line-height: 1.25;
}

.featured-list,
.row-list,
.article-list {
  display: grid;
  width: min(100%, 680px);
  margin-inline: auto;
  gap: 12px;
}

.featured-card {
  position: relative;
  display: block;
  height: 240px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.16);
  border-radius: 18px;
  background: #0b2a55;
  box-shadow: 0 13px 34px rgba(1, 8, 24, 0.24);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--image-position, center 45%);
  transition: transform 320ms ease, filter 200ms ease;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(3, 15, 38, 0.18), transparent 38%),
    linear-gradient(to top, rgba(3, 15, 38, 0.94), rgba(3, 15, 38, 0.06) 67%);
}

.featured-copy {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 16px;
  left: 20px;
  color: #fff;
  text-align: right;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.52);
}

.featured-copy small,
.featured-copy strong {
  display: block;
}

.featured-copy small {
  margin-bottom: 2px;
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
}

.featured-copy strong {
  font-size: 1.32rem;
  line-height: 1.25;
}

.row-arrow::before {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(135deg);
}

.featured-card:hover,
.featured-card:focus-visible {
  border-color: rgba(147, 197, 253, 0.56);
  box-shadow: 0 18px 44px rgba(1, 8, 24, 0.42);
  transform: translateY(-3px);
}

.featured-card:hover img {
  filter: saturate(1.08);
  transform: scale(1.025);
}

.media-row {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 30px;
  min-height: 92px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(191, 219, 254, 0.15);
  border-radius: 16px;
  background: rgba(12, 42, 84, 0.88);
  box-shadow: 0 9px 26px rgba(1, 8, 24, 0.18);
  text-decoration: none;
  align-items: center;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.media-row::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(3, 15, 38, 0.28), transparent 42%);
  content: "";
  pointer-events: none;
}

.media-row img {
  position: relative;
  z-index: 1;
  width: 108px;
  height: 100%;
  min-height: 92px;
  object-fit: cover;
  object-position: var(--image-position, center);
}

.media-row > span:not(.row-arrow) {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 14px 17px;
  text-align: right;
}

.media-row strong,
.media-row small {
  display: block;
}

.media-row strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.media-row small {
  margin-top: 4px;
  color: #bfdbfe;
  font-size: 0.78rem;
  line-height: 1.35;
}

.row-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  color: #93c5fd;
  font-size: 0;
  place-items: center;
  transition: transform 180ms ease;
}

.media-row:hover,
.media-row:focus-visible {
  border-color: rgba(147, 197, 253, 0.48);
  background: rgba(18, 60, 116, 0.96);
  transform: translateY(-2px);
}

.media-row:hover .row-arrow {
  transform: translateX(-3px);
}

.media-row--community {
  background: rgba(8, 74, 69, 0.88);
}

.media-row--community:hover,
.media-row--community:focus-visible {
  background: rgba(10, 96, 86, 0.96);
}

.media-row--contact {
  border-color: rgba(103, 232, 249, 0.34);
  background: linear-gradient(120deg, rgba(3, 105, 161, 0.94), rgba(29, 78, 216, 0.94));
}

.media-row--water {
  background: rgba(8, 54, 104, 0.9);
}

.media-row--mind {
  background: rgba(48, 35, 112, 0.88);
}

.media-row--mind:hover,
.media-row--mind:focus-visible {
  background: rgba(65, 48, 143, 0.96);
}

.post-groups {
  width: min(100%, 680px);
  margin-inline: auto;
}

.post-load-status {
  width: min(100%, 680px);
  margin: 18px auto;
  color: #bfdbfe;
  text-align: center;
}

.post-list-row {
  grid-template-columns: minmax(0, 1fr) 30px;
}

.post-group {
  margin-top: 28px;
}

.post-group h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.12rem;
}

.library-header {
  padding: 28px 26px 24px;
  color: #fff;
}

.library-home,
.library-back {
  color: #bfdbfe;
  font-weight: 700;
  text-decoration: none;
}

.library-header h1 {
  margin: 24px 0 8px;
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  line-height: 1.3;
}

.library-header p {
  margin: 0;
  color: #bfdbfe;
  line-height: 1.6;
}

.library-content {
  padding-top: 0;
}

.post-category {
  display: inline-block;
  padding: 7px 11px;
  color: #e0e7ff;
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  text-decoration: none;
}

.post-page-header {
  padding-inline: clamp(14px, 3vw, 26px);
  padding-bottom: 20px;
}

.post-page-header h1 {
  margin-top: 18px;
}

.post-featured-image {
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin: 20px auto 0;
  border-radius: 12px;
}

.post-meta {
  display: flex;
  margin-top: 14px;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.post-meta time {
  color: #bfdbfe;
  font-size: 0.82rem;
}

.post-content {
  width: min(100%, 680px);
  margin-inline: auto;
  padding: clamp(20px, 5vw, 32px);
  overflow-wrap: anywhere;
  color: var(--ink);
  border-radius: 18px;
  background: rgba(12, 42, 84, 0.88);
  line-height: 1.8;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--ink);
  line-height: 1.4;
}

.post-content a {
  color: #bfdbfe;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.post-content figure {
  margin-inline: 0;
}

.post-content .post-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.post-content table {
  min-width: 100%;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  padding: 8px;
  border: 1px solid rgba(191, 219, 254, 0.4);
}

.post-content .qv-block {
  color: inherit;
}

.post-content .card thead th,
.post-content .qv-block .qv-table thead th,
.post-content .shadow-tree-table thead th {
  color: #fff;
  background: #20256c;
}

.post-content .shadow-tree-table tbody tr {
  color: #1b2540;
}

.post-source {
  width: min(100%, 680px);
  margin: 18px auto 0;
  color: #bfdbfe;
  font-size: 0.85rem;
}

.post-source a {
  color: inherit;
}

.featured-card:focus-visible,
.media-row:focus-visible,
.library-home:focus-visible,
.library-back:focus-visible,
.post-category:focus-visible,
.post-source a:focus-visible,
.social-pills a:focus-visible,
.footer-social a:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

footer {
  margin: 44px -20px -32px;
  padding: 28px 20px 24px;
  color: var(--muted);
  background: var(--content-base);
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-social a {
  display: grid;
  width: 38px;
  height: 38px;
  color: var(--accent-strong);
  border: 1px solid rgba(220, 211, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
  place-items: center;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

footer p {
  margin: 15px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

body.error-page {
  display: grid;
  min-height: 100svh;
  padding: 24px;
  place-items: center;
}

.error-card {
  width: min(100%, 620px);
  padding: clamp(38px, 8vw, 72px) 28px;
  color: #fff;
  border: 1px solid rgba(220, 211, 255, 0.18);
  border-radius: 30px;
  background: var(--content-base);
  box-shadow: var(--shadow-strong);
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.error-card h1 {
  margin: 22px 0 8px;
  font-size: clamp(1.7rem, 6vw, 2.45rem);
}

.error-card p:not(.error-code) {
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
}

.error-home {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 22px;
  color: #fff;
  border: 1px solid rgba(220, 211, 255, 0.24);
  border-radius: 999px;
  background: rgba(161, 133, 218, 0.2);
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.error-home:hover,
.error-home:focus-visible {
  background: rgba(161, 133, 218, 0.36);
  transform: translateY(-2px);
}

@media (min-width: 720px) {
  .article-list {
    grid-template-columns: 1fr 1fr;
    width: min(100%, 680px);
  }

  .article-list .media-row {
    grid-template-columns: 88px minmax(0, 1fr) 25px;
  }

  .article-list .media-row img {
    width: 88px;
  }

  .article-list .media-row > span:not(.row-arrow) {
    padding-inline: 13px 9px;
  }

  .article-list .media-row strong {
    font-size: 0.9rem;
  }

  .content-section:has(.article-list) .section-heading {
    width: min(100%, 680px);
  }
}

@media (max-width: 600px) {
  body {
    padding: 0;
    background: var(--page-base);
  }

  .site-shell {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    height: 340px;
  }

  .hero-image {
    object-position: var(--image-position-mobile, var(--image-position, center 38%));
    transform: scale(1.01);
  }

  .hero-content {
    bottom: 14px;
  }

  .content-shell {
    padding: 18px 14px 30px;
  }

  .content-section {
    margin-top: 39px;
  }

  .featured-card {
    height: 190px;
    border-radius: 15px;
  }

  footer {
    margin-inline: -14px;
    margin-bottom: -30px;
  }

  .media-row {
    grid-template-columns: 92px minmax(0, 1fr) 25px;
    border-radius: 14px;
  }

  .media-row img {
    width: 92px;
  }

  .media-row > span:not(.row-arrow) {
    padding-inline: 13px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
