:root {
  color-scheme: light;
  --blue: #0039a6;
  --blue-dark: #072b68;
  --red: #c9212d;
  --ink: #111827;
  --text: #111827;
  --text-soft: #273244;
  --muted: #5f6b7a;
  --line: #d9e0ea;
  --paper: #f7f8fb;
  --surface: #fff;
  --surface-muted: #e7ebf1;
  --section-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 251, 0.98));
  --header-bg: rgba(255, 255, 255, 0.94);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --note-text: #072b68;
  --white: #fff;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #5b8cff;
  --blue-dark: #0b1730;
  --red: #ff6b75;
  --ink: #f3f7ff;
  --text: #f3f7ff;
  --text-soft: #d5deef;
  --muted: #9aa8bc;
  --line: #263449;
  --paper: #0b1220;
  --surface: #121b2b;
  --surface-muted: #182437;
  --section-bg: linear-gradient(180deg, rgba(18, 27, 43, 0.98), rgba(11, 18, 32, 0.98));
  --header-bg: rgba(14, 22, 36, 0.94);
  --menu-bg: rgba(18, 27, 43, 0.98);
  --note-text: #dbe7ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue: #5b8cff;
    --blue-dark: #0b1730;
    --red: #ff6b75;
    --ink: #f3f7ff;
    --text: #f3f7ff;
    --text-soft: #d5deef;
    --muted: #9aa8bc;
    --line: #263449;
    --paper: #0b1220;
    --surface: #121b2b;
    --surface-muted: #182437;
    --section-bg: linear-gradient(180deg, rgba(18, 27, 43, 0.98), rgba(11, 18, 32, 0.98));
    --header-bg: rgba(14, 22, 36, 0.94);
    --menu-bg: rgba(18, 27, 43, 0.98);
    --note-text: #dbe7ff;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: rgba(5, 18, 42, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  color: var(--text);
  background: var(--header-bg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 10px 20px rgba(0, 57, 166, 0.28);
}

.brand-text {
  font-size: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--blue);
  background: rgba(0, 57, 166, 0.1);
}

.header-action,
.theme-toggle,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.header-action {
  min-width: 62px;
  padding: 0 18px;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 14px 24px rgba(0, 57, 166, 0.25);
}

.max-action {
  background: linear-gradient(135deg, #05162c 0%, #0b4ce8 48%, #7b22dc 100%);
  box-shadow: 0 14px 28px rgba(18, 76, 218, 0.28);
}

.max-action:hover {
  background: linear-gradient(135deg, #061a35 0%, #0d43c9 46%, #661dbb 100%);
}

.theme-toggle {
  gap: 8px;
  min-width: 98px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled .theme-toggle,
.site-header.menu-open .theme-toggle {
  border-color: var(--line);
  background: var(--surface);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.site-header.is-scrolled .theme-toggle:hover,
.site-header.menu-open .theme-toggle:hover {
  background: var(--paper);
}

.theme-icon {
  font-size: 17px;
  line-height: 1;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: inherit;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  align-content: end;
  gap: 42px;
  padding: 150px clamp(20px, 6vw, 80px) 56px;
  color: var(--white);
  background-image:
    linear-gradient(90deg, rgba(3, 12, 30, 0.82), rgba(3, 12, 30, 0.36) 54%, rgba(3, 12, 30, 0.2)),
    url("../img/optimized/hero.jpg");
  background-position: center 30%;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-content {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffccd1;
}

.hero h1,
.section-heading h2,
.contacts-section h2 {
  margin: 0;
  line-height: 1.06;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 8vw, 92px);
}

.hero-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-link,
.secondary-link {
  padding: 0 24px;
}

.primary-link {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 18px 30px rgba(0, 57, 166, 0.35);
}

.secondary-link {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 980px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-facts div {
  padding: 22px;
  background: rgba(5, 18, 42, 0.28);
}

.hero-facts strong,
.hero-facts span {
  display: block;
}

.hero-facts strong {
  font-size: 18px;
}

.hero-facts span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.section {
  padding: 86px clamp(20px, 6vw, 80px);
}

.intro-section {
  background: var(--section-bg), var(--paper);
}

.section-heading {
  max-width: 960px;
  margin: 0 auto 42px;
}

.section-heading h2,
.contacts-section h2 {
  font-size: clamp(34px, 5vw, 58px);
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  max-width: 1120px;
  margin: 0 auto 72px;
}

.bio-grid-reverse {
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.bio-grid-reverse .bio-copy {
  order: 2;
}

.bio-copy {
  padding-left: 24px;
  border-left: 4px solid var(--blue);
}

.bio-copy p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.8;
}

.bio-copy p:last-child {
  margin-bottom: 0;
}

.photo-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-muted);
  box-shadow: var(--shadow);
}

.photo-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.photo-frame:hover img {
  transform: scale(1.035);
}

.notes {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
}

.notes span {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--note-text);
  background: var(--surface);
  font-weight: 700;
}

.contacts-section {
  padding: 72px clamp(20px, 6vw, 80px);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(7, 43, 104, 0.96), rgba(0, 57, 166, 0.9)),
    var(--blue-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.5fr);
  gap: clamp(24px, 5vw, 70px);
  max-width: 1120px;
  margin: 0 auto;
}

.contacts-section .eyebrow {
  color: #ffccd1;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.contact-card h3 {
  margin: 0 0 16px;
  font-size: 24px;
}

.contact-card p {
  min-height: 78px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.contact-card a {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 14px 30px rgba(0, 57, 166, 0.3);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media screen and (max-width: 900px) {
  .site-header {
    gap: 12px;
  }

  .brand-text {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 74px;
    right: 16px;
    left: 16px;
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--menu-bg);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .header-action {
    min-width: 52px;
    padding: 0 13px;
  }

  .theme-toggle {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .theme-toggle [data-theme-label] {
    display: none;
  }

  .hero {
    min-height: 760px;
    padding-top: 120px;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .bio-grid,
  .bio-grid-reverse {
    grid-template-columns: 1fr;
    margin-bottom: 52px;
  }

  .bio-grid-reverse .bio-copy {
    order: 0;
  }

  .photo-frame {
    max-width: 520px;
  }

  .footer-inner,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .contact-card p {
    min-height: 0;
  }
}

@media screen and (max-width: 560px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    min-height: 720px;
    padding: 108px 18px 34px;
    background-position: 56% 30%;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section,
  .contacts-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .bio-copy {
    padding-left: 18px;
  }

  .bio-copy p {
    font-size: 17px;
    line-height: 1.75;
  }

  .notes span {
    width: 100%;
  }

  .scroll-top {
    right: 16px;
    bottom: 16px;
  }
}
