/* =============== CSS VARIABLES =============== */
:root {
  --bg-color: #0f1923;
  --card-bg: #1a2b3c;
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  --primary-color: #4db6a2;
  --secondary-color: #e2e8f0;
  --button-radius: 999px;
  --box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

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

/* =============== BASE =============== */
body {
  margin: 0;
  padding: 40px 16px;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--secondary-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main,
.container {
  max-width: 800px;
  margin: 0 auto;
}

section {
  max-width: 600px;
  width: 100%;
  margin: 0 auto 32px;
  color: var(--secondary-color);
}

section h2 {
  margin-bottom: 0.5rem;
}

section p {
  color: #cbd5e1;
  opacity: 1;
  text-align: left;
}

/* =============== HEADINGS =============== */
h1, h2, h3 {
  text-align: center;
  margin: 0 0 16px;
}

h1 { font-size: clamp(2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 3rem); }
h3 { font-size: 24px; opacity: 0.9; }

/* =============== PARAGRAPHS =============== */
p {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 16px;
  text-align: center;
  color: var(--secondary-color);
}

/* =============== NAVBAR =============== */
#main-nav {
  background-color: #132030;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(77, 182, 162, 0.2);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  width: 100%;
}

.nav-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-photo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.nav-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#main-nav a {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

#main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* =============== HERO CARD =============== */
.card {
  background-color: var(--card-bg);
  padding: 2.5rem 3rem;
  border-radius: 1.5rem;
  box-shadow: var(--card-shadow);
  text-align: left;
  max-width: 480px;
  width: 100%;
  margin: 40px auto;
  border: none;
}

.floating-card {
  animation: floatCard 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatCard {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

/* =============== HERO + PHOTO ROW =============== */
.hero-with-photo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: nowrap;
}

.hero-with-photo .card {
  flex: 1;
  max-width: 420px;
  margin: 0;
}

/* =============== CARD CONTENT =============== */
.greeting {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  opacity: 0.85;
  color: #e2e8f0;
  text-align: left;
}

.name {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  text-align: left;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
  text-align: left;
}

/* =============== BUTTONS =============== */
.buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 130px;
  padding: 0.75rem 1.6rem;
  border-radius: var(--button-radius);
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #0b1120;
  border-color: var(--primary-color);
}

.btn-secondary {
  background-color: transparent;
  color: #e2e8f0;
  border-color: #e2e8f0;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* =============== LEARNING SECTION =============== */
.learning-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 1rem;
  padding: 2rem;
  border-left: 4px solid var(--primary-color);
  border: 1px solid rgba(77, 182, 162, 0.15);
  border-left: 4px solid var(--primary-color);
  max-width: 480px;
}

.learning-section h2 {
  color: #4db6a2;
  text-align: left;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.learning-section p {
  color: #cbd5e1;
  text-align: left;
  font-size: 1rem;
  opacity: 1;
  margin: 0;
}

/* =============== ABOUT PAGE =============== */
.about {
  max-width: 1100px;
  margin: 40px auto;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
  justify-content: center;
}

.about-text {
  flex: 1 1 300px;
  min-width: 260px;
}

.about-text h2 {
  color: #4db6a2;
  text-align: left;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: #e2e8f0;
  text-align: left;
  font-size: 1rem;
  line-height: 1.7;
  opacity: 1;
}

.about-text strong {
  color: #4db6a2;
}

.about-images {
  flex: 1 1 250px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

.about-images img {
  display: block;
  max-width: 220px;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.about-images img:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

/* =============== CARLA PHOTO =============== */
.carla-photo {
  height: 150px !important;
  width: 150px !important;
  max-width: 150px !important;
  min-width: 150px !important;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50% !important;
  border: 3px solid #4db6a2;
  box-shadow: 0 0 20px rgba(77, 182, 162, 0.4);
  display: block !important;
  flex-shrink: 0;
}

/* =============== CONTACT PAGE =============== */
.contact-section {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 1.2rem;
  padding: 2rem 1.8rem;
  flex: 1 1 280px;
  min-width: 260px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(77, 182, 162, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.contact-card h3 {
  color: #4db6a2;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: #e2e8f0;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  text-align: center;
  opacity: 1;
}

.contact-link-pill {
  display: inline-block;
  background-color: #4db6a2;
  color: #0b1120;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
  word-break: break-all;
}

.contact-link-pill:hover {
  background-color: #3a9e8c;
  color: #fff;
  transform: translateY(-2px);
}

/* =============== PROJECTS SECTION =============== */
.projects-section {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.projects-title {
  color: #4db6a2;
  text-align: center;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 20px rgba(77, 182, 162, 0.6), 0 0 40px rgba(77, 182, 162, 0.3);
}

.projects-intro {
  color: #ffffff;
  text-align: center;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 2.5rem;
  opacity: 1;
  display: inline-block;
  background: rgba(77, 182, 162, 0.18);
  border: 1px solid rgba(77, 182, 162, 0.35);
  border-radius: 999px;
  padding: 0.5rem 1.6rem;
}

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

.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 1.2rem;
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(77, 182, 162, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-icon {
  font-size: 1.8rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(77, 182, 162, 0.2);
  color: #4db6a2;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 182, 162, 0.4);
}

.project-name {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  margin: 0;
}

.project-desc {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
  margin: 0;
  flex-grow: 1;
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.project-btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background-color: #4db6a2;
  color: #0b1120;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.project-btn:hover {
  background-color: #3a9e8c;
  color: #fff;
  transform: translateY(-2px);
}

.project-btn-outline {
  background-color: transparent;
  color: #4db6a2;
  border: 1px solid #4db6a2;
}

.project-btn-outline:hover {
  background-color: #4db6a2;
  color: #0b1120;
}

/* =============== FOOTER =============== */
footer {
  background-color: #0a1219 !important;
  border-top: 1px solid rgba(77, 182, 162, 0.2);
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer p,
footer a {
  color: #fff !important;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.footer-social-link {
  display: inline-block;
  color: #4db6a2 !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 182, 162, 0.4);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-social-link:hover {
  background-color: #4db6a2;
  color: #0b1120 !important;
}

.footer-link {
  color: #cbd5e1 !important;
}

.footer-link:hover {
  color: #4db6a2 !important;
}

.footer-copy {
  font-size: 0.8rem;
  color: #64748b !important;
  margin-top: 0.75rem;
  margin-bottom: 0 !important;
}

/* =============== RESPONSIVE =============== */
@media (max-width: 768px) {
  body {
    padding: 20px 12px;
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .hero-with-photo {
    flex-wrap: wrap;
    justify-content: center;
  }

  .about {
    flex-direction: column;
    align-items: center;
  }

  .about-images {
    align-items: center;
  }

  .about-images img {
    max-width: 200px;
  }

  .buttons {
    justify-content: center;
  }

  .carla-photo {
    height: 120px !important;
    width: 120px !important;
    max-width: 120px !important;
    min-width: 120px !important;
  }

  #main-nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .nav-links {
    justify-content: center;
  }
}
