/* ========== ROOT VARIABLES ========== */
:root {
  --border-color: #000000;
  --second-border-color: #131313;
  --text-color: #ffffff;
  --main-color: #00ffee;
  --main-color-rgb: 0, 255, 238;
}

/* ========== RESET & GLOBAL STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

html {
  font-size: 75.5%;
  overflow-x: hidden;
}

body {
  background: var(--border-color);
  color: var(--text-color);
}

.text-color {
  color: var(--main-color);
}

.border-color {
  border-color: var(--main-color);
}

.bg-main-color {
  background-color: var(--main-color) !important;
  transition: all 0.3s ease-in-out;
}

/* ========== HOVER EFFECTS ========== */
.hover\:bg-main-color {
  transition: all 0.3s ease-in-out;
}

.hover\:bg-main-color:hover {
  background-color: var(--main-color) !important;
}

.hover\:bg-service-color {
  transition: all 0.3s ease-in-out, border 0.3s ease-in-out;
}

.hover\:bg-service-color:hover {
  background-color: var(--text-color) !important;
  border: var(--main-color) 3px solid;
}

/* ========== SHADOW STYLES ========== */
.shadow-main-color {
  box-shadow: 0 0 10px var(--main-color);
  transition: all 0.3s ease-in-out;
}

.shadow-main-color-lg {
  box-shadow: 0 0 25px var(--main-color);
  transition: all 0.3s ease-in-out;
}

.shadow-main-color-xl {
  box-shadow: 0 0 50px var(--main-color);
  transition: all 0.3s ease-in-out;
}

.hover\:shadow-main-color {
  transition: box-shadow 0.3s ease-in-out;
}

.hover\:shadow-main-color:hover {
  box-shadow: 0 0 10px var(--main-color);
}

.hover\:shadow-main-color-lg {
  transition: box-shadow 0.3s ease-in-out;
}

.hover\:shadow-main-color-lg:hover {
  box-shadow: 0 0 25px var(--main-color);
}

.hover\:shadow-main-color-xl {
  transition: box-shadow 0.3s ease-in-out;
}

.hover\:shadow-main-color-xl:hover {
  box-shadow: 0 0 50px var(--main-color);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 15px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
}

::-webkit-scrollbar-track {
  background-color: var(--border-color);
}

/* ========== BG ANIMATION ========== */
.animated-bg {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
      overflow: hidden;
    }
    
    .animated-bg span {
      position: absolute;
      display: block;
      width: 20px;
      height: 20px;
      background: rgba(var(--main-color-rgb), 0.1);
      border-radius: 50%;
      pointer-events: none;
      box-shadow:
        0 0 10px rgba(var(--main-color-rgb), 0.5),
        0 0 20px rgba(var(--main-color-rgb), 0.3),
        0 0 40px rgba(var(--main-color-rgb), 0.2),
        0 0 80px rgba(var(--main-color-rgb), 0.1);
      animation: float 15s linear infinite;
      opacity: 0;
    }


/* ========== TEXT ANIMATION ========== */
.text-animation span {
  position: relative;
}

.text-animation span::before {
  content: "Web Developer";
  color: var(--main-color);
  animation: words 20s infinite;
}

