:root {
  --color-bg: #f7fbfd;
  --color-surface: #ffffff;
  --color-surface-soft: #edf8fa;
  --color-text: #102333;
  --color-muted: #546979;
  --color-navy: #0b2f4a;
  --color-navy-2: #16466a;
  --color-teal: #0aa6a6;
  --color-teal-dark: #087f85;
  --color-border: #d8e7ee;
  --color-focus: #0a7fdd;
  --shadow-soft: 0 18px 50px rgba(11, 47, 74, 0.1);
  --shadow-card: 0 10px 30px rgba(16, 35, 51, 0.08);
  --radius: 8px;
  --radius-large: 24px;
  --container: 1120px;
  --header-height: 72px;
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(10, 166, 166, 0.12), transparent 34rem),
    linear-gradient(180deg, #f9fcfe 0%, var(--color-bg) 100%);
  color: var(--color-text);
  font-family: var(--font-main);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(247, 251, 253, 0.88);
  border-bottom: 1px solid rgba(216, 231, 238, 0.82);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(100% - 40px, var(--container));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-navy);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__links a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.nav__links a:hover {
  background: var(--color-surface-soft);
  color: var(--color-navy);
}

.nav__links a.is-active {
  background: rgba(10, 166, 166, 0.11);
  color: var(--color-navy);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--color-navy);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

main {
  padding-top: var(--header-height);
}

.section {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
  padding: 84px 0;
}

.section--narrow {
  max-width: 880px;
}

.hero {
  min-height: calc(100svh - var(--header-height));
  display: flex;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero__content {
  width: 100%;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
}

.hero__photo {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(10, 166, 166, 0.28);
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f8fb, #ffffff);
  box-shadow: 0 20px 54px rgba(11, 47, 74, 0.14);
  overflow: hidden;
}

.hero__photo img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.hero__photo img.is-hidden {
  display: none;
}

.hero__placeholder {
  display: grid;
  width: 68%;
  height: 68%;
  place-items: center;
  border-radius: 50%;
  background: var(--color-navy);
  color: #ffffff;
  font-size: clamp(2.7rem, 9vw, 5.1rem);
  font-weight: 800;
}

.eyebrow,
.section__label {
  margin: 0 0 14px;
  color: var(--color-teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0;
  color: var(--color-navy);
  font-size: clamp(3.2rem, 8vw, 6.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin: 0;
  color: var(--color-navy);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.15rem;
  line-height: 1.25;
}

.hero__lead {
  max-width: 710px;
  margin: 28px 0 0;
  color: var(--color-muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero__actions,
.contact-actions,
.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__actions {
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--secondary:hover {
  border-color: rgba(10, 166, 166, 0.5);
  background: #f9fdfe;
}

.button--ghost:hover {
  border-color: rgba(10, 166, 166, 0.68);
  background: rgba(10, 166, 166, 0.14);
}

.button--primary {
  background: var(--color-navy);
  color: #ffffff;
}

.button--secondary {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-navy);
}

.button--ghost {
  border-color: rgba(10, 166, 166, 0.42);
  background: rgba(10, 166, 166, 0.09);
  color: var(--color-teal-dark);
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section__text {
  margin: 28px 0 0;
  color: var(--color-muted);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
}

.facts-grid,
.projects-grid {
  display: grid;
  gap: 16px;
}

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

.fact-card,
.project-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
}

.fact-card {
  min-height: 178px;
  padding: 22px;
}

.fact-card__mark {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--color-teal-dark);
  font-size: 0.8rem;
  font-weight: 900;
}

.fact-card p,
.project-card p {
  margin: 10px 0 0;
  color: var(--color-muted);
}

.project-card__metric {
  color: var(--color-navy-2) !important;
  font-weight: 800;
}

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

.project-card {
  min-height: 320px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.stack-list,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li,
.tags span {
  border: 1px solid rgba(10, 166, 166, 0.25);
  border-radius: 999px;
  background: rgba(10, 166, 166, 0.08);
  color: var(--color-navy-2);
  font-size: 0.88rem;
  font-weight: 800;
}

.stack-list li {
  padding: 6px 10px;
}

.tags {
  margin-top: 30px;
}

.tags span {
  padding: 10px 14px;
}

.text-link {
  color: var(--color-teal-dark);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--color-navy);
}

.badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-soft);
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--color-border);
}

.contact-actions {
  justify-content: flex-end;
}

.contacts__text {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--color-muted);
}

.footer {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
  padding: 28px 0 44px;
  color: var(--color-muted);
  font-weight: 700;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero__content,
  .contacts {
    grid-template-columns: 1fr;
  }

  .hero__photo {
    width: min(240px, 64vw);
  }

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

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 66px;
  }

  .nav {
    width: min(100% - 28px, var(--container));
  }

  .nav__toggle {
    display: inline-block;
  }

  .nav__links {
    position: fixed;
    top: var(--header-height);
    left: 14px;
    right: 14px;
    display: none;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }

  .nav__links.is-open {
    display: grid;
  }

  .nav__links a {
    width: 100%;
    border-radius: var(--radius);
  }

  .section {
    width: min(100% - 28px, var(--container));
    padding: 60px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
    text-align: left;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .hero__actions .button,
  .contact-actions .button {
    flex: 1 1 150px;
  }

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

  .fact-card {
    min-height: 142px;
  }
}

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