/* CSS Variables & Reset */
:root {
  --bg: #0a0a0a;
  --bg-light: #121212;
  --bg-lighter: #1a1a1a;
  --text: #ffffff;
  --text-secondary: #a0a0a0;
  /* Purple/Green accents */
  --accent-purple: #9b5cff;
  --accent-green: #00ff88;
  --font-main: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Add shader container styles */
#shader-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-color: #0a0a0a;
}

/* Overlay to darken the shader so text remains readable */
#shader-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.15); /* Reduced from 0.75 to 0.15 for max visibility */
  z-index: 1;
}

#shader-background canvas {
  position: relative;
  z-index: 0;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  scroll-margin-top: 80px;
}

h2 {
  font-size: clamp(32px, 5vw, 42px);
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  text-align: center;
}

.accent {
  color: var(--accent-purple);
}

.green-text {
  color: var(--accent-green);
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-green));
  z-index: 9999;
  box-shadow: 0 0 15px var(--accent-green), 0 0 5px var(--accent-purple);
  transition: width 0.1s ease-out;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
}

/* Navbar (Glassmorphism & Floating) */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  background: rgba(20, 20, 20, 0.65);
  border: 1px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border-radius: 50px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(155, 92, 255, 0.1);
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--glow-angle), transparent 50%, var(--accent-purple) 80%, var(--accent-green) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: glow-spin 4s linear infinite;
  pointer-events: none;
}

.nav-inner {
  display: flex;
  justify-content: center;
  padding: 16px 24px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
  font-size: 15px;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-green);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-inner {
    padding: 15px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }

  .nav-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 0 20px;
  }

  .nav-links a {
    white-space: nowrap;
  }
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 140px;
  padding-bottom: 40px;
}

.hero-inner {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  width: 100%;
}

@media (max-width: 800px) {
  .hero {
    padding-top: 120px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .hero-text {
    text-align: center !important;
  }

  .hero h1 {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }
}

.hero-photo {
  width: 100%;
  max-width: 650px;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  border: 4px solid transparent;
  background-image: 
    linear-gradient(var(--bg-dark), var(--bg-dark)),
    conic-gradient(from var(--glow-angle), transparent 50%, var(--accent-purple) 80%, var(--accent-green) 100%);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  animation: glow-spin 4s linear infinite;
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: -4px; 
  border-radius: 50%;
  background: conic-gradient(from var(--glow-angle), transparent 50%, var(--accent-purple) 80%, var(--accent-green) 100%);
  filter: blur(30px);
  z-index: -1;
  opacity: 0.6;
  animation: glow-spin 4s linear infinite;
  pointer-events: none;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero-text {
  text-align: left;
}

.hero h1 {
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 12px;
  line-height: 1.1;
}

/* Social Icons Dock */
.social-dock {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(155, 92, 255, 0.3);
}

.social-icon::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-purple);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.social-icon:hover::after {
  width: 14px;
}

.social-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.social-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
}

.social-icon:hover .social-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Waving animation */
.wave {
  animation: wave-animation 2.5s infinite;
  transform-origin: 70% 70%;
  display: inline-block;
}

@keyframes wave-animation {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* Typing Effect */
.typing-container {
  font-size: clamp(20px, 3vw, 24px);
  color: var(--text-secondary);
  height: 35px;
}

.typing-text {
  border-right: 2px solid var(--accent-green);
  padding-right: 4px;
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* About */
.about p {
  max-width: 700px;
  margin: 0 auto;
  font-size: clamp(18px, 2.5vw, 22px);
  text-align: center;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* What I Do (Grid) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-light);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(155, 92, 255, 0.3);
}

.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-card ul {
  list-style: none;
  margin-bottom: auto;
  color: var(--text-secondary);
}

.service-card ul li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 20px;
}

.service-card ul li::before {
  content: "•";
  color: var(--accent-green);
  position: absolute;
  left: 0;
}

.service-price {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: 500;
}

/* Skills */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 900px;
  margin: 50px auto 0;
}

.skill-badge {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  position: relative;
  margin-top: 50px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.skill-badge:hover {
  background: rgba(155, 92, 255, 0.3);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 25px rgba(155, 92, 255, 0.6);
}

.skill-badge:active {
  cursor: grabbing;
}

/* The Rope */
.skill-rope {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 2px;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
  pointer-events: none;
}

/* A tiny pin at the top of the rope */
.skill-rope::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--accent-purple);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--accent-purple);
}

/* Projects (Tabs) */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.tab-btn {
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: transparent;
}

