/*=============== FONTS: linked in index.html with preconnect ===============*/

/*=============== VARIABLES ===============*/
:root {
  --header-height: 4rem;

  --hue: 258;
  --first-color: hsl(var(--hue), 62%, 66%);
  --first-color-alt: hsl(var(--hue), 80%, 58%);
  --first-color-light: hsl(var(--hue), 70%, 78%);
  --first-color-deep: hsl(var(--hue), 70%, 30%);
  --title-color: hsl(240, 8%, 95%);
  --text-color: hsl(240, 8%, 72%);
  --text-color-light: hsl(240, 8%, 52%);
  --body-color: hsl(240, 60%, 3%);
  --container-color: hsl(240, 10%, 7%);
  --container-color-alt: hsl(240, 10%, 10%);
  --border-color: hsl(240, 10%, 16%);

  --body-font: "Montserrat", system-ui, sans-serif;
  --second-font: "Unbounded", "Montserrat", sans-serif;
  --biggest-font-size: 2.25rem;
  --bigger-font-size: 1.6rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.2rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  --radius: 1.25rem;
  --z-fixed: 100;
}

@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 3.5rem;
    --bigger-font-size: 2.4rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.15rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* { box-sizing: border-box; padding: 0; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); color-scheme: dark; }

body, button { font-family: var(--body-font); font-size: var(--normal-font-size); }
body {
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { border: none; background: none; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { color: var(--title-color); font-family: var(--second-font); font-weight: 600; line-height: 1.2; text-wrap: balance; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#main:focus { outline: none; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: .6rem 1rem; border-radius: .5rem;
  background: var(--first-color-alt); color: #fff; font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 1rem; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
b { color: var(--title-color); font-weight: 600; }
:focus-visible { outline: 2px solid var(--first-color); outline-offset: 3px; border-radius: .25rem; }
::selection { background: var(--first-color-alt); color: #fff; }

/*=============== REUSABLE ===============*/
.container { max-width: 1120px; margin-inline: 1rem; }
.grid { display: grid; gap: 1.5rem; }
.section { padding-block: 5rem 2rem; }
.section__title { text-align: center; font-size: var(--h1-font-size); margin-bottom: 3rem; }
.section__title span { color: var(--first-color); }
.main { overflow: hidden; }

.button {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--first-color-alt); color: #fff;
  padding: .9rem 1.5rem; border-radius: 3rem;
  font-weight: 600; font-size: var(--small-font-size);
  transition: background .3s, transform .3s, box-shadow .3s;
}
.button:hover { background: var(--first-color); transform: translateY(-2px); box-shadow: 0 10px 30px hsla(var(--hue), 80%, 58%, .35); }
.button--ghost { background: transparent; border: 1px solid var(--border-color); color: var(--title-color); }
.button--ghost:hover { background: var(--container-color-alt); border-color: var(--first-color); box-shadow: none; }

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-fixed);
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
.header.is-scrolled {
  background: hsla(240, 60%, 3%, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border-color);
}
.nav { height: var(--header-height); display: flex; justify-content: space-between; align-items: center; }
.nav__logo { font-family: var(--second-font); font-weight: 600; color: var(--title-color); }
.nav__toggle, .nav__close { font-size: 1.5rem; color: var(--title-color); display: inline-flex; }

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 320px; height: 100vh;
    background: hsla(240, 10%, 7%, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    padding: 6rem 2.5rem; transition: right .4s; border-left: 1px solid var(--border-color);
  }
  .nav__menu.show-menu { right: 0; }
}
.nav__list { display: flex; flex-direction: column; gap: 2.5rem; }
.nav__link { color: var(--title-color); font-weight: 600; position: relative; transition: color .3s; }
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -.35rem; width: 0; height: 2px;
  background: var(--first-color); transition: width .3s;
}
.nav__link:hover, .nav__link.active-link { color: var(--first-color); }
.nav__link.active-link::after { width: 100%; }
.nav__close { position: absolute; top: 1.15rem; right: 1.5rem; }

