:root {
  /* Official palette aligned to the school brand guide. */
  --nns-blue: #29438f;
  --nns-blue-deep: #213571;
  --nns-sky: #1d9cd8;
  --nns-teal: #2a848e;
  --nns-teal-deep: #236f78;
  --nns-green: #249143;
  --nns-magenta: #b94889;
  --nns-violet: #8055aa;
  --nns-lavender: #814dde;
  --steam-yellow: #fab512;
  --nns-pale-blue: #9db7e7;
  --nns-lilac: #ece7f8;
  --background: #f7f9fd;
  --card-background: #ffffff;
  --surface-blue: #eef3ff;
  --surface-muted: #edf2fb;
  --surface-cool: #edf8f7;
  --surface-green: #f1f8f2;
  --surface-violet: #f5eef9;
  --surface-warm: #fff7e7;
  --surface-gold: #fff9e8;
  --surface-magenta: #faeef5;
  --surface-rose: #f9edf4;
  --border-soft: rgba(41, 67, 143, 0.12);
  --text-main: #203556;
  --text-muted: #61738f;
  --shadow-soft: 0 18px 45px rgba(33, 53, 113, 0.11);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --header-height: 84px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(157, 183, 231, 0.28), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(42, 132, 142, 0.12), transparent 18%),
    radial-gradient(circle at 88% 78%, rgba(250, 181, 18, 0.1), transparent 18%),
    radial-gradient(circle at 14% 86%, rgba(36, 145, 67, 0.08), transparent 16%),
    var(--background);
}

body.is-rtl {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

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

a,
button,
input,
select {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
  background: none;
}

input,
select {
  width: 100%;
}

::selection {
  background: rgba(29, 156, 216, 0.18);
  color: var(--nns-blue);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--nns-blue);
  color: #fff;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nns-teal);
}

.page-shell {
  min-height: calc(100vh - var(--header-height));
}

.view-panel[hidden] {
  display: none !important;
}

#aboutView .eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.2em;
}

#aboutView .hero-copy h1 {
  font-size: clamp(2.05rem, 4.3vw, 3.45rem);
  line-height: 1.05;
}

#aboutView .hero-school {
  font-size: 1.02rem;
}

#aboutView .hero-description {
  font-size: 1rem;
  line-height: 1.8;
}

#aboutView .hero-meta-card strong {
  font-size: 0.98rem;
}

#aboutView .stat-card strong {
  font-size: 1.72rem;
}

#aboutView .hero-panel-top h2 {
  font-size: 1.48rem;
  line-height: 1.15;
}

#aboutView .hero-panel-top p,
#aboutView .hero-note p {
  font-size: 0.98rem;
}

#aboutView .hero-feature strong {
  font-size: 0.98rem;
  line-height: 1.62;
}

#aboutView .section-heading h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.18;
}

#aboutView .section-heading p,
#aboutView .overview-band-card p,
#aboutView .about-card p,
#aboutView .about-cta-card p {
  font-size: 1rem;
  line-height: 1.76;
}

#aboutView .overview-band-card strong {
  font-size: 1rem;
}

#aboutView .about-card h3,
#aboutView .about-cta-card h3 {
  font-size: 1.18rem;
}

.section {
  padding: 72px 0;
}

.site-header {
  position: sticky;
  isolation: isolate;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(247, 250, 255, 0.94) 50%,
    rgba(244, 251, 249, 0.94) 100%
  );
  border-bottom: 1px solid var(--border-soft);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--nns-blue) 0%,
    var(--nns-blue) 34%,
    var(--nns-sky) 48%,
    var(--nns-teal) 62%,
    var(--nns-green) 74%,
    var(--nns-violet) 86%,
    var(--steam-yellow) 100%
  );
  opacity: 0.68;
  pointer-events: none;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.header-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title,
.brand-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--nns-blue);
  letter-spacing: 0.01em;
}

.brand-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 24px rgba(24, 31, 73, 0.08);
  flex-shrink: 0;
}

.logo-frame-small {
  width: 74px;
  height: 74px;
}

