html {
  scroll-behavior: smooth;
}

:root {
  --bg: #050112;
  --bg-alt: #0b061f;
  --surface: #111827;
  --surface-soft: #020617;

  --primary: #4B1D7A;
  --primary-soft: #6120A8;
  --primary-soft2: #9F5CFF;

  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #08070d 0%, #0a0810 45%, #11091a 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

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

.section {
  padding: 80px 0;
}

.section-alt {
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #050112 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 12px 0;
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.logo-main {
  font-size: 18px;
  font-weight: 600;
  color: #e5e7eb;
  letter-spacing: 0.01em;
}

.logo-accent {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-soft2);
  letter-spacing: 0.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  border-color: rgba(248, 250, 252, 0.18);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-btn {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft2));
  border-color: transparent;
  color: #f9fafb;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span + span {
  margin-top: 5px;
}

.hero {
  padding: 90px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 48px;
  align-items: center;
}

.hero-text {
  max-width: 620px;
}

.hero-kicker {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-soft2);
  margin: 0 0 8px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.15;
}

.hero-sub {
  margin: 8px 0 18px;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 540px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-pill {
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #e5e7eb;
  background: radial-gradient(circle at top left, rgba(60, 24, 120, 0.6), rgba(15, 23, 42, 0.96));
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #3A0E5F, #4B1D7A);
  color: #f9fafb;
  box-shadow: 0 0 18px rgba(58, 14, 95, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #4B1D7A, #6120A8);
  box-shadow: 0 0 22px rgba(75, 29, 122, 0.85);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.55);
  color: var(--text);
}

.btn.secondary:hover {
  border-color: var(--primary-soft2);
  color: #e5e7eb;
}

.btn.ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
}

.btn.ghost:hover {
  border-color: var(--primary-soft2);
  color: #e5e7eb;
}

.btn.full-width {
  width: 100%;
}

.hero-aside {
  display: grid;
  gap: 14px;
}

.hero-photo-card {
  background: radial-gradient(circle at top left, rgba(75, 29, 122, 0.5), rgba(15, 23, 42, 1));
  border-radius: 18px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(129, 140, 248, 0.8);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-photo-wrap {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(159, 92, 255, 0.85);
  box-shadow: 0 0 16px rgba(70, 30, 140, 0.75);
  flex-shrink: 0;
}

.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-photo-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f3e8ff;
}

.hero-photo-role {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-card {
  background: radial-gradient(circle at top left, rgba(75, 29, 122, 0.32), rgba(15, 23, 42, 1));
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.hero-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-soft2);
  margin-bottom: 4px;
}

.hero-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.section-title {
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.section-content {
  max-width: 720px;
  font-size: 14px;
  color: var(--text-muted);
}

.section-content p {
  margin-top: 0;
  margin-bottom: 12px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
}

.skills-group h3 {
  font-size: 15px;
  margin: 0 0 8px;
  color: #e5e7eb;
}

.skills-group ul li {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.card {
  background: radial-gradient(circle at top left, rgba(17, 24, 39, 1), rgba(2, 6, 23, 1));
  border-radius: 16px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
}

.project-card {
  border-radius: 14px;
  padding: 22px;
  background: rgba(20, 10, 30, 0.35);
  border: 1px solid rgba(120, 60, 180, 0.14);
  backdrop-filter: blur(4px);
  transition: 0.25s ease;
}

.project-card:hover {
  border-color: rgba(150, 80, 220, 0.3);
  transform: translateY(-3px);
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: #e8defc;
}

.project-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #b8aad6;
  line-height: 1.55;
}

.project-tags {
  font-size: 12px;
  color: var(--primary-soft2);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
}

.contact-info p {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
  row-gap: 10px;
  column-gap: 12px;
  font-size: 13px;
  align-items: center;
}

.contact-grid .label {
  color: #e5e7eb;
  opacity: 0.9;
}

.contact-grid .value a {
  color: var(--primary-soft2);
  word-break: break-all;
}

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

.contact-form-wrapper {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 16px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.8);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  color: #e5e7eb;
}

.form-field input,
.form-field textarea {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--primary-soft2);
  box-shadow: 0 0 0 1px rgba(159, 92, 255, 0.4);
}

.form-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding: 16px 0 18px;
  background: rgba(3, 7, 18, 0.98);
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
}

.footer-social a {
  color: var(--text-muted);
  transition: 0.25s ease;
}

.footer-social a:hover {
  color: var(--primary-soft2);
}

.footer-social svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

.scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft2));
  color: #f9fafb;
  font-size: 22px;
  font-weight: 600;
  border: none;
  outline: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.2s ease;
  z-index: 999;
  box-shadow: 0 0 18px rgba(75, 29, 122, 0.55);
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  box-shadow: 0 0 24px rgba(75, 29, 122, 0.85);
}

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
}

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

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

  .hero-aside {
    order: -1;
  }

  .hero {
    padding-top: 80px;
  }

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

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

@media (max-width: 768px) {
  .nav-container {
    gap: 0.75rem;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    right: 16px;
    left: 16px;
    padding: 10px 12px 10px;
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.98);
    border: 1px solid rgba(31, 41, 55, 0.9);
    flex-direction: column;
    gap: 0.6rem;
    font-size: 13px;
    display: none;
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .hero-title {
    font-size: 28px;
  }

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

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

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

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    padding-top: 70px;
  }
}

.lang-transition {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lang-transition.show {
  opacity: 1;
}

.contact-label-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
  color: var(--text-muted);
}