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

:root {
  --white: #ffffff;
  --black: #050505;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-glow: rgba(249, 115, 22, 0.15);
  --gray: #0d0d0d;
  --gray-light: #141414;
  --gray-border: rgba(255, 255, 255, 0.06);
  --text: #f5f5f5;
  --text-muted: #888888;
  --radius: 12px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #ffa94d;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Particles Background ===== */

#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#particles::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(249,115,22,0.3), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(249,115,22,0.2), transparent),
    radial-gradient(2px 2px at 60% 20%, rgba(249,115,22,0.25), transparent),
    radial-gradient(2px 2px at 80% 80%, rgba(249,115,22,0.15), transparent),
    radial-gradient(1px 1px at 10% 90%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(249,115,22,0.1), transparent);
  animation: particlesDrift 20s ease-in-out infinite alternate;
}

@keyframes particlesDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, -2%) scale(1.1); }
}

/* ===== Reveal Animation ===== */

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

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

/* ===== Header ===== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-border);
  transition: background var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.header__logo-img {
  height: 32px;
  width: auto;
  border-radius: 4px;
}

.header__nav-list {
  list-style: none;
  display: flex;
  gap: 36px;
}

.header__nav-list a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.header__nav-list a:hover,
.header__nav-list a.active {
  color: var(--text);
}

.header__nav-list a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.header__nav-list a:hover::after,
.header__nav-list a.active::after {
  width: 100%;
}

.header__menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
}

.header__menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.header__menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.header__menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  z-index: 1;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 40%, var(--orange-glow), transparent 70%),
    radial-gradient(ellipse 300px 300px at 70% 60%, rgba(249,115,22,0.05), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__iso-wrapper {
  display: inline-block;
  padding: 36px;
  margin: 0 auto 48px;
  position: relative;
}

.hero__iso-wrapper::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--orange), transparent, var(--orange));
  opacity: 0.35;
  animation: borderGlow 3s ease-in-out infinite alternate;
}

.hero__iso-wrapper::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(249,115,22,0.04));
  backdrop-filter: blur(12px);
  z-index: -1;
}

.hero__iso {
  max-height: 360px;
  width: auto;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 24px 44px;
}

@keyframes borderGlow {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(1.02); }
}

.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--orange), #ffa94d, var(--orange));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn--primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

.btn--primary:hover {
  background: var(--orange-dark);
  color: var(--white);
  box-shadow: 0 6px 30px rgba(249, 115, 22, 0.45);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gray-border);
}

.btn--ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

.btn--send {
  padding: 16px 40px;
  font-size: 1rem;
}

.btn__arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s;
}

.btn--send:hover .btn__arrow {
  transform: translate(3px, -3px);
}

/* ===== Section Shared ===== */

.section {
  position: relative;
  z-index: 1;
  padding: 120px 0;
}

.section__header {
  margin-bottom: 60px;
}

.section__header.center {
  text-align: center;
}

.section__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(249, 115, 22, 0.06);
}

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ===== Services ===== */

.services {
  background: var(--gray);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--gray-light);
  padding: 36px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  border-color: rgba(249, 115, 22, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(249, 115, 22, 0.03);
}

.service-card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--orange);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== About ===== */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__content p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about__content strong {
  color: var(--text);
}

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--gray-border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.about__visual {
  display: flex;
  justify-content: center;
}

.about__code-block {
  background: #0a0a0f;
  border: 1px solid rgba(249, 115, 22, 0.12);
  border-radius: var(--radius);
  padding: 28px 32px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.95rem;
  line-height: 2;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.04);
}

.about__code-block::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: linear-gradient(135deg, rgba(249,115,22,0.15), transparent 40%, transparent 60%, rgba(249,115,22,0.1));
  z-index: -1;
}

.code-line {
  white-space: nowrap;
}

.code-line.indent { padding-left: 2ch; }
.code-line.indent2 { padding-left: 4ch; }
.code-line.indent3 { padding-left: 6ch; }

.code-keyword { color: #ff79c6; }
.code-class { color: #f97316; }
.code-fn { color: #50fa7b; }
.code-bool { color: #8be9fd; }

.code-cursor {
  animation: blink 1s step-end infinite;
  color: var(--orange);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== Contact ===== */

.contact {
  background: var(--gray);
}

.contact__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.contact__form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form__group {
  position: relative;
}

.form__group.full {
  grid-column: 1 / -1;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 18px 16px 14px;
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.form__group textarea {
  resize: vertical;
  min-height: 120px;
}

.form__group input:focus,
.form__group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form__group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all 0.2s ease;
  background: var(--gray-light);
  padding: 0 4px;
}

.form__group textarea ~ label {
  top: 18px;
  transform: none;
}

.form__group input:focus ~ label,
.form__group textarea:focus ~ label,
.form__group input:not(:placeholder-shown) ~ label,
.form__group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  transform: none;
  font-size: 0.75rem;
  color: var(--orange);
}

.contact__direct {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.contact__direct a {
  color: var(--orange);
  font-weight: 500;
}

/* ===== Contact Success ===== */

.contact__success {
  display: none;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  padding: 40px;
}

.contact__success.show {
  display: block;
}

.contact__success.hide-form ~ .contact__form {
  display: none;
}

.success__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: #22c55e;
  animation: successPop 0.5s ease;
}

@keyframes successPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.success__icon svg {
  width: 100%;
  height: 100%;
}

.contact__success h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.contact__success p {
  color: var(--text-muted);
}

/* ===== Footer ===== */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--gray-border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__logo {
  height: 24px;
  width: auto;
  border-radius: 3px;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__email {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer__email:hover {
  color: var(--orange);
}

/* ===== Mobile ===== */

@media (max-width: 768px) {
  .header__menu-toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
  }

  .header__nav.open {
    opacity: 1;
    pointer-events: all;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 32px;
    align-items: center;
  }

  .header__nav-list a {
    font-size: 1.3rem;
    font-weight: 600;
  }

  .hero__iso {
    max-height: 130px;
    padding: 14px 24px;
  }

  .hero__iso-wrapper {
    padding: 18px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about__stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 80px 0;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__left {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__title {
    font-size: 1.8rem;
  }
}
