/* Variables */
:root {
    /* Flat Design & Glassmorphism Palette */
    --primary-color: #3498db; /* Peter River Blue */
    --secondary-color: #2ecc71; /* Emerald Green */
    --accent-color: #e74c3c; /* Alizarin Red */
    --dark-bg: #1e272e; /* Darker Blue Gray */
    --light-bg: #87CEEB; /* Sky Blue */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #2c3e50;
    --text-light: #ecf0f1;
    --card-bg: rgba(255, 255, 255, 0.85); /* Whiter background for light mode */
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --primary-color: #2980b9;
    --secondary-color: #27ae60;
    --accent-color: #c0392b;
    --dark-bg: #121212; /* Deep Black/Gray */
    --light-bg: #2c3e50; /* Fallback */
    --glass-bg: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ecf0f1;
    --text-light: #bdc3c7;
    --card-bg: rgba(30, 30, 30, 0.6);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text-color);
  background-color: var(--light-bg);
  overflow-x: hidden;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}

/* Background Animation */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  /* Sky Blue Gradient for Light Mode */
  background: linear-gradient(-45deg, #87CEEB, #e0e9e7);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  opacity: 0.6;
}

[data-theme="dark"] .background-animation {
  background: linear-gradient(-45deg, #02355c, #1ec7f1);
  opacity: 0.8;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Glassmorphism Utility */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

/* Navigation */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  border-radius: 50px; /* Pill shape */
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.bento-btn,
.theme-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.2s;
}

.bento-btn:hover,
.theme-btn:hover {
  transform: scale(1.1);
}

/* Bento Menu */
.bento-overlay {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  width: 90%;
  max-width: 800px;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 999;
}

.bento-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.bento-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition:
    transform 0.3s,
    background 0.3s;
}

[data-theme="dark"] .bento-item {
  background: rgba(0, 0, 0, 0.4);
}

.bento-item:hover {
  transform: scale(1.05);
  background: var(--primary-color);
  color: white;
}

.bento-item i {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  text-align: center;
}

.hero-content {
  padding: 40px;
  max-width: 800px;
  width: 100%;
}

.profile-container {
  margin-bottom: 20px;
}

.profile-pic {
  width: 400px; /* Increased by 40% from 150px */
  height: 400px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 20px;
  opacity: 0.8;
}

/* Text Morph */
.text-morph {
  font-size: 1.2rem;
  height: 30px;
  margin-bottom: 30px;
  color: var(--accent-color);
  font-weight: 600;
}

/* Liquid Button */
.btn {
  position: relative;
  display: inline-block;
  padding: 12px 30px;
  margin: 10px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  border-radius: 30px;
  transition: color 0.4s;
  z-index: 1;
}

.liquid-btn {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.liquid-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: var(--primary-color);
  transform: translate(-50%, -50%) scale(0) rotate(45deg);
  transition: transform 0.6s cubic-bezier(0.75, 0, 0.125, 1);
  z-index: -1;
  border-radius: 40%;
}

.liquid-btn:hover {
  color: white !important; /* Force readable text color */
}

.liquid-btn:hover::before {
  transform: translate(-50%, -50%) scale(1) rotate(45deg);
}

.liquid-btn.secondary {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.liquid-btn.secondary::before {
  background: var(--secondary-color);
}

/* Sections */
.section {
  padding: 80px 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: "";
  display: block;
  width: 50%;
  height: 4px;
  background: var(--primary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Cards & Border Drawing */
.card {
  padding: 30px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.border-draw::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-radius: 16px;
  background: linear-gradient(
      90deg,
      var(--primary-color),
      var(--secondary-color)
    )
    border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.5;
}

/* Timeline */
.timeline {
  border-left: 2px solid var(--primary-color);
  margin-left: 20px;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  padding: 20px;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 25px;
  width: 16px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 50%;
}

.timeline-date {
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 5px;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  transition: all 0.3s;
}

.skill-card:hover {
  transform: scale(1.05) rotate(1deg);
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .skill-card:hover {
  background: rgba(0, 2, 3, 0.219);
}

.skill-card i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--accent-color);
}

/* Shimmer Effect */
.shimmer {
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(10, 170, 219, 0.4) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  transform: translateY(100%);
  transition: transform 0.3s;
  text-align: center;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

/* Contact Card */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 600px;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Languages */
.languages-card {
    padding: 20px;
    height: 100%;
}

.language-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.language-item:last-child {
    border-bottom: none;
}

.lang-name {
    font-weight: bold;
}

.lang-level {
    color: var(--secondary-color);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.contact-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 10px;
    background: var(--card-bg);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 2px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    font-weight: 600;
}

.contact-btn i {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.contact-btn:hover i {
    transform: scale(1.1);
}

/* Brand-specific colors */
.contact-btn.whatsapp {
    border-color: #25D366;
}

.contact-btn.whatsapp:hover {
    background: #25D366;
    color: white;
}

.contact-btn.email {
    border-color: #EA4335;
}

.contact-btn.email:hover {
    background: #EA4335;
    color: white;
}

.contact-btn.linkedin {
    border-color: #0A66C2;
}

.contact-btn.linkedin:hover {
    background: #0A66C2;
    color: white;
}

.contact-btn.phone {
    border-color: var(--accent-color);
}

.contact-btn.phone:hover {
    background: var(--accent-color);
    color: white;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  margin-top: 50px;
  border-radius: 16px 16px 0 0;
}

/* Splash Screen Preloader */
.splash-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 1s ease-out;
}

.splash-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

.jets-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.jet {
  position: absolute;
  width: 200px;
  height: 200px;
  bottom: -250px;
  opacity: 0;
  animation: flyUp 2.5s ease-out forwards;
  object-fit: contain;
}

/* Triangular formation - 5 jets */
.jet:nth-child(1) {
  left: 50%;
  margin-left: -100px;
  animation-delay: 0s;
}

.jet:nth-child(2) {
  left: 50%;
  margin-left: -400px;
  animation-delay: 0.3s;
}

.jet:nth-child(3) {
  left: 50%;
  margin-left: 200px;
  animation-delay: 0.3s;
}

.jet:nth-child(4) {
  left: 50%;
  margin-left: -700px;
  animation-delay: 0.6s;
}

.jet:nth-child(5) {
  left: 50%;
  margin-left: 500px;
  animation-delay: 0.6s;
}

@keyframes flyUp {
  0% {
    bottom: -250px;
    opacity: 0;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    bottom: 120%;
    opacity: 0;
    transform: scale(1);
  }
}

.loading-container {
  position: relative;
  width: 500px;
  max-width: 80%;
  opacity: 0;
  animation: fadeInLoading 0.5s ease-in 2.5s forwards;
}

@keyframes fadeInLoading {
  to {
    opacity: 1;
  }
}

.loading-text {
  text-align: center;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(100, 150, 255, 0.8);
}

.loading-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 50%, #4facfe 100%);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(79, 172, 254, 0.8);
  animation: loadProgress 3s ease-in-out 2.8s forwards;
  position: relative;
  overflow: hidden;
}

.loading-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmerBar 1.5s infinite;
}

@keyframes shimmerBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes loadProgress {
  to {
    width: 100%;
  }
}

.loading-percentage {
  text-align: center;
  color: #fff;
  font-size: 18px;
  margin-top: 15px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(100, 150, 255, 0.8);
}

/* Starfield background */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .bento-overlay {
    width: 95%;
  }
}
