:root {
  --navy: #081d33;
  --navy-soft: #102d4b;
  --gold: #d4af37;
  --gold-deep: #ae892a;
  --paper: #f7f5ef;
  --paper-strong: #fffdf8;
  --line: #d8d0c2;
  --ink: #102335;
  --muted: #637181;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(8, 29, 51, 0.09);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 7% 5%, rgba(212, 175, 55, 0.08), transparent 22rem),
    linear-gradient(180deg, #faf8f3, var(--paper));
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0;
}

.header {
  position: relative;
  top: 0;
  z-index: auto;
  color: var(--white);
  background: var(--navy);
}

.header-inner {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--navy);
  padding: 0.55rem 1.5rem 0.45rem;
}

.identity {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.identity-scales {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  color: var(--gold);
}

.identity-scales svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.identity strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  font-weight: 500;
  line-height: 1.1;
}

.identity small {
  color: #ccd5de;
  font-size: 0.62rem;
}

.header-tools,
.languages {
  display: flex;
  align-items: center;
}

.header-tools {
  gap: 1.25rem;
}

.languages {
  gap: 0.4rem;
}

.languages button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #d2d9e0;
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0.2rem;
}

.languages button.active {
  border-color: var(--gold);
  color: var(--gold);
}

.header-contact {
  border: 1px solid rgba(212, 175, 55, 0.7);
  color: var(--gold);
  font-size: 0.72rem;
  padding: 0.42rem 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
}

.nav {
  position: relative;
  display: flex;
  gap: clamp(1.1rem, 3vw, 2rem);
  justify-content: flex-start;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1180px;
  margin: 0 auto;
  background: #092038;
  padding: 0 1.5rem 0 11rem;
}

#hero-root {
  position: relative;
  z-index: 20;
}