/*=============== HOME ===============*/
.home { padding-block: calc(var(--header-height) + 1.5rem) 2rem; position: relative; }
.home::before {
  content: ""; position: absolute; top: -10rem; left: -10rem; width: 22rem; height: 22rem;
  background: radial-gradient(circle, hsla(var(--hue), 80%, 58%, .35), transparent 65%);
  pointer-events: none;
}
.home__container {
  display: grid; justify-items: center; text-align: center; row-gap: 1.5rem; position: relative;
}
.home__greeting, .home__role-sub {
  color: var(--first-color); font-family: var(--second-font); font-size: var(--h3-font-size);
}
.home__name { font-size: var(--biggest-font-size); letter-spacing: -.01em; }
.home__visual { position: relative; display: grid; justify-items: center; width: 100%; }
.home__img {
  position: relative; z-index: 1; width: 260px;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  filter: drop-shadow(0 0 1px hsla(var(--hue), 80%, 80%, .5));
}
.home__blob {
  position: absolute; top: 12%; width: 230px; height: 300px;
  background: radial-gradient(ellipse at center, var(--first-color-alt) 0%, hsla(var(--hue), 80%, 50%, .45) 40%, transparent 72%);
  filter: blur(28px); border-radius: 50%;
  animation: blob 9s ease-in-out infinite alternate;
}
@keyframes blob {
  0%   { transform: scale(1) translateY(0); opacity: .9; }
  50%  { transform: scale(1.12) translateY(-8px); opacity: 1; }
  100% { transform: scale(.95) translateY(6px); opacity: .8; }
}
.home__role-title { font-size: var(--bigger-font-size); display: grid; }
.home__role-title span { white-space: nowrap; }
.home__role-accent {
  background: linear-gradient(90deg, var(--first-color-light), var(--first-color-alt));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home__social { display: flex; gap: 1.25rem; }
.home__social a { font-size: 1.35rem; color: var(--title-color); transition: color .3s, transform .3s; display: inline-flex; }
.home__social a:hover { color: var(--first-color); transform: translateY(-3px); }
.home__cta {
  display: inline-flex; align-items: center; gap: .4rem; color: var(--text-color-light);
  font-size: var(--small-font-size); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: color .3s;
}
.home__cta i { animation: bounce 2s infinite; }
.home__cta:hover { color: var(--first-color); }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/*=============== ABOUT ===============*/
.about__container { row-gap: 3rem; }
.about__perfil { display: grid; justify-items: center; }
.about__frame {
  position: relative; width: 240px; border-radius: 10rem 10rem var(--radius) var(--radius);
  overflow: hidden; border: 1px solid var(--border-color);
  box-shadow: 0 0 0 8px var(--container-color), 0 0 60px hsla(var(--hue), 80%, 58%, .3);
}
.about__frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, hsla(var(--hue), 70%, 20%, .45), transparent 45%);
}
.about__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__heading { font-size: var(--h2-font-size); margin-bottom: 1rem; }
.about__description { margin-bottom: 1rem; }
.about__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 2rem 0 1.5rem; }
.about__stats li {
  background: var(--container-color); border: 1px solid var(--border-color); border-radius: 1rem;
  padding: 1rem .75rem; display: grid; text-align: center; gap: .15rem;
}
.about__stats strong { font-family: var(--second-font); color: var(--first-color); font-size: var(--h2-font-size); }
.about__stats span { font-size: var(--smaller-font-size); color: var(--text-color-light); }
.about__tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.about__tools li {
  font-size: var(--smaller-font-size); font-weight: 500; color: var(--title-color);
  padding: .35rem .8rem; border-radius: 2rem; border: 1px solid var(--border-color);
  background: var(--container-color);
}
.about__buttons { display: flex; flex-wrap: wrap; gap: 1rem; }