.tab-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-light);
  z-index: -2;
  transition: all 0.3s;
  border-radius: inherit;
}

.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--accent-purple);
  z-index: -1;
  transition: all 0.5s ease-out;
  transform: translate(-100%, 100%) rotate(-40deg);
}

.tab-btn:hover {
  color: #fff;
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

.tab-btn:hover::after {
  transform: translate(0, 0) rotate(-40deg);
}

.tab-btn.active {
  color: #fff;
  border-color: transparent;
}

.tab-btn.active::before {
  background: var(--accent-purple);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-light);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, border-color 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(155, 92, 255, 0.3);
}

.project-thumb {
  height: 200px;
  background: var(--bg-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}

.badge {
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent-green);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  margin-left: auto;
}

.badge + .badge {
  margin-left: 0;
}

.badge-purple {
  background: rgba(155, 92, 255, 0.1);
  color: var(--accent-purple);
}

.badge-offline {
  background: rgba(255, 60, 60, 0.1);
  color: #ff4444;
}

.badge-maintenance {
  background: rgba(255, 200, 50, 0.1);
  color: #ffc832;
}

.badge-online {
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent-green);
}

.badge-public {
  background: rgba(80, 160, 255, 0.1);
  color: #50a0ff;
}

.badge-private {
  background: rgba(255, 160, 50, 0.1);
  color: #ffa032;
}

.btn-project {
  margin-top: auto;
  display: inline-block;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: transparent;
  transition: all 0.3s;
}

.btn-project::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  z-index: -2;
  transition: all 0.3s;
  border-radius: inherit;
}

.btn-project::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--accent-purple);
  z-index: -1;
  transition: all 0.5s ease-out;
  transform: translate(-100%, 100%) rotate(-40deg);
}

.btn-project:hover {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  color: #fff;
}

.btn-project:hover::after {
  transform: translate(0, 0) rotate(-40deg);
}

.btn-playstore {
  margin-top: auto;
  display: inline-block;
  color: var(--accent-green);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(0, 255, 136, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: rgba(0, 255, 136, 0.05);
  transition: all 0.3s;
}

.btn-playstore::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: -2;
  transition: all 0.3s;
  border-radius: inherit;
}

.btn-playstore::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--accent-green);
  z-index: -1;
  transition: all 0.5s ease-out;
  transform: translate(-100%, 100%) rotate(-40deg);
}

.btn-playstore:hover {
  transform: translateY(-2px);
  border-color: var(--accent-green);
  color: var(--bg); /* Dark text on green background */
}

.btn-playstore:hover::after {
  transform: translate(0, 0) rotate(-40deg);
}

/* Contact */
.contact-container {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-light);
  padding: 50px 30px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  padding: 18px 36px;
  border-radius: 12px;
  margin: 30px 0 16px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: transparent;
  transition: transform 0.2s, color 0.2s;
}

.btn-whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #25D366;
  z-index: -2;
  transition: all 0.3s;
  border-radius: inherit;
}

.btn-whatsapp::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: #0f8a5c; /* deep green for sweeping box */
  z-index: -1;
  transition: all 0.5s ease-out;
  transform: translate(-100%, 100%) rotate(-40deg);
}

.btn-whatsapp:hover {
  transform: scale(1.02);
  color: #fff;
}

.btn-whatsapp:hover::after {
  transform: translate(0, 0) rotate(-40deg);
}

.reply-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Contact Form */
.contact-form-wrapper {
  margin-top: 40px;
  text-align: left;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group.row {
  display: flex;
  gap: 20px;
}

.input-wrap {
  flex: 1;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px 20px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(155, 92, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.contact-form textarea {
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 5px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-purple);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 16px !important;
  font-size: 16px !important;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 10px;
}

.policy-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-top: 5px;
}

@media (max-width: 600px) {
  .form-group.row {
    flex-direction: column;
    gap: 20px;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 60px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

/* --- Glowing Shadow Border Animations --- */
@property --glow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes glow-spin {
  from { --glow-angle: 0deg; }
  to { --glow-angle: 360deg; }
}

.service-card, .project-card, .contact-container {
  position: relative;
  z-index: 1;
}

.service-card:hover, .project-card:hover, .contact-container:hover {
  transform: translateY(-5px);
  border-color: transparent !important;
  background-image: 
    linear-gradient(var(--bg-light), var(--bg-light)),
    conic-gradient(from var(--glow-angle), transparent 50%, var(--accent-purple) 80%, var(--accent-green) 100%);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  animation: glow-spin 4s linear infinite;
}