:root {
  --bg: #020b1e;
  --bg-soft: #071636;
  --bg-card: #0b1f46;
  --text: #f7f7f7;
  --muted: #aeb7cb;
  --accent: #f5a000;
  --accent-strong: #ffbe3b;
  --line: #264574;
  --success: #20bf55;
  --danger: #e94f37;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 20% -20%, #203763 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #321f04 0%, transparent 55%),
    linear-gradient(180deg, #000611 0%, var(--bg) 48%, #00050f 100%);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.section {
  padding: 70px 0;
}

.section-title {
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  line-height: 1.1;
}

.section-subtitle {
  margin: 0 0 30px;
  color: var(--muted);
  max-width: 760px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(2, 10, 30, 0.84);
  border-bottom: 1px solid rgba(245, 160, 0, 0.3);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav a,
.submenu-toggle {
  font-size: 0.94rem;
  color: #dde6f9;
  padding: 6px;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.submenu-toggle:hover,
.nav a[aria-current="true"] {
  color: #fff;
  border-bottom-color: var(--accent);
}

.nav-item-has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(4, 16, 42, 0.98);
  box-shadow: var(--shadow);
  display: none;
}

.submenu li {
  margin: 0;
}

.submenu a {
  display: block;
  border-bottom: 0;
  border-radius: 6px;
}

.submenu a:hover {
  background: rgba(245, 160, 0, 0.12);
}

.nav-item-has-submenu:hover .submenu,
.nav-item-has-submenu .submenu-open {
  display: block;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--accent);
  color: #fff;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
}

.btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #111;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--accent-strong);
}

.btn-outline {
  background: transparent;
  color: #fff;
}

.btn-outline:hover {
  color: #111;
}

.hero {
  min-height: 78vh;
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(2, 8, 22, 0.78), rgba(2, 8, 22, 0.85)),
    linear-gradient(120deg, rgba(245, 160, 0, 0.18), transparent 44%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 14px;
  line-height: 1.1;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.hero p {
  margin: 0 0 22px;
  color: #d4dcf0;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-panel {
  background: rgba(11, 31, 70, 0.65);
  border: 1px solid rgba(245, 160, 0, 0.32);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.hero-image {
  border: 1px solid rgba(245, 160, 0, 0.32);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

.hero-image img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.hero-panel h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.hero-panel ul {
  margin: 0;
  padding-left: 18px;
  color: #d9e3f9;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
}

.photo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 300px;
  box-shadow: var(--shadow);
  background:
    radial-gradient(300px 200px at 20% 10%, rgba(245, 160, 0, 0.45), transparent 70%),
    linear-gradient(160deg, #123469 0%, #03122c 65%);
}

.text-card {
  border-left: 4px solid var(--accent);
  padding-left: 20px;
}

.split-line {
  border-top: 1px solid var(--line);
  margin: 18px 0 0;
}

.service-list {
  display: grid;
  gap: 22px;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(7, 22, 54, 0.85), rgba(4, 13, 34, 0.95));
  padding: 20px;
}

.service-visual {
  min-height: 180px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      145deg,
      #081f4c,
      #081f4c 14px,
      #0f2b66 14px,
      #0f2b66 28px
    );
  border: 1px solid rgba(245, 160, 0, 0.28);
}

.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  background: var(--accent);
  color: #111;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 3px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(5, 17, 43, 0.78);
  margin-bottom: 16px;
}

.project-card h3 {
  margin: 0 0 8px;
}

.project-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.article-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 14px;
  background: rgba(7, 22, 54, 0.6);
}

.sisr-cover {
  object-position: center 32%;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.list-reset {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  border-left: 3px solid var(--accent);
  padding: 12px 0 12px 14px;
  background: rgba(7, 22, 54, 0.6);
}

.timeline-item h4 {
  margin: 0 0 6px;
}

.personal-qualities-card {
  margin-top: 56px;
}

.contact-info-card {
  margin-top: 16px;
}

.form-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 18, 46, 0.85);
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.captcha-wrap {
  display: flex;
  align-items: center;
  min-height: 78px;
}

label {
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid #395d91;
  background: #081a40;
  color: #f4f6fb;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(245, 160, 0, 0.38);
  outline-offset: 1px;
}

.alert {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
}

.alert-success {
  border: 1px solid rgba(32, 191, 85, 0.48);
  background: rgba(32, 191, 85, 0.2);
}

.alert-error {
  border: 1px solid rgba(233, 79, 55, 0.48);
  background: rgba(233, 79, 55, 0.2);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: #cad7f0;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .service-item,
  .columns {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    width: 100%;
    display: none;
    order: 3;
  }

  .nav.nav-open {
    display: block;
  }

  .nav-list {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
  }

  .nav-item-has-submenu {
    width: 100%;
  }

  .submenu {
    position: static;
    margin-top: 8px;
    width: 100%;
  }

  .btn.btn-outline {
    display: none;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 55px 0;
  }

  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-image {
    aspect-ratio: 16 / 10;
  }

  .project-thumb,
  .article-cover {
    aspect-ratio: 16 / 11;
  }
}
