@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap');

/* ---------- ROOT VARIABLES ---------- */
:root {
  --primary-blue: #33A1E0;
  --dark-blue: #154D71;
  --accent-yellow: #FFF9AF;
  --text-dark: #333;
  --text-muted: #777;
  --font-main: "Alegreya", serif;
}

/* ---------- RESET & BASE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: var(--font-main);
  font-weight: 600;
}
html, body {
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, var(--primary-blue), var(--dark-blue), #00c6ff, #0072ff);
  background-size: 400% 400%;
  overflow-x: hidden; /* stop sideways scroll */
}

/* ---------- HEADER ---------- */
header {
  background-color: var(--primary-blue);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  height: 60px;
}

/* keep logo responsive */
.logo {
  color: var(--accent-yellow);
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.8vw, 2.2em);
  text-decoration: none;
}

/* navigation default (desktop) */
.navigation {
  display: flex;
  gap: 8px;
  align-items: center;
}

.navigation a {
  color: var(--accent-yellow);
  text-decoration: none;
  font-size: clamp(0.95rem, 1.6vw, 1.6em);
  font-weight: 600;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.navigation a:hover {
  color: var(--dark-blue);
  transform: translateY(3px);
}

/* hamburger / nav toggle (hidden on desktop) */
.nav-toggle {
  display: none; /* will show only on mobile */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

/* dots instead of bars */
.nav-toggle .dot {
  display: block;
  width: 6px;
  height: 6px;
  margin: 3px 0;
  border-radius: 50%;
  background: var(--accent-yellow);
}

/* rotate to vertical when menu open */
.nav-toggle.open {
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}


/* bars inside hamburger */
.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 3px;
  margin: 3px 0;
  border-radius: 2px;
  background: var(--accent-yellow);
  transition: transform 0.3s ease, opacity 0.25s ease;
}

/* animate hamburger to X when open (class added by JS) */
.nav-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- MAIN SECTION ---------- */
.main {
  min-height: calc(100vh - 70px);
  margin-top: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  color: white;
  font-size: clamp(1.1rem, 3vw, 2.5em);
  text-align: center;
}

@keyframes gradientBG {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  max-width: 800px;
  padding-left: 40px;
  text-align: left;
}

.main-title {
  line-height: 0.9;
}

/* ---------- ANIMATED TEXT ---------- */
.words {
  display: inline-block;
  position: relative;
  margin-left: 0.5em;
  vertical-align: middle;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.3em;
  height: 1.3em; /* ensures one line of space */
}

.word {
  display: inline-block;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
  animation: rotateWords 6s linear infinite;
}

/* first word sets container size */
.words .word:first-child {
  position: relative; 
  opacity: 1;
}

.words .word:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
}

.word:nth-child(1) { animation-delay: 0s; }
.word:nth-child(2) { animation-delay: 2s; }
.word:nth-child(3) { animation-delay: 4s; }

@keyframes rotateWords {
  0%   { opacity: 0; transform: translateY(120%); }
  10%,30% { opacity: 1; transform: translateY(0); }
  40%  { opacity: 0; transform: translateY(-120%); }
  100% { opacity: 0; }
}


/* ---------- MAIN BUTTON ---------- */
.main-btn {
  background-color: var(--accent-yellow);
  color: var(--dark-blue);
  font-size: 0.8em;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
}

.main-btn:hover {
  background-color: var(--dark-blue);
  color: var(--accent-yellow);
  cursor: pointer;
}

/* ---------- SECTION TITLES ---------- */
.section-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--dark-blue);
  text-align: center;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 1px 1px 3px rgba(255, 249, 175, 0.8);
}

/* ---------- SERVICES ---------- */
#services {
  background-color: #fff;
  padding: 60px 20px;
  color: var(--text-dark);
  text-align: center;
}

.service-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.service-item {
  background-color: var(--accent-yellow);
  border-radius: 10px;
  padding: 20px;
  width: 280px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-item:nth-child(1) { animation-delay: 0.2s; }
.service-item:nth-child(2) { animation-delay: 0.4s; }
.service-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-item h3 {
  color: var(--dark-blue);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.service-item p {
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- PROJECTS ---------- */
#projects {
  padding: 60px 20px;
  background: linear-gradient(135deg, #1C6EA4, #33A1E0, var(--accent-yellow));
  color: #154D71;
  box-shadow: inset 0 0 100px rgba(255, 249, 175, 0.3);
}

.projects-container {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.projects-left,
.projects-right {
  flex: 1 1 45%;
}

.projects-left h2,
.projects-right h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--dark-blue);
  text-shadow: 1px 1px 3px rgba(255, 249, 175, 0.8);
}

.projects-left video {
  width: 100%;
  max-height: 300px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.image-preview {
  margin-top: 20px;
  text-align: center;
}

.image-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.projects-right p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 60px;
  font-style: italic;
}

/* ---------- CONTACTS ---------- */
#contacts {
  background: linear-gradient(to bottom, var(--primary-blue), var(--dark-blue));
  padding: 60px 20px;
  color: var(--accent-yellow);
  text-align: center;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--accent-yellow);
  color: var(--dark-blue);
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
}

.contact-btn i {
  font-size: 1.8rem;
}

.contact-btn.insta:hover {
  background-color: #E1306C;
  color: white;
  transform: scale(1.05);
}

.contact-btn.whatsapp:hover {
  background-color: #25D366;
  color: white;
  transform: scale(1.05);
}

/* ---------- RESPONSIVE ---------- */

/* Medium screens */
@media (max-width: 1024px) {
  header {
    padding: 12px 36px;
  }

  .navigation a {
    font-size: 1.2rem;
    padding: 8px 10px;
  }

  .main-content {
    padding-left: 20px;
    max-width: 100%;
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  header {
    padding: 10px 18px;
    height: auto;
  }

  /* show hamburger */
  .nav-toggle {
    display: inline-flex;
  }

  /* hide normal nav by default on mobile */
  .navigation {
    display: none;
  }

  /* when open, make a nice dropdown panel */
  .navigation.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    background: linear-gradient(180deg, rgba(51,161,224,0.98), rgba(21,77,113,0.98));
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    min-width: 200px;
    gap: 8px;
  }

  .navigation.open a {
    padding: 10px 12px;
    font-size: 1rem;
  }

  .main {
    padding: 20px;
    font-size: clamp(1rem, 4vw, 1.6em);
  }

  .main-content {
    align-items: center;
    text-align: center;
    padding-left: 0;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .projects-container {
    flex-direction: column;
    gap: 20px;
  }

  .projects-left, .projects-right {
    flex: 1 1 100%;
  }

  .contact-buttons {
    flex-direction: column;
    gap: 20px;
  }

  .contact-btn {
    width: 100%;
    justify-content: center;
  }

  .service-item {
    width: 100%;
  }
}

/* Tiny phones */
@media (max-width: 480px) {
  .logo {
    font-size: 1.4rem;
  }

  .navigation a {
    font-size: 0.95rem;
  }

  .main {
    font-size: 1.0rem;
  }
}
