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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: #070d1a;
  color: white;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 140, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 140, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
}

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

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


/* ── Loader ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: white;
  opacity: 0;
  animation: fadeUp 0.5s 0.1s ease forwards;
}

.loader-bar {
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s ease forwards;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: #38bdf8;
  border-radius: 99px;
  animation: fill-bar 1.4s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fill-bar {
  to { width: 100%; }
}

/* ── Keyframes ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50%       { transform: rotate(2deg) translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.3); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Elements start hidden; JS adds .visible to trigger entrance */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  padding: 96px 0;
}

.hero > div {
  animation: fadeUp 0.7s ease both;
}

.hero-image-wrap {
  animation: fadeUp 0.7s 0.2s ease both;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.98;
  font-weight: 700;
}

.hero h1 span {
  display: block;
  color: #38bdf8;
}

.hero p {
  margin-top: 24px;
  max-width: 620px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 14px;
  transition: 0.25s ease;
  font-weight: 600;
}

.btn-primary {
  background: #38bdf8;
  color: black;
}

.btn-primary:hover {
  transform: scale(1.05);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ── Code block ── */
.code-block {
  margin-top: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 18px;
  padding: 20px;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  color: #4ade80;
  max-width: 420px;
}

.code-block p + p {
  margin-top: 4px;
}

.code-block p:last-child::after {
  content: "█";
  font-size: 12px;
  margin-left: 2px;
  animation: blink 1.1s step-start infinite;
}

.indent {
  margin-left: 16px;
}

/* ── Hero image ── */
.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.glow {
  position: absolute;
  top: -24px;
  right: 8px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #7c3aed;
  filter: blur(40px);
  opacity: 0.5;
  animation: pulse-glow 4s ease-in-out infinite;
}

.image-card {
  width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 2;
  animation: float 5s ease-in-out infinite;
}

.image-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* ── Sections ── */
section {
  padding: 80px 0;
}

h2 {
  font-size: 36px;
  margin-bottom: 32px;
}


/* ── Contact ── */
.contact-box {
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}

.contact-box h2 {
  margin-bottom: 16px;
}

.contact-box .btn-primary {
  margin-top: 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 72px 0;
  }

  .hero-image-wrap {
    order: -1;
    justify-content: center;
  }

  .image-card {
    width: min(360px, 72vw);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 32px));
  }

  h2 {
    font-size: 30px;
  }

  .code-block {
    max-width: 100%;
  }

  .contact-box {
    padding: 28px 20px;
  }
}
