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

:root {
  --dark: #0a0a0a;
  --light: #ffffff;
  --gray: #1a1a1a;
  --accent: #00d9ff;
  --accent2: #ff006e;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Courier New', monospace;
  background: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
}

.scanner {
  width: 200px;
  height: 200px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  position: relative;
  margin: 0 auto 30px;
  overflow: hidden;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  animation: scan 2s linear infinite;
}

@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(200px); }
}

.glitch {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 20px;
  position: relative;
  animation: glitchAnim 0.3s infinite;
}

@keyframes glitchAnim {
  0% { text-shadow: -2px 0 var(--accent2), 2px 0 var(--accent); }
  50% { text-shadow: 2px 0 var(--accent2), -2px 0 var(--accent); }
  100% { text-shadow: -2px 0 var(--accent2), 2px 0 var(--accent); }
}

.preloader-content p {
  font-size: 12px;
  letter-spacing: 2px;
  animation: pulse 1.5s infinite;
}

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

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.gradient-mesh {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 50%, var(--dark) 100%);
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.1); }
}

#canvas-bg {
  position: absolute;
  inset: 0;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid rgba(0, 217, 255, 0.1);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.logo-3d {
  display: flex;
  gap: 2px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  perspective: 1000px;
}

.logo-3d span {
  animation: float3d 3s ease-in-out infinite;
  display: inline-block;
  color: var(--accent);
}

.logo-3d span:nth-child(1) { animation-delay: 0s; }
.logo-3d span:nth-child(2) { animation-delay: 0.1s; }
.logo-3d span:nth-child(3) { animation-delay: 0.2s; }

