/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
  /* Colors */
  --bg-dark: #070a13;
  --bg-surface: #0f172a;
  --bg-surface-light: rgba(30, 41, 59, 0.7);
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);

  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  --whatsapp-green: #25d366;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Typography */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Layout & Spacing */
  --container-width: 1200px;
  --section-padding: 100px 0;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-padding {
  padding: var(--section-padding);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.line {
  height: 4px;
  width: 60px;
  background: var(--accent-gradient);
  margin: 0 auto;
  border-radius: var(--border-radius-full);
}

/* ==========================================================================
   Background Effects (Parallax / Orbs)
   ========================================================================== */
.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.bg-gradient {
  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.05),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(139, 92, 246, 0.05),
      transparent 40%
    );
  width: 100%;
  height: 100%;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
  transition: transform 0.1s ease-out;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-secondary);
  bottom: -200px;
  right: -100px;
  opacity: 0.2;
}

/* ==========================================================================
   UI Components
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  transition: var(--transition-normal);
}

.hover-glow:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.4);
}

.hover-zoom:hover {
  transform: scale(1.02);
  border-color: var(--accent-secondary);
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-full);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  outline: none;
}

.btn i {
  font-size: 1.25rem;
}

.btn-primary {
  background: var(--whatsapp-green);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-primary:hover {
  background: #1ebc59;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transform: translateY(-2px);
}

.glow-effect {
  position: relative;
  overflow: hidden;
}

.btn-primary.glow-effect::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary.glow-effect:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--border-radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  z-index: 100;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(7, 10, 19, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: var(--transition-normal);
  border-radius: 2px;
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.greeting {
  font-size: 1.25rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.name {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.typing-container {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-weight: 500;
  height: 30px;
  margin-bottom: 2rem;
}

#typing-text {
  color: var(--accent-secondary);
}

.cursor {
  display: inline-block;
  animation: blink 1s infinite;
  color: var(--accent-primary);
}

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

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  font-size: 1.25rem;
  color: var(--text-muted);
}

.social-links a:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.profile-circle {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 15px;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  position: relative;
}

.circle-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text {
  padding: 2.5rem;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.highlights i {
  color: var(--accent-primary);
  font-size: 1.25rem;
  margin-top: 2px;
}

.highlights strong {
  color: var(--text-main);
  font-weight: 600;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.info-card {
  padding: 1.5rem;
  text-align: center;
}

.card-icon {
  font-size: 2rem;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.info-card .sub-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
  display: block;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  gap: 0.75rem;
  cursor: default;
}

.skill-card i {
  font-size: 3rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s ease;
}

.skill-card:hover i {
  transform: scale(1.15);
}

.skill-card span {
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 14px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-content {
  padding: 1.5rem 2rem;
}

.timeline-content h3 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.timeline-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-cover-img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ==========================================================================
   Certificates Section
   ========================================================================== */
.certificate-container {
  display: flex;
  justify-content: center;
}

.certificate-card {
  max-width: 500px;
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
}

.cert-img-wrapper {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.certificate-card:hover .cert-cover-img {
  transform: scale(1.05);
}

/* Image Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal.show {
  display: block;
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 900px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  animation-name: zoomModal;
  animation-duration: 0.3s;
}

#modalCaption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  text-align: center;
  color: #ccc;
  padding: 15px 0;
  font-size: 1.1rem;
  animation-name: zoomModal;
  animation-duration: 0.3s;
}

@keyframes zoomModal {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent-primary);
  text-decoration: none;
  cursor: pointer;
}

.cert-info {
  padding: 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.8);
}

.cert-info h3 {
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.cert-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
}

.whatsapp-highlight {
  border-color: rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.05);
}

.whatsapp-highlight:hover {
  border-color: var(--whatsapp-green);
  box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.3);
}

.method-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-main);
  transition: var(--transition-normal);
}

.whatsapp-highlight .method-icon {
  background: rgba(37, 211, 102, 0.1);
  color: var(--whatsapp-green);
}

.contact-method:hover .method-icon {
  background: var(--accent-primary);
  color: white;
}

.whatsapp-highlight:hover .method-icon {
  background: var(--whatsapp-green);
  color: white;
}

.method-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.method-details span {
  color: var(--text-muted);
  font-size: 0.9rem;
  word-break: break-all;
}

.contact-form {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(7, 10, 19, 0.5);
  backdrop-filter: blur(10px);
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Reveal Effects
   ========================================================================== */
.hidden-reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.slide-up {
  transform: translateY(50px);
}

.slide-right {
  transform: translateX(-50px);
}

.slide-left {
  transform: translateX(50px);
}

.fade-in {
  transform: scale(0.95);
}

.revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

.delay-1 {
  transition-delay: 100ms;
}
.delay-2 {
  transition-delay: 200ms;
}
.delay-3 {
  transition-delay: 300ms;
}

/* ==========================================================================
   Media Queries (Responsive Design)
   ========================================================================== */
/* Large screens */
@media (max-width: 1200px) {
  :root {
    --section-padding: 80px 0;
  }
}

/* Laptops / Tablets Landscape */
@media (max-width: 992px) {
  .hero-container,
  .about-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content {
    order: 2;
    text-align: center;
  }

  .hero-image-wrapper {
    order: 1;
  }

  .intro {
    margin: 0 auto 1.5rem;
  }

  .hero-cta,
  .hero-social {
    justify-content: center;
  }

  .profile-circle {
    width: 300px;
    height: 300px;
  }

  .contact-info {
    text-align: center;
  }

  .contact-method {
    text-align: left;
  }

  .contact-social {
    justify-content: center;
  }
}

/* Tablets Portrait / Large Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(7, 10, 19, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition-slow);
  }

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

  .nav-link {
    font-size: 1.25rem;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    padding-left: 45px;
  }

  .timeline-dot {
    left: 9px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .profile-circle {
    width: 250px;
    height: 250px;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-text {
    padding: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-form {
    padding: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
