:root {
  --primary: #0a2f4d;
  --primary-light: #1a5080;
  --secondary: #2b7abb;
  --accent: #f39c12;
  --accent-light: #f5b041;
  --background: #f8f9fa;
  --surface: #ffffff;
  --text: #2c3e50;
  --text-light: #5a6c7d;
  --shadow: rgba(10, 47, 77, 0.15);
  --gradient-1: linear-gradient(135deg, #0a2f4d 0%, #2b7abb 100%);
  --gradient-2: linear-gradient(135deg, #2b7abb 0%, #3498db 100%);
  --gradient-3: linear-gradient(135deg, #f39c12 0%, #f5b041 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Header with glassmorphism */
header {
  background: rgba(10, 47, 77, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px var(--shadow);
  transition: all 0.3s ease;
}

header:hover {
  box-shadow: 0 6px 40px var(--shadow);
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  gap: 2rem;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #b9e3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.05);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 0.95rem;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover::before,
nav a.active::before {
  width: 80%;
}

nav a:hover,
nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Hero section with animated gradient */
.hero {
  background: var(--gradient-1);
  color: #fff;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(243, 156, 18, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%);
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 1.5rem 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 800px;
  margin: 0 auto 2.5rem;
  opacity: 0.95;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 5rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Enhanced cards with hover effects */
.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px var(--shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(10, 47, 77, 0.05);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px var(--shadow);
}

.card h2 {
  color: var(--primary);
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.card h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-3);
  border-radius: 2px;
}

.card p {
  line-height: 1.8;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* Button styles */
.button-group {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: var(--gradient-3);
  color: #fff;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(243, 156, 18, 0.4);
}

/* WhatsApp icon with pulse animation */
.whatsapp-link {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  text-decoration: none;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.whatsapp-icon {
  width: 56px;
  height: 56px;
  color: #25D366;
  filter: drop-shadow(0 4px 15px rgba(37, 211, 102, 0.3));
  transition: all 0.3s ease;
}

.whatsapp-icon:hover {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 6px 25px rgba(37, 211, 102, 0.5));
}

/* Page title */
.page-title {
  margin: 0 0 3rem 0;
  color: var(--primary);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-3);
  border-radius: 2px;
}

/* Service boxes */
.service-titles {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.service-box {
  background: var(--gradient-2);
  color: white;
  border-radius: 15px;
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px var(--shadow);
  transition: all 0.3s ease;
  cursor: default;
}

.service-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px var(--shadow);
}

/* Contact list */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.contact-list li {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: 0.8rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.contact-list li:hover {
  background: var(--background);
  transform: translateX(5px);
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: var(--secondary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-list li:hover .contact-icon {
  transform: scale(1.2) rotate(5deg);
}

.contact-list a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-list a:hover {
  color: var(--primary);
}

/* Forms */
form {
  display: grid;
  gap: 1.2rem;
}

label {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.3rem;
  display: block;
}

input,
textarea {
  width: 100%;
  border: 2px solid rgba(10, 47, 77, 0.1);
  border-radius: 12px;
  padding: 1rem;
  font: inherit;
  transition: all 0.3s ease;
  background: var(--background);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(43, 122, 187, 0.1);
  background: white;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* Map container */
.map-container {
  margin-top: 2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow);
  position: relative;
}

.map-link {
  display: block;
  position: relative;
  text-decoration: none;
}

.location-map {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  pointer-events: none;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 47, 77, 0.9) 0%, rgba(43, 122, 187, 0.9) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.map-link:hover .map-overlay {
  opacity: 1;
}

.map-icon {
  width: 48px;
  height: 48px;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--gradient-1);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-top: 4rem;
}

/* Biography specific styles */
.bio-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  grid-template-areas:
    "intro photo"
    "experience experience"
    "skills skills";
  align-items: stretch;
}

.bio-layout .card {
  max-width: none;
}

.bio-intro {
  grid-area: intro;
}

.bio-photo {
  grid-area: photo;
  min-height: 550px;
  padding: 0;
  overflow: hidden;
}

.bio-experience {
  grid-area: experience;
}

.bio-skills {
  grid-area: skills;
}

.profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.bio-photo:hover .profile-image {
  transform: scale(1.05);
}

.bio-intro h2,
.bio-intro h3,
.bio-intro h4,
.bio-experience h2,
.bio-experience h3,
.bio-experience h4,
.bio-skills h2,
.bio-skills h3,
.bio-skills h4 {
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.bio-intro h3,
.bio-experience h3,
.bio-skills h3 {
  font-size: 1.6rem;
  position: relative;
  padding-left: 1rem;
}

.bio-intro h3::before,
.bio-experience h3::before,
.bio-skills h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  background: var(--gradient-3);
  border-radius: 2px;
}

.bio-intro h4,
.bio-experience h4 {
  font-size: 1.3rem;
  color: var(--secondary);
}

.bio-intro p,
.bio-experience p,
.bio-skills p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.bio-skills ul {
  list-style: none;
  padding: 0;
}

.bio-skills ul li {
  color: var(--text-light);
  padding: 0.8rem 0 0.8rem 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.bio-skills ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

.bio-skills ul li:hover {
  color: var(--primary);
  transform: translateX(5px);
}

/* Signature */
.signature {
  font-family: 'Brush Script MT', 'Lucida Handwriting', 'Segoe Script', cursive;
  font-size: 2rem;
  color: var(--primary);
  text-align: right;
  margin-top: 2rem;
  font-style: italic;
  font-weight: 400;
  opacity: 0.8;
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.8; }
}

/* Contact layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-card {
  max-width: none;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: all 0.3s ease;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Responsive design */
@media (max-width: 900px) {
  .bio-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "photo"
      "experience"
      "skills";
  }

  .bio-photo {
    min-height: 400px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    position: relative;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 2;
  }

  .logo {
    order: 1;
  }

  nav {
    order: 3;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  nav.active {
    max-height: 500px;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
    gap: 0;
  }

  nav a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-radius: 0;
  }

  nav a::before {
    display: none;
  }

  nav a:hover,
  nav a.active {
    background: rgba(255, 255, 255, 0.15);
  }

  .hero {
    padding: 4rem 0;
  }

  .section {
    padding: 3rem 0;
  }

  .button-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .service-titles {
    flex-direction: column;
  }

  .service-box {
    text-align: center;
  }
}

/* Loading animation for modern feel */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Note styling */
.note {
  display: block;
  margin-top: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
