:root {
  --bg: #f3efe7;
  --bg-spot-1: #f9dabb;
  --bg-spot-2: #bfdad4;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-border: rgba(255, 255, 255, 0.5);
  --text: #172126;
  --muted: #405260;
  --primary: #03624c;
  --primary-dark: #024638;
  --accent: #d44b2b;
  --line: #d9d3c9;
  --card-bg: #fff;
  --card-border: #ebe5dc;
  --chip-bg: #fff;
  --chip-border: #cde0d6;
  --topbar-bg: rgba(243, 239, 231, 0.75);
  --topbar-border: rgba(23, 33, 38, 0.08);
  --footer-text: #596d77;
  --shape-1: #d44b2b;
  --shape-2: #0f7a60;
  --shadow: 0 20px 50px rgba(13, 25, 33, 0.12);
}

[data-theme="dark"] {
  --bg: #0e171c;
  --bg-spot-1: #5e2c1f;
  --bg-spot-2: #0f4a3d;
  --surface: rgba(17, 30, 37, 0.82);
  --surface-border: rgba(137, 162, 172, 0.24);
  --text: #e6eff2;
  --muted: #a7bdc7;
  --primary: #37c8a0;
  --primary-dark: #7ae5c8;
  --accent: #ffa382;
  --line: #36505c;
  --card-bg: #15242c;
  --card-border: #2a3f4a;
  --chip-bg: #1c2f38;
  --chip-border: #355563;
  --topbar-bg: rgba(14, 23, 28, 0.78);
  --topbar-border: rgba(167, 189, 199, 0.2);
  --footer-text: #97aeb8;
  --shape-1: #9e4d35;
  --shape-2: #1a7460;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 15%, var(--bg-spot-1) 0, transparent 24%),
    radial-gradient(circle at 93% 20%, var(--bg-spot-2) 0, transparent 29%),
    var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.26;
}

.bg-shape-1 {
  width: 330px;
  height: 330px;
  background: var(--shape-1);
  top: -80px;
  left: -80px;
}

.bg-shape-2 {
  width: 440px;
  height: 440px;
  background: var(--shape-2);
  bottom: -160px;
  right: -120px;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 8vw;
  backdrop-filter: blur(8px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  z-index: 10;
}

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

nav a:hover::after {
  width: 100%;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

main {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 6rem 0 4rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 360px);
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

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

.hero-photo {
  width: min(100%, 340px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2rem;
  border: 6px solid var(--surface-border);
  box-shadow: 0 24px 48px rgba(13, 25, 33, 0.18);
}

.chip {
  display: inline-block;
  margin-bottom: 1rem;
  background: var(--chip-bg);
  color: var(--primary-dark);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 700;
}

h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.2;
  max-width: 900px;
  margin: 0;
}

h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 720px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  padding: 0.82rem 1.2rem;
  border-radius: 0.8rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 34, 42, 0.14);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--line);
}

.section {
  margin: 1.2rem 0 2rem;
  padding: 2rem;
  border-radius: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
}

h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  margin-top: 0;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.skills span {
  border: 1px solid var(--line);
  background: var(--card-bg);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--primary-dark);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--card-border);
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
}

.project-content h3 {
  margin: 0;
  font-size: 1.05rem;
}

.project-content p {
  margin: 0;
  color: var(--muted);
}

.project-content a {
  width: fit-content;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
}

.contact a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

footer {
  text-align: center;
  color: var(--footer-text);
  padding: 1.4rem 1rem 2rem;
}

.whatsapp-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  z-index: 25;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .topbar {
    padding: 0.85rem 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  nav {
    gap: 0.8rem;
  }

  .hero {
    padding: 4.5rem 0 3rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-photo-wrap {
    order: -1;
  }

  .hero-photo {
    width: min(78vw, 280px);
  }

  .section {
    padding: 1.25rem;
  }
}