.nav > a,
.materials-nav > button {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #d7dde4;
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.nav > a:hover,
.materials-nav > button:hover,
.materials-nav:focus-within > button {
  color: var(--gold);
}

.materials-dropdown {
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 50%;
  display: none;
  width: min(68rem, calc(100vw - 2rem));
  padding: 1.1rem;
  transform: translateX(-50%);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.materials-nav:hover .materials-dropdown,
.materials-nav:focus-within .materials-dropdown,
.materials-nav.open .materials-dropdown {
  display: block;
}

.menu-materials-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.menu-category {
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}

.menu-category:last-child {
  border: 0;
}

.menu-category > strong {
  display: block;
  min-height: 2.8rem;
  color: var(--navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.2;
}

.menu-resource {
  display: grid;
  gap: 0.25rem;
  border-top: 1px solid #ebe5d9;
  padding: 0.6rem 0;
  font-size: 0.73rem;
}

.menu-resource a {
  color: var(--gold-deep);
  font-weight: 600;
}

.menu-awaiting {
  color: var(--muted);
}

.overline {
  margin-bottom: 0.65rem;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.practice,
.contacts {
  color: var(--white);
  background: var(--navy);
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.practice {
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.practice,
.bio,
.materials,
.contacts {
  scroll-margin-top: 7.6rem;
}

.section-intro {
  max-width: 1240px;
  margin: 0 auto 1.4rem;
}

.section-intro h2 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.section-intro-dark h2 {
  color: var(--white);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid rgba(212, 175, 55, 0.24);
}

.practice-card {
  display: grid;
  align-content: start;
  min-height: 11.75rem;
  border-right: 1px solid rgba(212, 175, 55, 0.24);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 1rem 0.85rem 0.85rem;
  text-align: center;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.practice-card:last-child {
  border-right: 0;
}

.practice-card:hover,
.practice-card:focus-within {
  z-index: 1;
  border-color: rgba(212, 175, 55, 0.52);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.15), 0 10px 24px rgba(0, 0, 0, 0.16);
  transform: translateY(-0.2rem);
}

.practice-icon {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  margin: 0 auto 0.45rem;
  color: var(--gold);
}

.practice-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.practice-card h3 {
  min-height: 2.5rem;
  margin-bottom: 0.4rem;
  color: var(--white);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  line-height: 1.25;
}

.practice-card p {
  margin-bottom: 0.45rem;
  color: #bfccd8;
  font-size: 0.61rem;
  line-height: 1.45;
}

.practice-card span {
  display: block;
  margin-top: auto;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--gold);
  font-size: 0.58rem;
  line-height: 1.4;
  padding-top: 0.4rem;
}

.lower-content {
  display: block;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.8rem) clamp(1rem, 4vw, 2rem) 1rem;
}

.bio {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.bio-copy {
  columns: 2;
  column-gap: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: justify;
  text-justify: inter-word;
}

.bio-copy p {
  break-inside: avoid;
}

.timeline ol {
  display: grid;
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}

.timeline strong {
  color: var(--gold-deep);
}

.timeline span {
  color: var(--muted);
  font-size: 0.82rem;
}

.publications {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem 0 0.9rem;
}

.publications > .section-intro,
.practice > .section-intro {
  display: none;
}

.category-grid {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.material-rail-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39%;
  min-width: 0;
  min-height: 8.6rem;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.material-rail-card:hover,
.material-rail-card:focus-within {
  border-color: rgba(180, 135, 38, 0.58);
  box-shadow: 0 8px 20px rgba(11, 29, 51, 0.12);
  transform: translateY(-0.18rem);
}

.material-rail-copy {
  display: grid;
  align-content: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 1rem 0.7rem 1rem 1rem;
}

.material-rail-copy small {
  color: var(--navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.material-rail-copy strong {
  margin: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.45;
}

.material-rail-copy span {
  color: var(--gold-deep);
  font-size: 0.6rem;
  font-weight: 600;
}

.material-rail-art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid rgba(11, 29, 51, 0.08);
  background-color: #e8e4dc;
}

.material-rail-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 253, 248, 0.3), transparent 42%);
  content: "";
  pointer-events: none;
}

.material-rail-art svg {
  position: relative;
  z-index: 1;
  width: 62%;
  max-height: 70%;
  fill: none;
  stroke: var(--gold-deep);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.material-rail-card--bio .material-rail-art {
  background: var(--paper-strong);
}

.material-rail-card--jewish-law .material-rail-art {
  background: var(--navy);
}

.material-rail-card--jewish-law .material-rail-art svg {
  stroke: var(--gold);
}

.material-rail-card--moshiach .material-rail-art {
  background: #ece7dc url("assets/images/hero-world-map-relief-v1.png") center / cover no-repeat;
}

.material-rail-card--interviews .material-rail-art {
  background:
    linear-gradient(rgba(11, 29, 51, 0.74), rgba(11, 29, 51, 0.74)),
    url("assets/images/portrait-background-plate-v1.png") center / cover no-repeat;
}

.material-rail-card--interviews .material-rail-art svg {
  stroke: var(--gold);
}

@media (min-width: 821px) {
  .practice-card {
    align-content: center;
    min-height: 6.2rem;
    padding: 0.55rem 0.7rem 0.5rem;
  }

  .practice-icon {
    width: 1.85rem;
    height: 1.85rem;
    margin-bottom: 0.25rem;
  }

  .practice-card h3 {
    min-height: 0;
    margin-bottom: 0;
    font-size: 0.72rem;
  }

  .practice-card p {
    margin-bottom: 0.25rem;
    font-size: 0.54rem;
    line-height: 1.3;
  }

  .practice-card span {
    padding-top: 0.25rem;
    font-size: 0.51rem;
    line-height: 1.25;
  }

  .publications {
    padding-top: 0.55rem;
    padding-bottom: 0.65rem;
  }

  .material-rail-card {
    min-height: 7.2rem;
  }

  .material-rail-copy {
    gap: 0.35rem;
    padding: 0.7rem 0.55rem 0.7rem 0.75rem;
  }

  .material-rail-copy small {
    font-size: 0.78rem;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1240px;
  margin: 0 auto;
}

.contact-grid article {
  display: flex;
  flex-direction: column;
  min-height: 8.25rem;
  border: 1px solid rgba(212, 175, 55, 0.24);
  padding: 1rem;
}

.contact-grid small {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--gold);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.contact-grid a,
.contact-grid span {
  color: #e0e7ed;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.contact-number,
.contact-value {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.contact-phone {
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.contact-phone:hover,
.contact-phone:focus-within {
  border-color: rgba(212, 175, 55, 0.74);
  background: rgba(212, 175, 55, 0.04);
}

.contact-number {
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

.contact-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.3rem);
  transition: opacity 170ms ease, transform 170ms ease;
}

.contact-phone:hover .contact-actions,
.contact-phone:focus-within .contact-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.contact-actions a {
  border: 1px solid rgba(212, 175, 55, 0.52);
  color: var(--gold);
  font-size: 0.7rem;
  padding: 0.42rem 0.62rem;
  text-decoration: none;
  white-space: nowrap;
}

.contact-actions a:hover,
.contact-actions a:focus-visible {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
}

@media (max-width: 1080px) {
  .practice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .header {
    position: sticky;
    z-index: 30;
  }

  #hero-root {
    z-index: auto;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-tools {
    grid-column: 1 / -1;
    justify-content: space-between;
    order: 3;
  }

  .header-contact {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    border: 1px solid rgba(212, 175, 55, 0.7);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.52rem 0.8rem;
    text-transform: uppercase;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 1rem 1rem;
  }

  .nav.open {
    display: flex;
  }

  .nav > a,
  .materials-nav > button {
    width: 100%;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .materials-dropdown {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    padding: 0.8rem;
  }

  .materials-nav:hover .materials-dropdown,
  .materials-nav:focus-within .materials-dropdown {
    display: none;
  }

  .materials-nav.open .materials-dropdown {
    display: block;
  }

  .menu-materials-list {
    grid-template-columns: 1fr;
  }

  .menu-category {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 0;
  }

  .practice {
    padding: 0.6rem 0.75rem;
  }

  .practice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-color: rgba(212, 175, 55, 0.3);
  }

  .practice-card {
    min-height: 7rem;
    border-right: 1px solid rgba(212, 175, 55, 0.24);
    border-bottom: 1px solid rgba(212, 175, 55, 0.24);
    padding: 0.65rem;
    text-align: left;
  }

  .practice-card:nth-child(2n) {
    border-right: 0;
  }

  .practice-details {
    grid-template-columns: 1fr;
  }

  .lower-content {
    display: block;
  }

  .publications {
    padding: 0.65rem 0.75rem 0.85rem;
  }

  .bio-copy {
    columns: 1;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .material-rail-card {
    grid-template-columns: minmax(0, 1fr) 34%;
    min-height: 7.4rem;
  }

  .material-rail-copy {
    padding: 0.85rem 0.8rem 0.85rem 0.95rem;
  }

  .category-items {
    grid-template-columns: 1fr;
  }

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

  .contact-phone {
    cursor: pointer;
  }
}

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

  .footer {
    flex-direction: column;
  }
}

[dir="rtl"] .lower-content,
[dir="rtl"] .publications,
[dir="rtl"] .contacts {
  direction: rtl;
}