/*=============== PROJECTS ===============*/
.projects__filters { display: flex; justify-content: center; gap: .5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.projects__filter {
  padding: .5rem 1.25rem; border-radius: 2rem; border: 1px solid var(--border-color);
  color: var(--text-color); font-weight: 600; font-size: var(--small-font-size); transition: color .3s, background-color .3s, border-color .3s;
}
.projects__filter:hover { color: var(--title-color); border-color: var(--first-color); }
.projects__filter.is-active { background: var(--first-color-alt); border-color: var(--first-color-alt); color: #fff; }

.projects__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 1rem; scrollbar-width: none;
}
.projects__track::-webkit-scrollbar { display: none; }
.projects__card {
  scroll-snap-align: start; background: var(--container-color); border: 1px solid var(--border-color);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.projects__card:hover { border-color: hsla(var(--hue), 62%, 66%, .5); transform: translateY(-4px); }
.projects__card[hidden] { display: none; }
.projects__cover {
  position: relative; aspect-ratio: 16 / 10; background: #fff; overflow: hidden;
  display: grid; place-items: center;
}
.projects__cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s; }
.projects__card:hover .projects__cover img { transform: scale(1.04); }
.projects__cover--art {
  background:
    radial-gradient(circle at 75% 20%, hsla(var(--hue), 80%, 58%, .55), transparent 55%),
    radial-gradient(circle at 15% 90%, hsla(200, 80%, 50%, .25), transparent 50%),
    var(--container-color-alt);
  color: var(--first-color-light);
}
.projects__art { width: 80%; }
.projects__glyph { display: grid; justify-items: center; gap: .5rem; }
.projects__glyph i { font-size: 3rem; color: var(--title-color); }
.projects__glyph span { font-family: var(--second-font); font-size: var(--small-font-size); color: var(--first-color-light); }
.projects__badge {
  position: absolute; top: .9rem; left: .9rem; padding: .25rem .7rem; border-radius: 2rem;
  font-size: var(--smaller-font-size); font-weight: 600; color: #fff; background: var(--first-color-alt);
}
.projects__badge--muted { background: hsla(240, 10%, 10%, .85); color: var(--first-color-light); }
.projects__data { padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.projects__subtitle { font-size: var(--smaller-font-size); color: var(--first-color); font-weight: 600; letter-spacing: .03em; }
.projects__title { font-size: var(--h3-font-size); }
.projects__description { font-size: var(--small-font-size); flex: 1; }
.projects__link {
  display: inline-flex; align-items: center; gap: .3rem; color: var(--title-color);
  font-weight: 600; font-size: var(--small-font-size); margin-top: .5rem; width: fit-content;
  transition: color .3s, gap .3s;
}
.projects__link:hover { color: var(--first-color); gap: .55rem; }
.projects__nav { display: flex; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.projects__arrow {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--border-color);
  display: grid; place-items: center; font-size: 1.4rem; color: var(--title-color); transition: background-color .3s, border-color .3s;
}
.projects__arrow:hover { background: var(--first-color-alt); border-color: var(--first-color-alt); }

/*=============== WORK ===============*/
.work__container { max-width: 760px; }
.work__tabs {
  display: flex; justify-content: center; gap: .5rem; margin: 0 auto 2.5rem;
  background: var(--container-color); border: 1px solid var(--border-color);
  border-radius: 3rem; padding: .35rem; width: fit-content;
}
.work__button {
  padding: .65rem 1.4rem; border-radius: 3rem; font-weight: 600; color: var(--text-color);
  font-size: var(--small-font-size); transition: color .3s, background-color .3s;
}
.work__button.is-active { background: var(--first-color-alt); color: #fff; }
.work__area { display: none; position: relative; padding-left: 1.75rem; }
.work__area.is-active { display: grid; gap: 1.25rem; animation: fadeUp .5s ease; }
.work__area::before {
  content: ""; position: absolute; left: .4rem; top: .5rem; bottom: .5rem; width: 1px;
  background: linear-gradient(to bottom, var(--first-color), var(--border-color));
}
.work__card {
  position: relative; background: var(--container-color); border: 1px solid var(--border-color);
  border-radius: 1rem; padding: 1.25rem 1.5rem;
}
.work__dot {
  position: absolute; left: -1.75rem; top: 1.5rem; width: .85rem; height: .85rem; border-radius: 50%;
  background: var(--body-color); border: 2px solid var(--first-color);
  box-shadow: 0 0 12px hsla(var(--hue), 80%, 58%, .6);
}
.work__title { font-size: var(--h3-font-size); margin-bottom: .25rem; }
.work__place { display: block; color: var(--first-color); font-size: var(--small-font-size); font-weight: 600; }
.work__text { font-size: var(--small-font-size); margin-top: .5rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/*=============== SERVICES (ACCORDION) ===============*/
.services__container { max-width: 860px; gap: 1rem; }
.services__card {
  background: var(--container-color); border: 1px solid var(--border-color);
  border-radius: 1rem; overflow: hidden; transition: border-color .3s;
}
.services__card.is-open { border-color: hsla(var(--hue), 62%, 66%, .5); }
.services__header {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 1rem; padding: 1.25rem 1.5rem; text-align: left;
}
.services__num { font-family: var(--second-font); color: var(--first-color); font-size: var(--small-font-size); }
.services__title { font-size: var(--h3-font-size); }
.services__icon { font-size: 1.4rem; color: var(--title-color); transition: transform .4s; }
.services__card.is-open .services__icon { transform: rotate(45deg); color: var(--first-color); }
.services__info { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.services__info > p { overflow: hidden; padding-inline: 1.5rem; font-size: var(--small-font-size); }
.services__card.is-open .services__info { grid-template-rows: 1fr; }
.services__card.is-open .services__info > p { padding-bottom: 1.4rem; }

/*=============== MARQUEE (testimonials slot) ===============*/
.marquee {
  overflow: hidden; border-block: 1px solid var(--border-color); padding-block: 1.6rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 2.5rem; width: max-content;
  animation: scroll 32s linear infinite;
}
.marquee__track span { font-family: var(--second-font); font-size: var(--h2-font-size); color: var(--title-color); white-space: nowrap; }
.marquee__track i { color: var(--first-color); font-size: 1.25rem; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }

/*=============== PUBLICATIONS ===============*/
.pubs__container { max-width: 860px; margin-top: 2.5rem; display: grid; justify-items: center; gap: 2rem; }
.pubs__list { display: grid; gap: .75rem; width: 100%; }
.pubs__item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: start;
  padding: 1.25rem 1.5rem; background: var(--container-color); border: 1px solid var(--border-color);
  border-radius: 1rem; transition: border-color .3s, transform .3s, background .3s;
}
.pubs__item:hover { border-color: hsla(var(--hue), 62%, 66%, .5); background: var(--container-color-alt); transform: translateX(4px); }
.pubs__year { min-width: 3.4rem; font-family: var(--second-font); color: var(--first-color); font-size: var(--small-font-size); padding-top: .15rem; }
.pubs__body { display: grid; gap: .3rem; }
.pubs__title { color: var(--title-color); font-weight: 600; font-size: var(--small-font-size); line-height: 1.45; }
.pubs__meta { font-size: var(--smaller-font-size); color: var(--text-color-light); font-style: italic; }
.pubs__icon { color: var(--text-color-light); font-size: 1.15rem; transition: color .3s; }
.pubs__item:hover .pubs__icon { color: var(--first-color); }

/*=============== CONTACT ===============*/
.contact__container { text-align: center; }
.contact__lead { max-width: 560px; margin: 0 auto 2.5rem; }
.contact__grid { display: grid; gap: 1rem; }
.contact__card {
  display: grid; justify-items: center; gap: .3rem; padding: 2rem 1rem;
  background: var(--container-color); border: 1px solid var(--border-color); border-radius: var(--radius);
  transition: border-color .3s, transform .3s, background .3s;
}
.contact__card i { font-size: 2rem; color: var(--first-color); margin-bottom: .5rem; }
.contact__label { font-family: var(--second-font); color: var(--title-color); font-weight: 600; }
.contact__value { font-size: var(--small-font-size); color: var(--text-color-light); }
.contact__card:hover { border-color: var(--first-color); transform: translateY(-4px); background: var(--container-color-alt); }

/*=============== FOOTER ===============*/
.footer { border-top: 1px solid var(--border-color); margin-top: 4rem; padding-block: 2rem; }
.footer__container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: var(--small-font-size); color: var(--text-color-light); }
.footer__place { display: inline-flex; align-items: center; gap: .35rem; }

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar { width: .6rem; background: var(--body-color); }
::-webkit-scrollbar-thumb { background: var(--container-color-alt); border-radius: 1rem; }
::-webkit-scrollbar-thumb:hover { background: var(--first-color-deep); }

/*=============== REVEAL ===============*/
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/*=============== BREAKPOINTS ===============*/
@media screen and (max-width: 340px) {
  .about__stats { grid-template-columns: 1fr; }
}

@media screen and (min-width: 576px) {
  .projects__track { grid-auto-columns: 60%; }
  .contact__grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (min-width: 768px) {
  .container { margin-inline: 1.5rem; }
  .nav__toggle, .nav__close { display: none; }
  .nav__list { flex-direction: row; column-gap: 3rem; }
  .projects__track { grid-auto-columns: calc((100% - 1.25rem) / 2); }
  .about__container { grid-template-columns: 300px 1fr; align-items: center; column-gap: 4rem; }
  .about__frame { width: 100%; }
}

@media screen and (min-width: 1150px) {
  .container { margin-inline: auto; }
  .section { padding-block: 7rem 2rem; }
  .section__title { margin-bottom: 4rem; }

  .home { min-height: 100vh; display: grid; align-items: center; padding-bottom: 0; }
  .home__container {
    grid-template-columns: 1fr 440px 1fr; align-items: center; text-align: initial;
    justify-items: initial; column-gap: 1rem;
  }
  .home__intro { grid-column: 1; grid-row: 1; align-self: center; }
  .home__visual { grid-column: 2; grid-row: 1 / span 2; }
  .home__role { grid-column: 3; grid-row: 1; align-self: center; }
  .home__img { width: 420px; }
  .home__role-title { font-size: 2.05rem; }
  .home__blob { width: 340px; height: 440px; top: 14%; }
  .home__social { grid-column: 1; grid-row: 2; flex-direction: column; align-self: end; margin-bottom: 4rem; }
  .home__cta { grid-column: 3; grid-row: 2; justify-self: end; align-self: end; margin-bottom: 4rem; }

  .about__container { grid-template-columns: 380px 1fr; column-gap: 6rem; }
  .projects__track { grid-auto-columns: calc((100% - 2.5rem) / 3); }
}

@media screen and (min-width: 2048px) {
  body { zoom: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
