:root {
  color-scheme: dark;
  --bg: #06101d;
  --bg-soft: #0d1830;
  --panel: rgba(12, 20, 38, 0.72);
  --panel-strong: rgba(18, 30, 54, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eff4ff;
  --muted: #a8b7d4;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 32px 72px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 20%, rgba(99, 102, 241, 0.24), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(56, 189, 248, 0.18), transparent 24%),
    radial-gradient(circle at 72% 82%, rgba(45, 212, 191, 0.14), transparent 30%),
    linear-gradient(160deg, var(--bg), var(--bg-soft));
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite;
}

body::before {
  top: -10rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.9), transparent 68%);
}

body::after {
  left: -10rem;
  bottom: -12rem;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.85), transparent 66%);
  animation-duration: 22s;
  animation-direction: reverse;
}

.site-head {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 18px;
  text-align: center;
}

.site-head__title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #d7d7d7;
  margin-top: 4px;
}

.site-head__subtitle {
  margin: 14px 0 0;
  color: #8fb2ff;
  font-size: 1rem;
}

.site-head__note {
  margin: 8px 0 0;
  color: #dfe8f8;
  font-size: 0.95rem;
}

.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.lang-switcher__btn {
  appearance: none;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(12, 20, 38, 0.84);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.lang-switcher__btn:hover,
.lang-switcher__btn[aria-pressed="true"] {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.page {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 56px;
}

.topnav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(22px, 6vw, 84px);
  min-height: 74px;
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  background: rgba(12, 20, 38, 0.88);
  box-shadow: var(--shadow);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.topnav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 75%);
  transform: translateX(-120%);
  animation: sheen 9s ease-in-out infinite;
  pointer-events: none;
}

.topnav a {
  color: #cbd6eb;
  text-decoration: none;
  font-size: 1rem;
  padding: 10px 8px;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.topnav a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.topnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7dd3fc, #60a5fa, #34d399);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.topnav a:hover::after,
.topnav a:focus-visible::after,
.topnav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  padding: 32px 0 24px;
}

.hero__panel {
  margin: 0 auto;
  width: min(1140px, 100%);
  min-height: 160px;
  padding: 34px 28px 30px;
  border-left: 4px solid rgba(255, 255, 255, 0.18);
  border-right: 4px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 35%),
    var(--panel);
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.hero__panel::before,
.hero__panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero__panel::before {
  inset: -40% auto auto -20%;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28), transparent 72%);
  animation: pulse 8s ease-in-out infinite;
}

.hero__panel::after {
  inset: auto -10% -60% auto;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.2), transparent 70%);
  animation: pulse 10s ease-in-out infinite reverse;
}

.hero__panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--text);
}

.hero__panel p {
  margin: 16px auto 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero__hint {
  margin-top: 18px !important;
  font-size: 0.95rem !important;
  color: #d7e2f7 !important;
}

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

.section-head {
  margin-bottom: 14px;
}

.section-head__tag {
  display: inline-block;
  margin-bottom: 8px;
  color: #8fb2ff;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.section-head h2 {
  margin: 0;
  font-size: 1.7rem;
  color: var(--text);
}

.section-panel {
  padding: 24px 28px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.section-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.04) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: sheen 12s ease-in-out infinite;
  pointer-events: none;
}

.section-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.projects-grid,
.contact-grid {
  display: grid;
  gap: 22px;
}

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

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

.projects-grid .card,
.contact-grid .card {
  min-height: 0;
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.25s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-hover);
}

.projects-grid .card h3,
.contact-grid .card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--text);
}

