:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #6b6b70;
  --accent: #66c9df;
  --accent-deep: #003a72;
  --accent-hot: #ff8b5f;
  --accent-pink: #ef9abb;
  --accent-text: #0a0a0a;
  --accent-solid: #66c9df;
  --accent-gradient: linear-gradient(100deg, #00366e 0%, #0877a0 30%, #66c9df 54%, #ef9abb 76%, #ff8b5f 100%);
  --dark: #0a0a0a;
  --dark-2: #141414;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  background-size: 180px 180px;
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 999;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent-solid); color: var(--accent-text); }

svg [fill="#c9c2f0"], svg [fill="#8a83b8"] { fill: var(--accent-solid); }
svg [stroke="#c9c2f0"] { stroke: var(--accent-solid); }

:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .hero-text, .hero-kicker, .hero-title, .hero-lead, .hero-actions, .hero-figure,
  .hero-blob, .hero-marquee-track { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-mark::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--accent-gradient);
  border-radius: 50%;
  flex-shrink: 0;
}

.header-actions { display: flex; gap: 8px; }

.icon-btn {
  background: var(--dark);
  color: #ffffff;
  border: 2px solid transparent;
  border-radius: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font);
  font-size: 20px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.icon-btn:hover { background: var(--accent-gradient); color: var(--accent-text); }

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 18px;
}

.hamburger span {
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- Fullscreen menu ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--dark);
  color: #fff;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease), visibility 0.42s;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Stagger dos links */
.menu-links { text-align: center; }

.menu-links li {
  margin: 10px 0;
  overflow: hidden;
}

.menu-links a {
  display: inline-block;
  font-size: 42px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(22px);
  transition: color 0.25s ease, transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.menu-overlay.open .menu-links li:nth-child(1) a { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.menu-overlay.open .menu-links li:nth-child(2) a { opacity: 1; transform: translateY(0); transition-delay: 0.19s; }
.menu-overlay.open .menu-links li:nth-child(3) a { opacity: 1; transform: translateY(0); transition-delay: 0.26s; }
.menu-overlay.open .menu-links li:nth-child(4) a { opacity: 1; transform: translateY(0); transition-delay: 0.33s; }

.menu-links a:hover { color: var(--accent-solid); transform: translateX(8px) !important; }

/* Fade do social */
.menu-social {
  display: flex;
  gap: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease) 0.38s, transform 0.4s var(--ease) 0.38s;
}

.menu-overlay.open .menu-social {
  opacity: 1;
  transform: translateY(0);
}

.menu-social a { color: var(--muted); font-size: 14px; transition: color 0.2s ease; }
.menu-social a:hover { color: var(--accent-solid); }

/* Botão fechar */
.menu-close {
  position: absolute;
  top: 20px;
  right: 32px;
  opacity: 0;
  transition: opacity 0.3s var(--ease) 0.2s;
}

.menu-overlay.open .menu-close { opacity: 1; }

/* Hambúrguer → X */
.hamburger.is-open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Hero ---------- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes heroSpin { to { transform: rotate(360deg); } }

@keyframes heroMarquee { to { transform: translateX(-50%); } }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-inner {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px 48px 48px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-text { animation: heroFade 0.8s var(--ease) both; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 24px;
  animation: heroRise 0.8s var(--ease) both;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 4px rgba(102, 201, 223, 0.18);
}

.hero-title {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 15ch;
  animation: heroRise 0.9s var(--ease) 0.06s both;
}

.hero-lead {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 460px;
  animation: heroRise 0.9s var(--ease) 0.14s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  animation: heroRise 0.9s var(--ease) 0.22s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--dark);
  border: 1.5px solid var(--dark);
  color: #ffffff;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 9px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn svg { width: 16px; height: 16px; fill: currentColor; }

.btn:hover { background: transparent; color: var(--dark); }

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border-color: #e2e2e2;
}

.btn-ghost:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroFade 1.1s var(--ease) 0.15s both;
}

.hero-blob {
  position: absolute;
  width: 116%;
  height: 116%;
  fill: url(#heroGradient);
  z-index: 0;
  animation: heroSpin 40s linear infinite;
}

.hero-portrait {
  position: relative;
  z-index: 1;
  width: min(400px, 78%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #e9e9ec;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  filter: grayscale(100%) contrast(1.05);
}

.hero-marquee {
  position: relative;
  width: 100%;
  background: var(--accent-gradient);
  color: var(--dark);
  overflow: hidden;
  border-block: 2px solid var(--dark);
}

.hero-marquee-track {
  display: flex;
  width: max-content;
  animation: heroMarquee 26s linear infinite;
}

.hero-marquee-track span {
  padding: 15px 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Portfolio ---------- */
.portfolio { padding-bottom: 48px; }

.portfolio-intro {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 48px 44px;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.portfolio-count {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.portfolio-count::before {
  content: "";
  width: 56px;
  height: 1px;
  background: var(--text);
  opacity: 0.35;
}

.portfolio-grid {
  width: 100%;
  margin: 0;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portfolio-item {
  display: block;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--dark);
}

.portfolio-media {
  overflow: hidden;
  background: #eef0f3;
  aspect-ratio: 1 / 1;
}

.portfolio-media svg,
.portfolio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  display: block;
}

.portfolio-item:hover .portfolio-media svg,
.portfolio-item:hover .portfolio-media img { transform: scale(1.04); }

/* Skeleton loading */
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.portfolio-skeleton {
  border-radius: 10px;
  background: #111;
  overflow: hidden;
  animation: skeletonPulse 1.6s ease infinite;
}

.portfolio-skeleton-media {
  aspect-ratio: 1 / 1;
  background: #1c1c1c;
}

.portfolio-skeleton-footer {
  padding: 20px 24px 24px;
}

.skeleton-bar {
  height: 13px;
  background: #2a2a2a;
  border-radius: 4px;
}

.portfolio-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 96px 32px;
  color: var(--muted);
  font-size: 16px;
}

.portfolio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.76) 100%);
}

