/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #f3f5f4;
  --ink-soft: #b7c0bd;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .05);
  --glass-strong: rgba(255, 255, 255, .09);

  --green: #15803d;
  --green-bright: #22c55e;
  --green-deep: #0d2818;
  --silver: #9aa5a1;
  --silver-light: #c7cfcb;

  --gradient-1: linear-gradient(135deg, var(--green-deep), var(--green) 55%, var(--silver));
  --gradient-2: linear-gradient(135deg, #0b0f0d, #3f4a46 55%, var(--silver));
  --gradient-3: linear-gradient(135deg, var(--silver), var(--green-bright) 60%, #14532d);

  --radius: 20px;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.45);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-heading: 'Space Grotesk', var(--font);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}
html::-webkit-scrollbar { display: none; } /* Chrome, Safari, new Edge */

body {
  font-family: var(--font);
  color: var(--ink);
  background: transparent;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn--primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(13, 40, 24, 0.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(13, 40, 24, 0.6); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--green-bright); color: var(--green-bright); transform: translateY(-2px); }
.btn--lg { padding: 1.1rem 2.4rem; font-size: 1.05rem; }

/* ---------- Intro splash ---------- */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0d0b;
  opacity: 1;
  transition: opacity .8s ease;
}
.intro-overlay.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.intro-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
}
/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.1rem 0;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.header.is-scrolled {
  background: rgba(10, 13, 11, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding: .8rem 0;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; }
.logo img {
  height: 42px;
  width: auto;
  border-radius: 8px;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-weight: 600;
  font-size: .95rem;
  color: rgba(255, 255, 255, .85);
  transition: color .2s ease;
  position: relative;
}
.nav__link:hover { color: var(--green-bright); }
.nav__link--cta {
  background: rgba(255, 255, 255, .15);
  color: #fff !important;
  padding: .6rem 1.3rem;
  border-radius: 999px;
}
.nav__link--cta:hover { background: var(--green); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

/* ---------- Site background (fixed, spans the whole page) ---------- */
.site-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  padding-top: 6rem;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 3rem;
  padding-block: 3rem;
}
.hero__lede {
  color: #a6afac;
  max-width: 46ch;
  margin-bottom: 2.2rem;
  font-size: 1.02rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
}
.hero__avatar-ring {
  width: min(320px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background: var(--gradient-1);
  box-shadow: 0 25px 60px -20px rgba(13, 40, 24, 0.6);
}
.hero__avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #0a0d0b;
}
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}
.hero__role {
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: #d7dbd9;
}

/* ---------- Sections ---------- */
.section { padding: 6.5rem 0; }
.section__eyebrow {
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--green-bright);
  margin-bottom: .6rem;
}
.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .8rem;
}
.section__subtitle {
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* ---------- About ---------- */
.about { display: grid; gap: 2.2rem; max-width: 900px; }
.about__bio { font-size: 1.1rem; color: var(--ink-soft); max-width: 70ch; }
.skills { display: flex; flex-wrap: wrap; gap: .7rem; }
.skill-tag {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink);
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  border: 1px solid var(--line);
}
.project-card:hover { transform: translateY(-6px); background: var(--glass-strong); box-shadow: 0 30px 55px -22px rgba(0,0,0,0.55); }

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.project-card__media img { width: 100%; height: 100%; object-fit: cover; }
.project-card__media--1 { background: var(--gradient-1); }
.project-card__media--2 { background: var(--gradient-2); }
.project-card__media--3 { background: var(--gradient-3); }

.project-card__placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  padding: 1rem;
  background: inherit;
}
.project-card__media--empty img { display: none; }
.project-card__media--empty .project-card__placeholder { display: flex; }

.project-card__body { padding: 1.6rem; }
.project-card__title { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.project-card__desc { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.1rem; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.project-card__tags span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--green-bright);
  background: rgba(34, 197, 94, .15);
  padding: .3rem .7rem;
  border-radius: 999px;
}

/* ---------- Contact ---------- */
.contact-card { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.footer__inner { color: var(--ink-soft); font-size: .9rem; text-align: center; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.is-open { display: flex; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 11, 0.7);
  backdrop-filter: blur(4px);
}
.modal__dialog {
  position: relative;
  background: #fff;
  color: #14201a;
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
}
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.3);
}
.modal__media { aspect-ratio: 16/9; background: var(--gradient-1); }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 2rem; }
.modal__body h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: .8rem; }
.modal__body p { color: #4c5754; margin-bottom: 1.2rem; }
.modal__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.modal__tags span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(21, 128, 61, .1);
  padding: .3rem .7rem;
  border-radius: 999px;
}
.modal__gallery {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.modal__gallery-item {
  width: 140px;
}
.modal__gallery-item img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(9, 12, 11, .12);
  box-shadow: 0 8px 18px -10px rgba(9, 12, 11, 0.3);
}
.modal__gallery-item figcaption {
  margin-top: .5rem;
  font-size: .78rem;
  font-weight: 600;
  color: #4c5754;
  text-align: center;
}
.modal__links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 60;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  opacity: .8;
  box-shadow: 0 8px 20px -10px rgba(9, 12, 11, 0.5);
  transition: opacity .2s ease, transform .2s ease;
}
.whatsapp-float svg { width: 24px; height: 24px; }
.whatsapp-float:hover { opacity: 1; transform: scale(1.08); }

.whatsapp-float__bubble {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(10, 13, 11, .92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  padding: .55rem .9rem;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.whatsapp-float__bubble::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(10, 13, 11, .92);
}
.whatsapp-float:hover .whatsapp-float__bubble,
.whatsapp-float:focus-visible .whatsapp-float__bubble {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ---------- Reveal animation: dissolve into / materialize out of the particle field ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(.94);
  filter: blur(12px);
  transition: opacity .8s ease, transform .8s ease, filter .8s ease;
  will-change: opacity, transform, filter;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.project-card.is-visible:hover { transform: translateY(-6px) scale(1); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__lede { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__avatar { order: -1; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(280px, 80vw);
    background: rgba(10, 13, 11, .97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -10px 0 40px -20px rgba(0,0,0,.6);
  }
  .nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .section { padding: 4.5rem 0; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
}