.logo-frame-large {
  width: 118px;
  height: 118px;
}

.logo-emblem {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.45);
  transform-origin: center top;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 22px rgba(24, 31, 73, 0.08);
}

.lang-button {
  min-width: 78px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--nns-blue);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.18s ease;
}

.lang-button:hover,
.lang-button:focus-visible {
  background: var(--surface-muted);
  color: var(--nns-teal);
  outline: none;
}

.lang-button.is-active {
  background: linear-gradient(135deg, var(--nns-blue), var(--nns-sky));
  color: #fff;
  box-shadow: 0 10px 22px rgba(42, 56, 144, 0.18);
}

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

.site-nav a {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--nns-blue);
  background: transparent;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface-muted);
  color: var(--nns-teal);
  outline: none;
}

.site-nav a.is-active {
  background: linear-gradient(135deg, var(--nns-blue), var(--nns-sky));
  color: #fff;
  border-color: rgba(42, 56, 144, 0.12);
  box-shadow: 0 12px 24px rgba(42, 56, 144, 0.18);
}

.menu-toggle {
  display: none;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--nns-blue);
  box-shadow: 0 8px 18px rgba(12, 46, 112, 0.08);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0 48px;
  background:
    radial-gradient(circle at 12% 18%, rgba(157, 183, 231, 0.32), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(29, 156, 216, 0.1), transparent 16%),
    linear-gradient(180deg, rgba(238, 243, 255, 0.92) 0%, rgba(255, 255, 255, 0.56) 42%, rgba(255, 255, 255, 0.96) 100%),
    linear-gradient(135deg, rgba(255, 249, 232, 0.58) 0%, rgba(245, 238, 249, 0.16) 48%, rgba(255, 255, 255, 0) 72%);
}

.hero-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(45px);
  opacity: 0.6;
  pointer-events: none;
}

.hero-glow-left {
  left: -120px;
  top: 40px;
  background: rgba(42, 132, 142, 0.18);
}

.hero-glow-right {
  right: -120px;
  top: 30px;
  background: rgba(185, 72, 137, 0.14);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
}

.hero-copy h1 {
  margin: 18px 0 0;
  font-size: clamp(2.25rem, 4.8vw, 3.9rem);
  line-height: 1.02;
  color: var(--nns-blue);
  letter-spacing: -0.04em;
}

.hero-school {
  margin: 16px 0 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--nns-teal);
}

.hero-description {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.hero-meta-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-soft);
  box-shadow: 0 14px 28px rgba(24, 31, 73, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-meta-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.hero-meta-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-meta-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--nns-blue);
}

.meta-blue::before {
  background: linear-gradient(180deg, var(--nns-blue), var(--nns-sky));
}

.meta-teal::before {
  background: linear-gradient(180deg, var(--nns-teal), var(--nns-green));
}

.meta-purple::before {
  background: linear-gradient(180deg, var(--nns-violet), var(--nns-magenta));
}