@keyframes float3d {
  0%, 100% { transform: translateY(0px) rotateX(0deg); }
  50% { transform: translateY(-10px) rotateX(10deg); }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  color: var(--light);
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.nav-link::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  color: var(--accent);
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-link:hover::before {
  transform: translateX(0);
}

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

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-text {
  z-index: 2;
}

.hero-title {
  font-size: clamp(40px, 10vw, 100px);
  font-weight: 900;
  line-height: 0.9;
  margin-bottom: 20px;
  letter-spacing: -3px;
}

.char {
  display: inline-block;
  animation: charAnim 0.5s ease backwards;
}

.char:nth-child(1) { animation-delay: 0.05s; }
.char:nth-child(2) { animation-delay: 0.1s; }
.char:nth-child(3) { animation-delay: 0.15s; }
.char:nth-child(4) { animation-delay: 0.2s; }
.char:nth-child(5) { animation-delay: 0.25s; }
.char:nth-child(6) { animation-delay: 0.3s; }
.char:nth-child(7) { animation-delay: 0.35s; }
.char:nth-child(8) { animation-delay: 0.4s; }
.char:nth-child(9) { animation-delay: 0.45s; }
.char:nth-child(10) { animation-delay: 0.5s; }
.char:nth-child(11) { animation-delay: 0.55s; }
.char:nth-child(12) { animation-delay: 0.6s; }
.char:nth-child(13) { animation-delay: 0.65s; }
.char:nth-child(14) { animation-delay: 0.7s; }
.char:nth-child(15) { animation-delay: 0.75s; }
.char:nth-child(16) { animation-delay: 0.8s; }
.char:nth-child(17) { animation-delay: 0.85s; }
.char:nth-child(18) { animation-delay: 0.9s; }
.char:nth-child(19) { animation-delay: 0.95s; }
.char:nth-child(20) { animation-delay: 1s; }
.char:nth-child(21) { animation-delay: 1.05s; }
.char:nth-child(22) { animation-delay: 1.1s; }
.char:nth-child(23) { animation-delay: 1.15s; }
.char:nth-child(24) { animation-delay: 1.2s; }
.char:nth-child(25) { animation-delay: 1.25s; }
.char:nth-child(26) { animation-delay: 1.3s; }
.char:nth-child(27) { animation-delay: 1.35s; }

@keyframes charAnim {
  from {
    opacity: 0;
    transform: translateY(50px) rotateX(90deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.hero-subtitle {
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 15px;
  animation: fadeIn 0.8s ease 1.5s both;
}

.hero-desc {
  font-size: 16px;
  color: #aaa;
  max-width: 500px;
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease 1.7s both;
  line-height: 1.8;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
  animation: fadeIn 0.8s ease 1.9s both;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  z-index: -1;
  transition: left 0.4s ease;
}

.btn-primary {
  color: var(--dark);
  background: var(--accent);
}

.btn-primary::before {
  background: #00a8cc;
}

.btn-primary:hover::before {
  left: 0;
}

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

.btn-secondary {
  color: var(--accent);
  background: transparent;
}

.btn-secondary::before {
  background: var(--accent);
}

.btn-secondary:hover::before {
  left: 0;
}

.btn-secondary:hover {
  color: var(--dark);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn:hover svg {
  transform: translateX(4px);
}

.scroll-indicator {
  margin-top: 60px;
  animation: fadeIn 0.8s ease 2.1s both;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 0;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-down 2s ease infinite;
}

@keyframes scroll-down {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

.hero-visual {
  position: relative;
  height: 500px;
  animation: fadeInRight 0.8s ease 0.3s both;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.floating-card {
  position: absolute;
  background: rgba(0, 217, 255, 0.1);
  border: 2px solid var(--accent);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  animation: float 4s ease-in-out infinite;
}

.card-1 {
  top: 50px;
  right: 50px;
  animation-delay: 0s;
}

.card-2 {
  top: 200px;
  left: 0;
  animation-delay: 1s;
}

.card-3 {
  bottom: 100px;
  right: 100px;
  animation-delay: 2s;
}

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

.card-content {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
}

.card-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-top: 5px;
}

.geometric-shape {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.1), transparent);
  border-radius: 50%;
  filter: blur(40px);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* ============================================
   WORKS SECTION
   ============================================ */
.works {
  padding: 150px 20px;
  position: relative;
  background: linear-gradient(180deg, var(--dark) 0%, #1a1a2e 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 100px;
  position: relative;
}

.section-title {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  letter-spacing: -3px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.title-split {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInDown 0.8s ease;
}

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

.title-line {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 20px auto;
  animation: expandWidth 0.8s ease 0.2s both;
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 100px; }
}

.works-container {
  max-width: 1200px;
  margin: 0 auto;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.work-item {
  animation: fadeIn 0.8s ease backwards;
}

.work-item:nth-child(1) { animation-delay: 0.1s; }
.work-item:nth-child(2) { animation-delay: 0.2s; }
.work-item:nth-child(3) { animation-delay: 0.3s; }
.work-item:nth-child(4) { animation-delay: 0.4s; }
.work-item:nth-child(5) { animation-delay: 0.5s; }
.work-item:nth-child(6) { animation-delay: 0.6s; }

.work-card {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
}

.work-card:hover {
  transform: translateY(-20px);
  border-color: var(--accent);
  box-shadow: 0 30px 60px rgba(0, 217, 255, 0.2);
}

.work-img-wrapper {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.work-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: all 0.6s ease;
}

.work-card:hover .work-img-wrapper img {
  filter: grayscale(0%) brightness(1.2);
  transform: scale(1.1);
}

.work-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.3), rgba(255, 0, 110, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-card:hover .work-effect {
  opacity: 1;
}

.work-info {
  padding: 30px;
  position: relative;
}

.work-number {
  font-size: 48px;
  font-weight: 900;
  color: rgba(0, 217, 255, 0.2);
  line-height: 1;
}

.work-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 10px 0;
  letter-spacing: -1px;
}

.work-info p {
  color: #888;
  font-size: 14px;
  margin-bottom: 15px;
}

.work-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.work-tags span {
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.work-card:hover .work-tags span {
  background: rgba(0, 217, 255, 0.2);
  border-color: var(--accent);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  padding: 150px 20px;
  background: var(--dark);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-title {
  font-size: 60px;
  font-weight: 900;
  margin-bottom: 30px;
  letter-spacing: -2px;
  animation: fadeIn 0.8s ease;
}

.about-desc {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 40px;
  line-height: 1.8;
  animation: fadeIn 0.8s ease 0.1s both;
}

.skills-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.skill-item {
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid rgba(0, 217, 255, 0.2);
  padding: 25px;
  border-radius: 10px;
  transition: all 0.4s ease;
  animation: fadeIn 0.8s ease backwards;
}

.skill-item:nth-child(1) { animation-delay: 0.2s; }
.skill-item:nth-child(2) { animation-delay: 0.3s; }
.skill-item:nth-child(3) { animation-delay: 0.4s; }
.skill-item:nth-child(4) { animation-delay: 0.5s; }

.skill-item:hover {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-10px);
}

.skill-item h4 {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.skill-item p {
  font-size: 13px;
  color: #888;
}

.about-visual {
  animation: fadeInRight 0.8s ease;
}

.about-image {
  width: 100%;
  border-radius: 12px;
  filter: grayscale(100%);
  transition: all 0.6s ease;
}

.about-visual:hover .about-image {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  padding: 150px 20px;
  background: linear-gradient(135deg, #000 0%, #1a1a2e 100%);
  text-align: center;
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
}

.contact-title {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeIn 0.8s ease;
}

.contact-desc {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 60px;
  animation: fadeIn 0.8s ease 0.1s both;
}

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

.contact-btn {
  position: relative;
  padding: 20px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 8px;
  transition: all 0.4s ease;
  overflow: hidden;
  animation: fadeIn 0.8s ease backwards;
}

.contact-btn:nth-child(1) { animation-delay: 0.2s; }
.contact-btn:nth-child(2) { animation-delay: 0.3s; }
.contact-btn:nth-child(3) { animation-delay: 0.4s; }
.contact-btn:nth-child(4) { animation-delay: 0.5s; }

.btn-effect {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  z-index: -1;
  transition: left 0.4s ease;
}

.contact-btn:hover .btn-effect {
  left: 0;
}

.contact-btn:hover {
  color: var(--dark);
  transform: translateY(-5px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 30px 20px;
  background: var(--gray);
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #666;
}

/* ============================================
   FLOATING WHATSAPP
   ============================================ */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  z-index: 50;
  text-decoration: none;
  transition: all 0.4s ease;
  animation: slideInUp 0.8s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.whatsapp-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 var(--accent);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 217, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 217, 255, 0);
  }
}

.floating-whatsapp:hover {
  transform: scale(1.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.95);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    gap: 0;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    height: 300px;
  }

  .about-container,
  .contact-content {
    grid-template-columns: 1fr;
  }

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

  .floating-whatsapp {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 32px;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

  .skills-showcase {
    grid-template-columns: 1fr;
  }
}