.text-animation span::after {
  content: "";
  background-color: var(--border-color);
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid var(--border-color);
  right: -8px;
  animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

/* ========== SECTION TRANSITIONS ========== */
section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.show {
  opacity: 1;
  transform: translateY(0);
}

.header.shadow {
  box-shadow: 0 5px 20px rgba(var(--main-color-rgb), 0.2);
}

.home-img img:hover {
  box-shadow: 
    0 0 25px var(--main-color),
    0 0 50px var(--main-color),
    0 0 100px var(--main-color);
}

/* ========== KEYFRAMES ========== */
@keyframes cursor {
  to { border-left-color: var(--main-color); }
}

@keyframes words {
  0%, 20% { content: "Front End Designer"; }
  21%, 40% { content: "Web Designer"; }
  41%, 60% { content: "Backend Developer"; }
  61%, 80% { content: "Data Base Designer"; }
  81%, 100% { content: "UI / UX Designer"; }
}

@keyframes typing {
  10%, 15%, 30%, 35%, 50%, 55%, 70%, 75%, 90%, 95% { width: 0; }
  5%, 20%, 25%, 40%, 45%, 60%, 65%, 80%, 85% { width: calc(100% + 8px); }
}

@keyframes particleAnimation {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
    width: 0;
    height: 0;
  }
  10% {
    opacity: 1;
    width: 6px;
    height: 6px;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) translateX(calc((var(--random-x) * 100vw)));
    opacity: 0;
    width: 2px;
    height: 2px;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

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

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== TIMELINE STYLES ========== */
.timeline-items {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-items::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 100%;
  background-color: var(--main-color);
  left: calc(50% - 1px);
  top: 0;
}

.timeline-item {
  position: relative;
  margin-bottom: 60px;
  width: 100%;
}

.timeline-item:nth-child(odd) .timeline-content-container {
  margin-left: calc(50% + 30px);
  text-align: left;
}

.timeline-item:nth-child(even) .timeline-content-container {
  margin-right: calc(50% + 30px);
  text-align: right;
}

.timeline-content-container {
  position: relative;
}

.timeline-date {
  font-size: 2rem;
  font-weight: 800;
  color: var(--main-color);
  margin-bottom: 10px;
  text-shadow: 0 0 10px var(--main-color);
}

.timeline-content {
  background-color: var(--border-color);
  border: 3px solid var(--main-color);
  padding: 30px;
  border-radius: 4rem;
  box-shadow: 0 0 10px var(--main-color);
  transition: all 0.3s ease-in-out;
}

.timeline-content:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px var(--main-color);
}

/* Timeline icon animations */
.timeline-icon {
      position: absolute;
      left: calc(50% - 15px);
      top: 10px;
      width: 30px;
      height: 30px;
      background: var(--border-color);
      border: 3px solid var(--main-color);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      box-shadow: 0 0 15px var(--main-color);
      transition: all 0.4s ease;
    }
    
    .timeline-item:hover .timeline-icon {
      transform: scale(1.3);
      background: var(--main-color);
      box-shadow: 0 0 25px var(--main-color);
    }
    
    .timeline-icon i {
      color: var(--main-color);
      font-size: 1.2rem;
    }
    
    .timeline-item:hover .timeline-icon i {
      color: var(--border-color);
    }

/* ========== MENU STYLES ========== */
.navbar {
  display: none;
  transition: all 0.3s ease-in-out;
}

.navbar.active {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  padding: 1rem 3%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  display: block;
  border-bottom: 2px solid var(--main-color);
  box-shadow: 0 5px 20px rgba(var(--main-color-rgb), 0.3);
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}

.navbar a {
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.navbar a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--main-color);
  transition: width 0.3s ease-in-out;
}

.navbar a:hover::before,
.navbar a.active::before {
  width: 100%;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
  transform: translateX(5px);
}

.navbar2 {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  max-width: 320px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 2px solid var(--main-color);
  border-left: 2px solid var(--main-color);
  border-bottom-left-radius: 2rem;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(var(--main-color-rgb), 0.3);
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}

.navbar2.active {
  display: block;
}

.navbar2 a {
  transition: all 0.3s ease-in-out;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.navbar2 a:hover {
  background: rgba(var(--main-color-rgb), 0.1);
  transform: scale(1.05);
}

.navbar2 a::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--main-color);
  box-shadow: 0 0 10px var(--main-color);
}