.meta-blue {
  background: linear-gradient(180deg, rgba(41, 67, 143, 0.1) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.meta-teal {
  background: linear-gradient(180deg, rgba(42, 132, 142, 0.12) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.meta-purple {
  background: linear-gradient(180deg, rgba(245, 238, 249, 0.92) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--nns-blue), var(--nns-sky));
  color: #fff;
  box-shadow: 0 14px 26px rgba(42, 56, 144, 0.2);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(135deg, var(--nns-blue-deep), var(--nns-blue));
}

.button-secondary {
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--nns-blue);
  box-shadow: 0 8px 18px rgba(12, 46, 112, 0.08);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--nns-teal);
  border-color: rgba(29, 156, 216, 0.35);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.stat-card,
.hero-panel,
.info-note,
.filters-panel,
.about-card,
.detail-card,
.detail-image-card,
.about-cta-card {
  background: var(--card-background);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.stat-card:nth-child(1) {
  background: linear-gradient(180deg, rgba(41, 67, 143, 0.12) 0%, #ffffff 100%);
}

.stat-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(42, 132, 142, 0.14) 0%, #ffffff 100%);
}

.stat-card:nth-child(3) {
  background: linear-gradient(180deg, rgba(250, 181, 18, 0.16) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.stat-label,
.info-note span,
.hero-feature span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-card strong {
  font-size: 1.95rem;
  line-height: 1.15;
  color: var(--nns-blue);
}

.hero-panel {
  position: relative;
  padding: 34px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(42, 132, 142, 0.14), transparent 28%),
    radial-gradient(circle at 18% 16%, rgba(157, 183, 231, 0.34), transparent 24%),
    radial-gradient(circle at 88% 88%, rgba(250, 181, 18, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 246, 255, 0.98) 100%);
}

.hero-panel-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--nns-blue-deep) 0%,
    var(--nns-blue) 34%,
    var(--nns-sky) 50%,
    var(--nns-teal) 64%,
    var(--nns-violet) 80%,
    var(--steam-yellow) 92%,
    var(--nns-magenta) 100%
  );
}

.hero-panel-top {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.hero-panel-top h2 {
  margin: 14px 0 0;
  font-size: 1.65rem;
  line-height: 1.12;
  color: var(--nns-blue);
}

.hero-panel-top p {
  margin: 16px 0 0;
  line-height: 1.8;
  color: var(--text-muted);
}

.hero-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.hero-feature {
  min-height: 152px;
  padding: 22px;
  border-radius: var(--radius-lg);
}

.hero-feature strong {
  display: block;
  line-height: 1.7;
}

.hero-feature-blue {
  background: linear-gradient(145deg, var(--nns-blue-deep) 0%, var(--nns-blue) 44%, var(--nns-sky) 78%, var(--nns-teal) 100%);
  color: #fff;
}

.hero-feature-blue span {
  color: rgba(255, 255, 255, 0.72);
}

.hero-feature-light {
  background: linear-gradient(180deg, rgba(255, 249, 232, 0.94) 0%, rgba(238, 243, 255, 0.92) 100%);
  color: var(--nns-blue);
}

.hero-note {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(185, 72, 137, 0.07) 0%, rgba(250, 181, 18, 0.13) 48%, rgba(29, 156, 216, 0.08) 100%);
  border: 1px dashed rgba(128, 85, 170, 0.2);
}

.hero-note-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nns-blue);
}

.hero-note p {
  margin: 0;
  line-height: 1.75;
  color: var(--text-muted);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

.section-heading-tight {
  align-items: center;
}

.section-heading h2 {
  margin: 14px 0 0;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.15;
  color: var(--nns-blue);
}

.section-heading p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.info-note {
  min-width: 220px;
  max-width: 320px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 249, 232, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
  border-color: rgba(250, 181, 18, 0.2);
}

.info-note strong {
  display: block;
  font-size: 2.5rem;
  color: var(--nns-blue);
}

.info-note p {
  margin: 0;
  line-height: 1.75;
  color: var(--text-main);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.about-overview-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.overview-band-card {
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid var(--border-soft);
  box-shadow: 0 14px 30px rgba(24, 31, 73, 0.08);
}

.overview-band-card:nth-child(1) {
  background: linear-gradient(180deg, rgba(41, 67, 143, 0.12) 0%, #ffffff 100%);
}

.overview-band-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(42, 132, 142, 0.14) 0%, #ffffff 100%);
}

.overview-band-card:nth-child(3) {
  background: linear-gradient(180deg, rgba(185, 72, 137, 0.1) 0%, #ffffff 100%);
}

.overview-band-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.overview-band-card strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--nns-blue);
}

.overview-band-card p {
  margin: 10px 0 0;
  line-height: 1.72;
  color: var(--text-muted);
}

.about-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  border-top-width: 5px;
  position: relative;
  overflow: hidden;
}

.about-card h3,
.about-cta-card h3 {
  margin: 0;
  font-size: 1.28rem;
  color: var(--nns-blue);
}

.about-card p,
.about-cta-card p {
  margin: 14px 0 0;
  line-height: 1.82;
  color: var(--text-muted);
}