.card {
  min-height: 168px;
  padding: 28px 30px 26px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    130deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.card:hover::before,
.card:focus-within::before {
  transform: translateX(120%);
}

.card__tag {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8e4fb;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card__edit {
  padding-top: 2px;
  font-size: 0.85rem;
  color: #8fb2ff !important;
}

.card--one {
  border-left: 6px solid #6ea8ff;
}

.card--two {
  border-left: 6px solid #46d6a5;
}

.card--three {
  border-left: 6px solid #f2c14e;
}

.card--four {
  border-left: 6px solid #ff7a8a;
}

.card--five {
  border-left: 6px solid #a78bfa;
}

.site-footer {
  margin-top: 56px;
  padding: 26px 0 30px;
  border-top: 1px solid var(--panel-border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: #8d96a8;
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .projects-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .site-head,
  .page {
    width: min(100% - 20px, 1200px);
  }

  .site-head__subtitle {
    font-size: 0.92rem;
  }

  .topnav {
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 12px;
    min-height: auto;
  }

  .topnav a {
    padding: 6px 4px;
    font-size: 0.95rem;
  }

  .hero {
    padding-top: 18px;
  }

  .hero__panel {
    min-height: auto;
    padding: 26px 18px;
  }

  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .projects-grid {
    margin-top: 6px;
  }

  .card {
    min-height: 0;
    padding: 22px 20px;
  }

  .section-panel {
    padding: 20px;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(24px, 28px, 0) scale(1.06);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-120%);
  }

  45% {
    transform: translateX(120%);
  }

  100% {
    transform: translateX(120%);
  }
}

.fasec-page {
  background: #000000;
  color: #f2f2f2;
}

.fasec-page::before,
.fasec-page::after {
  content: none;
}

body.fasec-page::before,
body.fasec-page::after {
  content: none !important;
  display: none !important;
}

.fasec-page .site-head,
.fasec-page .page {
  position: relative;
  z-index: 1;
}

.fasec-page .site-head__title,
.fasec-page .site-head__subtitle,
.fasec-page .site-head__note,
.fasec-page .section-head h2,
.fasec-page .section-head__tag,
.fasec-page .site-footer p {
  color: #f1f1f1;
}

.fasec-page .site-head__subtitle,
.fasec-page .section-head__tag,
.fasec-page .card__tag {
  text-shadow: none;
}

.fasec-page .topnav::before,
.fasec-page .hero__panel::before,
.fasec-page .hero__panel::after,
.fasec-page .section-panel::before,
.fasec-page .card::before {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.fasec-page .topnav,
.fasec-page .hero__panel,
.fasec-page .section-panel,
.fasec-page .card {
  background: rgba(0, 0, 0, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.95);
  backdrop-filter: none;
}

.fasec-page .topnav a {
  color: #d6d6d6;
}

.fasec-page .topnav a:hover {
  color: #ffffff;
}

.fasec-page .section-head__tag,
.fasec-page .card__tag {
  color: #e6e6e6;
}

.fasec-page .card p,
.fasec-page .section-panel p,
.fasec-page .hero__panel p {
  color: #b8b8b8;
}

.fasec-journey {
  margin-top: 30px;
}

.fasec-journey .section-head {
  margin-bottom: 22px;
}

.fasec-journey .section-head__tag {
  color: #ffffff;
  letter-spacing: 0.22em;
}

.elevator-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.elevator-list::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 18%, #242424 55%, #121212 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.elevator-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  align-items: center;
  min-height: 128px;
  margin: 0;
}

.elevator-item__rail {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.elevator-item__dot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.6);
}

.elevator-item__line {
  width: 4px;
  min-height: 84px;
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 100%);
}

.elevator-item__line--last {
  min-height: 72px;
  background: linear-gradient(180deg, #dcdcdc 0%, #1c1c1c 100%);
}

.elevator-card {
  max-width: 100%;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(5, 5, 5, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.elevator-item:nth-child(odd) .elevator-card {
  grid-column: 1;
  justify-self: end;
  margin-right: 18px;
  text-align: right;
}

.elevator-item:nth-child(even) .elevator-card {
  grid-column: 3;
  justify-self: start;
  margin-left: 18px;
}

.elevator-card__label {
  display: inline-block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.elevator-card h3 {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem);
  line-height: 1.2;
  color: #ffffff;
}

.elevator-card p {
  margin: 10px 0 0;
  color: #b7b7b7;
  line-height: 1.7;
}

.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  display: block;
  background: #000;
}

.fasec-page .lang-switcher {
  margin-top: 18px;
}

.fasec-page .lang-switcher__btn {
  background: rgba(0, 0, 0, 0.92);
  color: #e8e8e8;
  border-color: rgba(255, 255, 255, 0.12);
}

.fasec-page .lang-switcher__btn:hover,
.fasec-page .lang-switcher__btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .elevator-item {
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .elevator-list::before {
    left: 28px;
    transform: none;
  }

  .elevator-item {
    grid-template-columns: 56px 1fr;
    min-height: auto;
    gap: 0;
    padding: 0 0 18px;
  }

  .elevator-item__rail {
    grid-column: 1;
  }

  .elevator-card,
  .elevator-item:nth-child(odd) .elevator-card,
  .elevator-item:nth-child(even) .elevator-card {
    grid-column: 2;
    justify-self: stretch;
    margin: 0 0 0 14px;
    text-align: left;
  }

  .elevator-item__dot {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .elevator-item__line,
  .elevator-item__line--last {
    min-height: 92px;
  }
}

@media (max-width: 640px) {
  .elevator-list::before {
    left: 20px;
  }

  .elevator-item {
    grid-template-columns: 44px 1fr;
  }

  .elevator-card {
    padding: 18px 16px;
  }
}