.navbar2 a[data-color="#00ffee"]::after { background: #00ffee; }
.navbar2 a[data-color="#ff0000"]::after { background: #ff0000; }
.navbar2 a[data-color="#b100ff"]::after { background: #b100ff; }
.navbar2 a[data-color="#fff900"]::after { background: #fff900; }
.navbar2 a[data-color="#1fff00"]::after { background: #1fff00; }
.navbar2 a[data-color="#ff00cb"]::after { background: #ff00cb; }

.bx-x {
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

/* ========== LANGUAGE SELECTOR ========== */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--main-color);
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.lang-btn:hover {
  background: var(--main-color);
  color: var(--border-color);
}

.lang-btn.active {
  background: var(--main-color);
  color: var(--border-color);
  box-shadow: 0 0 10px var(--main-color);
}

.flag {
  width: 24px;
  height: 16px;
  background-size: cover;
  border-radius: 2px;
}

.flag-id {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 600"><rect width="900" height="300" fill="%23e70011"/><rect y="300" width="900" height="300" fill="%23ffffff"/></svg>');
}

.flag-en {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect width="1200" height="600" fill="%23012169"/><path d="M0 0l1200 600M0 600L1200 0" stroke="%23ffffff" stroke-width="120"/><path d="M0 0l1200 600M0 600L1200 0" stroke="%23C8102E" stroke-width="80"/><rect width="1200" height="600" fill="none" stroke="%23C8102E" stroke-width="40"/></svg>');
}

@media (max-width: 768px) {
  .lang-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
  }
  .flag {
    width: 20px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .lang-btn span {
    display: none;
  }
  .lang-btn {
    padding: 0.3rem;
  }
}

/* ========== ICON HOVER EFFECTS ========== */
.icon-hover {
  transition: all 0.3s ease;
}

.icon-hover:hover {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 8px var(--main-color));
}

.service-icon {
  color: var(--main-color);
  text-shadow: 0 0 15px var(--main-color);
  transition: all 0.4s ease;
  display: none;
}

.service-box:hover .service-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  transform: translateY(-10px) scale(1.1);
  color: var(--border-color);
  text-shadow: 0 0 25px var(--main-color);
  transition: all 0.4s ease;
}

/* ========== SKILL BAR STYLES ========== */
.skill-item:hover i {
  transform: scale(1.2);
  color: var(--main-color);
  transition: all 0.3s ease;
}

.skill-bar:hover .skill-progress {
  width: attr(data-percent);
}

/* ========== FORM INPUT STYLES ========== */
.input-group input,
.input-group textarea {
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 15px var(--main-color);
  transform: translateY(-3px);
}

/* ========== BUTTON HOVER EFFECT ========== */
.btn-hover {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hover:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,250,0.2), transparent);
  transition: 0.5s;
}

.btn-hover:hover:before {
  left: 100%;
}

/* ========== FLOATING ELEMENTS ========== */
.floating {
  position: absolute;
  z-index: -1;
  opacity: 0.7;
  filter: blur(1px);
}

/* ========== PARTICLE EFFECTS ========== */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: var(--main-color);
  border-radius: 50%;
  opacity: 0;
  animation: particleAnimation 10s linear infinite;
}

/* ========== RESPONSIVE LAYOUT ========== */
@media (max-width: 991px) {
  .navbar {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    padding: 1rem 3%;
    border-bottom: 2px solid var(--main-color);
    box-shadow: 0 5px 20px rgba(var(--main-color-rgb), 0.3);
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
  }

  .navbar.active {
    display: block;
  }

  .navbar a {
    display: block;
    font-size: 1rem;
    padding: 1rem;
    margin: 0.5rem 0;
    text-align: center;
    transition: all 0.3s ease-in-out;
    border-radius: 0.5rem;
  }

  .navbar a:hover {
    background: rgba(var(--main-color-rgb), 0.1);
    transform: translateY(-2px);
  }

  .navbar2 {
    display: none;
  }

  .timeline-items::before {
    left: 7px;
  }

  .timeline-icon {
    left: 7px;
    transform: translateX(-40%);
  }

  .timeline-item:hover .timeline-icon {
    transform: scale(1.3) translateX(-40%);
  }

  .timeline-item:nth-child(odd) .timeline-content-container,
  .timeline-item:nth-child(even) .timeline-content-container {
    margin-left: 35px;
    margin-right: 0;
    text-align: left;
  }

  .services-container {
    grid-template-columns: 1fr;
  }

  .testimonials-items {
    min-width: 100%;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .navbar2 {
    max-width: 100%;
    right: auto;
    left: 0;
    border-left: none;
    border-bottom-left-radius: 0;
    animation: slideDown 0.3s ease-out;
  }
}

@media (min-width: 992px) {
  .menu-icon {
    display: none;
  }

  .navbar {
    display: flex !important;
    position: static;
    width: auto;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
  }

  .navbar a {
    display: inline-block;
    margin-left: 2rem;
  }

  .navbar.active {
    display: flex;
  }

  html {
    font-size: 75.5%;
  }

  .navbar2 {
    max-width: 250px;
  }

  .lang-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
  }

  .flag {
    width: 20px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1.5rem 5%;
  }

  .navbar a {
    margin-left: 0;
  }

  .home {
    padding: 10rem 5% 5rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .navbar2 {
    max-width: 100%;
    right: auto;
    left: 0;
    border-left: none;
    border-bottom-left-radius: 0;
  }
}