.about-cta-card {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(250, 181, 18, 0.14), transparent 28%),
    radial-gradient(circle at 0 100%, rgba(29, 156, 216, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 243, 255, 0.98) 100%);
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.credits-card,
.credits-message {
  background: var(--card-background);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.credits-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border-top-width: 5px;
  overflow: hidden;
}

.credits-card h3,
.credits-message h3 {
  margin: 14px 0 0;
  font-size: 1.28rem;
  color: var(--nns-blue);
}

.credits-card p,
.credits-message p {
  margin: 14px 0 0;
  line-height: 1.82;
  color: var(--text-muted);
}

.credits-message {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 12% 12%, rgba(157, 183, 231, 0.22), transparent 24%),
    radial-gradient(circle at 88% 20%, rgba(42, 132, 142, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 248, 248, 0.97) 100%);
}

.accent-blue {
  border-top-color: var(--nns-blue);
  background: linear-gradient(180deg, rgba(41, 67, 143, 0.1) 0%, #ffffff 100%);
}

.accent-teal {
  border-top-color: var(--nns-teal-deep);
  background: linear-gradient(180deg, rgba(42, 132, 142, 0.12) 0%, #ffffff 100%);
}

.accent-purple {
  border-top-color: var(--nns-violet);
  background: linear-gradient(180deg, rgba(128, 85, 170, 0.08) 0%, rgba(250, 238, 245, 0.86) 100%);
}

.section-gallery {
  padding-top: 72px;
}

.filters-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 28px;
  margin-top: 30px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(157, 183, 231, 0.24) 0%, rgba(238, 243, 255, 0.92) 28%, rgba(237, 248, 247, 0.9) 62%, rgba(255, 249, 232, 0.88) 100%);
}

.search-block label,
.category-block label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-block input,
.select-wrap select {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "\25BE";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--nns-blue);
  font-size: 0.95rem;
}

.select-wrap select {
  appearance: none;
  padding-right: 46px;
}

.search-block input:focus-visible,
.select-wrap select:focus-visible {
  outline: 3px solid rgba(29, 156, 216, 0.18);
  border-color: rgba(29, 156, 216, 0.34);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border-soft);
  background: var(--card-background);
  box-shadow: var(--shadow-soft);
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  z-index: 2;
  background: linear-gradient(90deg, var(--nns-blue), var(--nns-sky), var(--nns-teal));
}

.project-card:nth-child(4n + 1)::before {
  background: linear-gradient(90deg, var(--nns-blue), var(--nns-sky), var(--nns-teal));
}

.project-card:nth-child(4n + 2)::before {
  background: linear-gradient(90deg, var(--nns-teal), var(--nns-green), var(--steam-yellow));
}

.project-card:nth-child(4n + 3)::before {
  background: linear-gradient(90deg, var(--steam-yellow), var(--nns-violet), var(--nns-magenta));
}

.project-card:nth-child(4n + 4)::before {
  background: linear-gradient(90deg, var(--nns-lavender), var(--nns-blue), var(--nns-teal));
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 52px rgba(24, 31, 73, 0.18);
}

.project-image-frame {
  position: relative;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: linear-gradient(180deg, #f6f9ff 0%, #eef5ff 100%);
}

.project-card:nth-child(4n + 1) .project-image-frame {
  background: linear-gradient(180deg, rgba(157, 183, 231, 0.26) 0%, rgba(238, 243, 255, 0.96) 100%);
}

.project-card:nth-child(4n + 2) .project-image-frame {
  background: linear-gradient(180deg, rgba(42, 132, 142, 0.1) 0%, rgba(244, 251, 250, 0.96) 100%);
}

.project-card:nth-child(4n + 3) .project-image-frame {
  background: linear-gradient(180deg, rgba(128, 85, 170, 0.08) 0%, rgba(250, 238, 245, 0.96) 100%);
}

.project-card:nth-child(4n + 4) .project-image-frame {
  background: linear-gradient(180deg, rgba(250, 181, 18, 0.1) 0%, rgba(255, 250, 239, 0.98) 100%);
}

.project-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
}

