/* Light (default) — negro + celeste/azul */
:root,
[data-theme="light"] {
  --bg: #f2f7fc;
  --bg-elevated: #ffffff;
  --ink: #0b1220;
  --muted: #5b6b7c;
  --card: #ffffff;
  --accent: #1a8cff;
  --accent-strong: #0b6fd9;
  --accent-soft: #e8f3ff;
  --sky: #38bdf8;
  --sky-deep: #0284c7;
  --navy: #0f172a;
  --line: #d5e4f2;
  --header-bg: rgba(242, 247, 252, 0.88);
  --hero-shade: linear-gradient(110deg, rgba(8, 15, 30, 0.88) 0%, rgba(15, 35, 70, 0.72) 48%, rgba(8, 20, 45, 0.42) 100%);
  --section-soft: linear-gradient(180deg, rgba(26, 140, 255, 0.07), transparent 42%), #eaf3fb;
  --cta-shade: linear-gradient(100deg, rgba(8, 12, 24, 0.94), rgba(15, 40, 90, 0.82) 55%, rgba(26, 140, 255, 0.55));
  --pill-bg: #e8f3ff;
  --pill-ink: #0b6fd9;
  --shadow: 0 20px 50px rgba(15, 40, 90, 0.12);
  --whatsapp: #128c7e;
  --whatsapp-dark: #0e6b60;
  --radius: 18px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
  --tone-a: linear-gradient(145deg, #0ea5e9, #38bdf8);
  --tone-b: linear-gradient(145deg, #1a8cff, #60a5fa);
  --tone-c: linear-gradient(145deg, #0f172a, #1e3a8a);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #070b14;
  --bg-elevated: #0f1628;
  --ink: #e8f1ff;
  --muted: #9db0c7;
  --card: #121a2e;
  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --sky: #7dd3fc;
  --sky-deep: #38bdf8;
  --navy: #020617;
  --line: #243149;
  --header-bg: rgba(7, 11, 20, 0.86);
  --hero-shade: linear-gradient(110deg, rgba(2, 6, 18, 0.92) 0%, rgba(8, 20, 45, 0.78) 48%, rgba(10, 25, 55, 0.5) 100%);
  --section-soft: linear-gradient(180deg, rgba(56, 189, 248, 0.08), transparent 42%), #0a1222;
  --cta-shade: linear-gradient(100deg, rgba(2, 6, 18, 0.95), rgba(10, 30, 70, 0.88) 55%, rgba(14, 90, 160, 0.55));
  --pill-bg: rgba(56, 189, 248, 0.14);
  --pill-ink: #7dd3fc;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --tone-a: linear-gradient(145deg, #0284c7, #38bdf8);
  --tone-b: linear-gradient(145deg, #1d4ed8, #60a5fa);
  --tone-c: linear-gradient(145deg, #020617, #1e40af);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 8%, rgba(56, 189, 248, 0.14), transparent 28%),
    radial-gradient(circle at 0% 45%, rgba(26, 140, 255, 0.1), transparent 34%),
    var(--bg);
  line-height: 1.6;
  transition: background 0.35s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 6px 16px rgba(26, 140, 255, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 500;
}

.nav a:not(.btn):not(.theme-toggle):hover { color: var(--accent); }

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #f5f9ff;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: center / cover no-repeat var(--hero-image);
  transform: scale(1.05);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-shade {
  background: var(--hero-shade);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4.5rem 0 5rem;
}

.eyebrow,
.section-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin: 0 0 0.85rem;
}

.section-kicker { color: var(--accent-strong); }
.section-kicker.light { color: rgba(186, 230, 253, 0.9); }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 13ch;
  margin: 0 0 1rem;
}

.lead {
  max-width: 38ch;
  font-size: 1.15rem;
  opacity: 0.94;
  margin: 0 0 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero-portrait { justify-self: end; position: relative; }

.portrait-frame {
  width: min(340px, 78vw);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 3px solid rgba(125, 211, 252, 0.45);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: rotate(2deg);
  animation: floatCard 5.5s ease-in-out infinite;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-chip {
  position: absolute;
  left: -1rem;
  bottom: 1.4rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  min-width: 180px;
}

.portrait-chip strong,
.portrait-chip span { display: block; }
.portrait-chip strong { font-family: var(--font-display); }
.portrait-chip span { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.92rem; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1.05rem; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 12px 28px rgba(18, 140, 126, 0.28); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(125, 211, 252, 0.35);
}
.btn-primary {
  background: var(--accent);
  color: #041018;
  box-shadow: 0 12px 28px rgba(26, 140, 255, 0.28);
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.section { padding: 5rem 0; }
.section-soft { background: var(--section-soft); }

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
}

.section-lead { color: var(--muted); max-width: 52ch; margin: 0; }
.section-head { margin-bottom: 2rem; }

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
}

.about-photo { position: relative; }

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.about-photo-accent {
  position: absolute;
  inset: auto -12px -12px auto;
  width: 42%;
  height: 42%;
  border-radius: 22px;
  background: linear-gradient(145deg, #38bdf8, #1a8cff 55%, #0f172a);
  z-index: -1;
}

.about-copy p { color: var(--muted); font-size: 1.05rem; }

.about-points {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 1.6rem;
  display: grid;
  gap: 0.55rem;
}

.about-points li {
  position: relative;
  padding-left: 1.4rem;
  font-weight: 600;
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.service-visual {
  height: 120px;
  border-radius: 14px;
  margin-bottom: 1rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  position: relative;
}

.service-visual::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 30%;
  height: 80%;
  background: rgba(255,255,255,0.16);
  border-radius: 50%;
}

.tone-mint { background: var(--tone-a); }
.tone-coral { background: var(--tone-b); }
.tone-sky { background: var(--tone-c); }

.service-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.service-card h3 a:hover {
  color: var(--accent-strong);
}

.service-card p { margin: 0 0 1rem; color: var(--muted); }

.service-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.detail-hero {
  padding: 3.5rem 0 2rem;
  background: var(--section-soft);
  border-bottom: 1px solid var(--line);
}

.detail-hero-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  max-width: 18ch;
}

.detail-lead {
  max-width: 48ch;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent-strong);
  font-weight: 600;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.5rem;
  align-items: start;
}

.detail-content h2 {
  font-family: var(--font-display);
  margin: 0 0 1rem;
}

.detail-cover {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.project-body h3 a:hover {
  color: var(--accent-strong);
}

.project-media {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.project-actions .btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}

.prose p {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 1.05rem;
  white-space: pre-line;
}

.detail-aside {
  position: sticky;
  top: 90px;
}

.detail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.75rem;
}

.detail-card h3 {
  font-family: var(--font-display);
  margin: 0;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 960px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }
}

.text-link {
  color: var(--accent-strong);
  font-weight: 700;
}

.text-link:hover { color: var(--sky-deep); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.project-media {
  min-height: 180px;
  position: relative;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-fallback {
  height: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 3rem;
}

.tone-a { background: var(--tone-a); }
.tone-b { background: var(--tone-b); }

.project-body { padding: 1.2rem; }
.project-body h3 {
  font-family: var(--font-display);
  margin: 0.45rem 0;
}
.project-body p { color: var(--muted); margin: 0 0 0.9rem; }

.pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.cta-band {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: center / cover no-repeat var(--cta-image);
}

.contact-section {
  padding: 5rem 0;
  background: var(--section-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.contact-copy .section-lead {
  margin-bottom: 1.25rem;
}

.contact-form-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: var(--bg-elevated);
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: 2px solid rgba(56, 189, 248, 0.35);
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.btn-block { width: 100%; }

.form-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.alert-success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

[data-theme="dark"] .alert-success {
  color: #6ee7b7;
}
[data-theme="dark"] .alert-error {
  color: #fca5a5;
}

.cta-shade {
  position: absolute;
  inset: 0;
  background: var(--cta-shade);
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.cta-copy h2 {
  color: #fff;
  max-width: 16ch;
}

.cta-copy p {
  max-width: 42ch;
  opacity: 0.92;
  margin: 0 0 1.4rem;
}

.cta-photo img {
  width: min(280px, 100%);
  margin-left: auto;
  border-radius: 24px;
  border: 3px solid rgba(125, 211, 252, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  transform: rotate(-2deg);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  color: var(--muted);
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.footer-brand p { margin: 0.1rem 0 0; font-size: 0.9rem; }
.footer-copy { margin: 0; }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.social-links svg {
  width: 18px;
  height: 18px;
}

.social-links-inline {
  margin: 0 0 1.25rem;
}

.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(18, 140, 126, 0.4);
  z-index: 50;
  animation: pulseWa 2.4s ease-in-out infinite;
}

.wa-float svg { width: 28px; height: 28px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

@keyframes floatCard {
  0%, 100% { transform: rotate(2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-10px); }
}

@keyframes pulseWa {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .cta-inner,
  .contact-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .cards,
  .project-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-portrait,
  .cta-photo img {
    justify-self: start;
    margin-left: 0;
  }

  .portrait-frame {
    width: min(280px, 70vw);
  }

  .nav a:not(.btn):not(.theme-toggle) { display: none; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