.portfolio-meta h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
}

.portfolio-meta p {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  margin-top: 5px;
}

.portfolio-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.portfolio-arrow svg { width: 20px; height: 20px; }

.portfolio-item:hover .portfolio-arrow {
  background: var(--accent-gradient);
  border-color: transparent;
  color: var(--dark);
  transform: translateX(3px);
}

/* ---------- About ---------- */
.about {
  background: #020202;
  color: #ffffff;
  padding: 150px 48px 170px;
  position: relative;
  overflow: hidden;
  min-height: 760px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.about::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -34%;
  height: 64%;
  background:
    radial-gradient(42% 78% at 10% 82%, rgba(0, 102, 255, 0.92), transparent 68%),
    radial-gradient(42% 82% at 33% 86%, rgba(102, 201, 223, 0.94), transparent 70%),
    radial-gradient(34% 72% at 68% 92%, rgba(255, 116, 38, 0.9), transparent 72%),
    radial-gradient(34% 76% at 94% 84%, rgba(239, 154, 187, 0.92), transparent 72%),
    var(--accent-gradient);
  filter: blur(28px) saturate(138%);
  opacity: 0.94;
  pointer-events: none;
}

.about::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #020202 0%, rgba(2,2,2,0.94) 40%, rgba(2,2,2,0.42) 100%),
    radial-gradient(58% 50% at 72% 34%, rgba(255,255,255,0.08), transparent 64%);
  pointer-events: none;
}

.about-grid {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.1fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-photo {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: min(440px, 100%);
  aspect-ratio: 4 / 5;
  background: #161616;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,0.42);
  transform: translateY(10px);
}

.about-content {
  grid-column: 2;
  max-width: 600px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.06);
}

.about-photo span {
  color: #555;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-eyebrow {
  color: rgba(255,255,255,0.44);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.about-content h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  max-width: 12ch;
}

.about-role {
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  max-width: 420px;
  margin-bottom: 32px;
}

.about-text {
  max-width: 690px;
}

.about-text p { color: rgba(255,255,255,0.68); font-size: 17px; line-height: 1.75; }
.about-text p + p { margin-top: 16px; }
.about-text .about-lead { color: #f8f8f8; font-size: 19px; line-height: 1.62; }

.about-social {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
}

.about-social a {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.42);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.about-social a i { font-style: normal; }
.about-social a:hover { color: var(--accent-solid); border-color: var(--accent-solid); }

.about-content .btn-outline {
  display: inline-block;
  margin-top: 40px;
  background: #fff;
  border: 2px solid #fff;
  color: var(--dark);
  border-radius: 999px;
  padding-inline: 30px;
}

.about-content .btn-outline:hover { background: transparent; color: #fff; }
/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #fff;
  padding: 96px 48px 32px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,139,95,0.12), transparent 70%);
  pointer-events: none;
}

.footer-top {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid #222;
  position: relative;
}

.footer-brand { max-width: 340px; }

.footer-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.footer-tagline { color: #999; font-size: 15px; line-height: 1.65; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col span {
  color: var(--accent-solid);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.footer-col a { color: #ccc; font-size: 14px; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 24px;
  color: #666;
  font-size: 13px;
  position: relative;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--dark);
  color: #ffffff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-gradient); color: var(--accent-text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 120px 28px 40px;
    text-align: center;
  }
  .hero-figure { order: -1; }
  .hero-actions { justify-content: center; }
  .portfolio-intro { padding: 72px 28px 32px; }
  .portfolio-grid { padding: 0 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .footer-top { flex-direction: column; gap: 40px; }
  .menu-links a { font-size: 30px; }
  .about { padding: 110px 28px 140px; min-height: auto; }
  .about-grid { grid-template-columns: 1fr; gap: 42px; }
  .about-photo { grid-column: 1; grid-row: 1; width: min(380px, 100%); aspect-ratio: 1 / 1; justify-self: start; }
  .about-content { grid-column: 1; grid-row: 2; }
  .about-content h2 { font-size: clamp(32px, 10vw, 56px); }
}

@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: 1fr; padding: 0 18px; }
}

@media (max-width: 560px) {
  .site-header { padding: 16px 20px; }
  .hero-portrait { width: min(300px, 72%); }
  .about { padding: 92px 20px 130px; }
  .about::before { bottom: -24%; height: 48%; filter: blur(22px) saturate(136%); }
  .about-content h2 { max-width: 7ch; }
}