.project-image-fade {
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(180deg, rgba(8, 25, 53, 0) 0%, rgba(8, 25, 53, 0.58) 100%);
}

.project-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.project-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nns-blue);
  background: rgba(41, 67, 143, 0.1);
}

.project-card:nth-child(4n + 2) .project-category {
  color: var(--nns-teal-deep);
  background: rgba(42, 132, 142, 0.14);
}

.project-card:nth-child(4n + 3) .project-category {
  color: var(--nns-violet);
  background: rgba(128, 85, 170, 0.12);
}

.project-card:nth-child(4n + 4) .project-category {
  color: #9b6d08;
  background: rgba(250, 181, 18, 0.16);
}

.project-title {
  margin: 12px 0 0;
  font-size: 1.35rem;
  line-height: 1.18;
  color: var(--nns-blue);
}

.project-description {
  margin: 12px 0 0;
  line-height: 1.72;
  color: var(--text-muted);
}

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

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--nns-blue);
  font-size: 0.88rem;
  font-weight: 700;
}

.project-card:nth-child(4n + 2) .tag {
  background: rgba(42, 132, 142, 0.12);
  color: var(--nns-teal-deep);
}

.project-card:nth-child(4n + 3) .tag {
  background: rgba(128, 85, 170, 0.12);
  color: #5d3988;
}

.project-card:nth-child(4n + 4) .tag {
  background: rgba(250, 181, 18, 0.14);
  color: #8f6504;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 20px;
}

.empty-state {
  margin-top: 28px;
  padding: 36px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  background: var(--card-background);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--nns-blue);
}

.empty-state p {
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 25, 53, 0.62);
  backdrop-filter: blur(8px);
}

.detail-dialog {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 24px;
  overflow: auto;
  border-radius: 34px;
  background:
    radial-gradient(circle at 100% 0, rgba(250, 181, 18, 0.12), transparent 24%),
    radial-gradient(circle at 0 100%, rgba(42, 132, 142, 0.12), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid var(--border-soft);
  box-shadow: 0 32px 70px rgba(24, 31, 73, 0.28);
}

.detail-close {
  position: sticky;
  top: 0;
  z-index: 3;
  float: right;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-soft);
  color: var(--nns-blue);
  font-size: 1.9rem;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(12, 46, 112, 0.12);
}

.detail-topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  clear: both;
}

.detail-topbar h2 {
  margin: 14px 0 0;
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  line-height: 1.12;
  color: var(--nns-blue);
}

.detail-category {
  margin: 14px 0 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--nns-teal);
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  margin-top: 24px;
}

.detail-image-card,
.detail-card {
  border-radius: 30px;
}

.detail-image-card {
  padding: 16px;
}

.detail-image-card img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border-soft);
}

.detail-content {
  display: grid;
  gap: 18px;
}

.detail-card {
  padding: 24px;
}

.detail-card h3 {
  margin: 0;
  font-size: 1.24rem;
  color: var(--nns-blue);
}

.detail-card p {
  margin: 14px 0 0;
  line-height: 1.82;
  color: var(--text-muted);
}

.concept-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.steam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.steam-item {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-muted);
  border: 1px solid rgba(18, 61, 140, 0.08);
}

.steam-item:nth-child(1) {
  background: rgba(36, 145, 67, 0.1);
  border-color: rgba(36, 145, 67, 0.16);
}

.steam-item:nth-child(2) {
  background: rgba(42, 132, 142, 0.12);
  border-color: rgba(42, 132, 142, 0.16);
}

.steam-item:nth-child(3) {
  background: rgba(41, 67, 143, 0.1);
  border-color: rgba(41, 67, 143, 0.14);
}

.steam-item:nth-child(4) {
  background: rgba(128, 85, 170, 0.1);
  border-color: rgba(128, 85, 170, 0.14);
}

.steam-item:nth-child(5) {
  background: rgba(250, 181, 18, 0.16);
  border-color: rgba(250, 181, 18, 0.2);
}

.steam-item h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--nns-blue);
}

.steam-item p {
  margin: 0;
  line-height: 1.75;
}

.applications-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.applications-list li {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 249, 232, 0.86) 0%, rgba(238, 243, 255, 0.86) 100%);
  border: 1px solid rgba(18, 61, 140, 0.08);
  line-height: 1.7;
}

.site-footer {
  position: relative;
  margin-top: 72px;
  padding: 28px 0;
  background:
    linear-gradient(90deg, var(--nns-blue-deep) 0%, #263d82 38%, var(--nns-blue) 70%, #3558a8 100%);
  color: #fff;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--nns-sky) 0%,
    var(--nns-teal) 18%,
    var(--nns-green) 36%,
    var(--nns-violet) 58%,
    var(--nns-magenta) 78%,
    var(--steam-yellow) 100%
  );
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand strong,
.footer-copy strong {
  display: block;
  font-size: 1.18rem;
}

.footer-brand p,
.footer-copy p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.footer-copy {
  text-align: end;
}

.site-nav a:focus-visible,
.menu-toggle:focus-visible,
.lang-button:focus-visible,
.button:focus-visible,
.detail-close:focus-visible,
.search-block input:focus-visible,
.select-wrap select:focus-visible {
  outline: 3px solid rgba(29, 156, 216, 0.22);
  outline-offset: 2px;
}

body.is-rtl .eyebrow,
body.is-rtl .hero-meta-card span,
body.is-rtl .stat-label,
body.is-rtl .info-note span,
body.is-rtl .hero-feature span,
body.is-rtl .overview-band-card span,
body.is-rtl .search-block label,
body.is-rtl .category-block label,
body.is-rtl .project-category,
body.is-rtl .hero-note-label {
  letter-spacing: normal;
  text-transform: none;
}

body.is-rtl .hero-copy h1,
body.is-rtl .section-heading h2,
body.is-rtl .detail-topbar h2 {
  letter-spacing: 0;
}

body.is-rtl #aboutView .hero-copy h1 {
  line-height: 1.18;
}

body.is-rtl .hero-panel-top h2 {
  line-height: 1.28;
}

body.is-rtl .hero-meta-card::before {
  inset: 0 0 0 auto;
}

body.is-rtl .select-wrap::after {
  right: auto;
  left: 18px;
}

body.is-rtl .select-wrap select {
  padding-right: 18px;
  padding-left: 46px;
}

body.is-rtl .detail-close {
  float: left;
  margin-right: auto;
  margin-left: 0;
}

@media (max-width: 1100px) {
  .hero-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .filters-panel,
  .section-heading,
  .detail-topbar,
  .about-cta-card,
  .credits-message {
    flex-direction: column;
    align-items: stretch;
  }

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

  .footer-copy {
    text-align: start;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 76px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(320px, calc(100vw - 24px));
    padding: 14px;
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 48px rgba(12, 46, 112, 0.14);
  }

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

  body.is-rtl .site-nav {
    right: auto;
    left: 0;
  }

  .hero-panel-top,
  .hero-stats,
  .hero-meta,
  .hero-feature-grid,
  .about-overview-band,
  .about-grid,
  .credits-grid,
  .steam-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel-top {
    flex-direction: column;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }
}

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

  .detail-dialog {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 18px;
    border-radius: 24px;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .section,
  .hero-section {
    padding: 56px 0;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.84rem;
  }

  .header-controls {
    gap: 10px;
  }

  .language-toggle {
    padding: 3px;
  }

  .lang-button {
    min-width: 68px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  .logo-frame-small {
    width: 62px;
    height: 62px;
  }

  .logo-frame-large {
    width: 94px;
    height: 94px;
  }

  .hero-description,
  .hero-note p,
  .section-heading p,
  .overview-band-card p,
  .about-card p,
  .about-cta-card p,
  .credits-card p,
  .credits-message p,
  .detail-card p {
    font-size: 1rem;
  }
}
