/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f5f1;
  --bg-alt: #ffffff;
  --ink: #1a2733;
  --ink-soft: #4a5b6b;
  --muted: #8a98a5;
  --accent: #b89968;      /* champagne gold */
  --accent-soft: #d9c5a3;
  --teal: #4a7a78;
  --teal-soft: #c8d9d6;
  --rose: #d4a5a5;
  --line: rgba(26, 39, 51, 0.08);
  --shadow-sm: 0 4px 12px rgba(26, 39, 51, 0.06);
  --shadow: 0 12px 40px rgba(26, 39, 51, 0.10);
  --shadow-lg: 0 30px 80px rgba(26, 39, 51, 0.18);
  --radius: 18px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

.container { width: min(1200px, 92%); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); color: var(--ink); }
h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
h3 { font-size: 1.25rem; }

em { font-style: italic; }

/* ============ PROGRESS BAR ============ */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  z-index: 1000;
  transition: width .1s linear;
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 4%;
  display: flex; align-items: center; justify-content: space-between;
  transition: all .35s var(--ease);
  background: transparent;
}
.nav.scrolled {
  background: rgba(248, 245, 241, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: .85rem 4%;
}
.nav-logo {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--ink);
}
.nav-logo svg { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  font-size: .9rem; font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: .3rem 0;
  transition: color .25s;
}
.nav-links a:not(.cta-mini)::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.cta-mini {
  padding: .55rem 1.1rem !important;
  background: var(--ink); color: var(--bg-alt) !important;
  border-radius: 999px;
  transition: transform .25s var(--ease), background .25s;
}
.cta-mini:hover { transform: translateY(-2px); background: var(--accent); }

.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--ink); border-radius: 2px;
  transition: all .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(320px, 80%);
    background: var(--bg-alt);
    flex-direction: column; align-items: flex-start;
    justify-content: center;
    padding: 2rem 2rem;
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  position: relative;
  z-index: 5;
  display: flex; align-items: center;
  padding: 7rem 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 20% 30%, rgba(245,236,226,.55) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 70%, rgba(231,236,234,.45) 0%, transparent 55%);
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55;
  animation: float-orb 18s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent-soft); top: -10%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: var(--teal-soft); bottom: -10%; right: -5%; animation-delay: -6s; }
.orb-3 { width: 300px; height: 300px; background: var(--rose); top: 50%; left: 40%; animation-delay: -12s; opacity: .25; }

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
}

/* Hero 3D canvas — floats above hero content (clicks pass through) */
.three-hero {
  position: absolute; inset: 0;
  z-index: 8;
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 2;
  width: min(1300px, 92%); margin-inline: auto;
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 4rem; align-items: center;
  perspective: 1200px;
}

.eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent);
  padding: .4rem .9rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(-12px);
  animation: hero-in .9s .15s var(--ease) forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 1.02; font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-title .word {
  display: inline-block; opacity: 0;
  transform: translateY(48px) rotateX(-50deg);
  transform-origin: 50% 100%;
  animation: word-in 1.0s var(--ease) forwards;
  margin-right: .3em;
}
.hero-title .word:nth-child(1) { animation-delay: .35s; }
.hero-title .word:nth-child(2) { animation-delay: .48s; }
.hero-title .word:nth-child(3) { animation-delay: .64s; }
.hero-title .word:nth-child(4) { animation-delay: .80s; }
.hero-title .accent { color: var(--accent); font-style: italic; font-weight: 500; }

@keyframes word-in {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

.hero-subtitle {
  font-size: 1.1rem; color: var(--ink-soft); max-width: 540px;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 1s 1.05s var(--ease) forwards;
}
.hero-subtitle em { color: var(--accent); font-weight: 500; }

@keyframes fade-in { to { opacity: 1; } }

.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 1s 1.25s var(--ease) forwards;
}
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.75rem;
  border-radius: 999px;
  font-weight: 500; font-size: .95rem;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--ink); color: var(--bg-alt);
  box-shadow: var(--shadow);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  opacity: 0; transition: opacity .3s;
}
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary svg { transition: transform .3s; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg-alt); transform: translateY(-3px); }

.hero-meta {
  display: flex; align-items: center; gap: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 1s 1.45s var(--ease) forwards;
}
.meta-item { display: flex; flex-direction: column; }
.meta-item strong { font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1; }
.meta-item span { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.meta-divider { width: 1px; height: 38px; background: var(--line); }

/* hero photo */
.hero-photo {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .25s var(--ease);
  opacity: 0;
  animation: photo-in 1.4s .6s var(--ease) forwards;
}
@keyframes photo-in {
  from { opacity: 0; transform: translateY(40px) scale(.94); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   filter: blur(0); }
}
.photo-stack { position: relative; aspect-ratio: 4/5; max-width: 460px; margin-inline: auto; }
.photo-frame {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  border-radius: 200px 200px 24px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateZ(40px);
  background: var(--bg-alt);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-ring {
  position: absolute; inset: -20px;
  border: 1px solid var(--accent-soft);
  border-radius: 220px 220px 32px 32px;
  z-index: 1;
  transform: translateZ(20px);
  animation: rotate-ring 14s linear infinite;
}
@keyframes rotate-ring {
  0%, 100% { transform: translateZ(20px) rotate(-1deg); }
  50% { transform: translateZ(20px) rotate(2deg); }
}
.photo-glow {
  position: absolute; inset: -40px;
  background: radial-gradient(circle at center, rgba(184, 153, 104, .3), transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
}

.floating-card {
  position: absolute;
  background: var(--bg-alt);
  border-radius: 14px;
  padding: .85rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .75rem;
  font-size: .85rem;
  z-index: 3;
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(16px) scale(.92);
  animation: card-pop .8s var(--ease) forwards, card-float 6s 1.8s ease-in-out infinite;
}
@keyframes card-pop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.floating-card strong { display: block; font-weight: 600; color: var(--ink); }
.floating-card small { font-size: .75rem; color: var(--muted); }
.floating-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse-dot 2s ease-in-out infinite; }
.floating-card svg { color: var(--accent); }
.card-1 { top: 15%; left: -10%; animation-delay: 1.6s, 1.8s; }
.card-2 { bottom: 12%; right: -8%; animation-delay: 1.85s, 2.5s; }

@keyframes card-float {
  0%, 100% { transform: translateZ(80px) translateY(0); }
  50% { transform: translateZ(80px) translateY(-15px); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 122, 120, .5); }
  50% { box-shadow: 0 0 0 8px rgba(74, 122, 120, 0); }
}

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 14px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-indicator span {
  width: 3px; height: 8px; background: var(--ink-soft); border-radius: 2px;
  animation: scroll-wheel 1.8s infinite;
}
@keyframes scroll-wheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-photo { order: -1; max-width: 340px; margin: 0 auto; }
  .floating-card { padding: .65rem .85rem; font-size: .78rem; }
  .card-1 { left: -5%; } .card-2 { right: -5%; }
}

/* ============ SECTIONS ============ */
.section { padding: 7rem 0; position: relative; z-index: 5; }
.section-head { margin-bottom: 4rem; max-width: 720px; }
.section-tag {
  display: inline-block;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* SOBRE */
.sobre { background: transparent; }
.sobre-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}
.sobre-lead { font-size: 1.35rem; font-family: var(--serif); color: var(--ink); line-height: 1.4; }
.sobre-lead strong { color: var(--accent); font-weight: 500; font-style: italic; }
.sobre-body { color: var(--ink-soft); font-size: 1rem; }
.sobre-pillars {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 2.5rem;
  perspective: 1200px;
}
.pillar {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s;
  transform-style: preserve-3d;
}
.pillar:hover { box-shadow: var(--shadow); }
.pillar-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--teal-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  margin-bottom: 1.25rem;
  transform: translateZ(20px);
}
.pillar-icon svg { width: 26px; height: 26px; }
.pillar h3 { margin-bottom: .5rem; transform: translateZ(15px); }
.pillar p { color: var(--ink-soft); font-size: .92rem; transform: translateZ(10px); }

@media (max-width: 820px) {
  .sobre-grid { grid-template-columns: 1fr; gap: 2rem; }
  .sobre-pillars { grid-template-columns: 1fr; }
}

/* FORMAÇÃO — timeline */
.formacao { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 25%, rgba(255,255,255,.55) 75%, rgba(255,255,255,0) 100%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--teal-soft), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline-dot {
  position: absolute; left: -2.5rem; top: 1.5rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 153, 104, .15);
}
.timeline-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s;
  transform-style: preserve-3d;
}
.timeline-card:hover { box-shadow: var(--shadow); }
.timeline-card .year {
  font-size: .8rem; font-weight: 600; letter-spacing: .15em;
  color: var(--accent); text-transform: uppercase;
}
.timeline-card h3 { margin: .5rem 0 .25rem; }
.timeline-card .inst { color: var(--ink-soft); font-size: .92rem; font-weight: 500; }
.timeline-card .desc { color: var(--muted); font-size: .88rem; margin-top: .5rem; }

/* EXPERIÊNCIA */
.experiencia { background: transparent; }
.exp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.exp-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
  transform-style: preserve-3d;
  position: relative; overflow: hidden;
}
.exp-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.exp-card:hover { border-color: var(--accent-soft); box-shadow: var(--shadow); }
.exp-card:hover::before { transform: scaleX(1); }
.exp-year {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.exp-card h3 { margin: .75rem 0 .5rem; transform: translateZ(15px); }
.exp-card p { color: var(--ink-soft); font-size: .9rem; }

.skills { margin-top: 5rem; text-align: center; }
.skills-title {
  font-family: var(--serif); font-size: 1.5rem;
  margin-bottom: 1.5rem; color: var(--ink);
}
.skills-grid {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
}
.skill {
  padding: .65rem 1.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem; font-weight: 500;
  color: var(--ink-soft);
  transition: all .3s var(--ease);
  cursor: default;
}
.skill:hover {
  background: var(--ink); color: var(--bg-alt);
  transform: translateY(-3px); border-color: var(--ink);
  box-shadow: var(--shadow);
}

/* PORTFÓLIO */
.portfolio { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 25%, rgba(255,255,255,.55) 75%, rgba(255,255,255,0) 100%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.portfolio-filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 3rem;
}
.filter {
  padding: .55rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .85rem; font-weight: 500;
  color: var(--ink-soft);
  transition: all .3s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink-soft); }
.filter.active {
  background: var(--ink); color: var(--bg-alt); border-color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  perspective: 1400px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/5;
  transition: opacity .4s, transform .4s var(--ease);
}
.gallery-item.hidden {
  display: none !important;
}

/* The flippable inner element */
.gallery-flip {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .9s var(--ease);
  cursor: pointer;
  will-change: transform;
}
.gallery-item:hover .gallery-flip,
.gallery-item.flipped .gallery-flip {
  transform: rotateY(180deg);
}

.gallery-face {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.gallery-front { background: var(--bg); }
.gallery-front img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.gallery-item:hover .gallery-front img { transform: scale(1.05); }

.gallery-label {
  position: absolute;
  left: 1rem; bottom: 1rem;
  padding: .4rem .85rem;
  background: rgba(26, 39, 51, .8);
  color: var(--bg-alt);
  font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gallery-back {
  background: linear-gradient(135deg, #1a2733 0%, #2a3a4a 100%);
  color: var(--bg-alt);
  transform: rotateY(180deg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 2rem 1.75rem;
  text-align: left;
}
.gallery-back::before {
  content: ''; position: absolute;
  top: 1rem; left: 1.75rem; right: 1.75rem; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.gallery-back h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: .85rem;
  color: var(--bg-alt);
}
.gallery-back p {
  color: rgba(255, 255, 255, .82);
  font-size: .95rem; line-height: 1.55;
  margin-bottom: 1.5rem;
}
.gallery-zoom {
  align-self: flex-start;
  padding: .65rem 1.25rem;
  background: var(--accent);
  color: #1a2733;
  font-weight: 600; font-size: .85rem;
  border-radius: 999px;
  transition: transform .25s var(--ease), background .25s;
}
.gallery-zoom:hover {
  background: var(--bg-alt); transform: translateX(4px);
}

/* Touch devices: tap to flip rather than hover */
@media (hover: none) {
  .gallery-item:hover .gallery-flip { transform: none; }
  .gallery-item.flipped .gallery-flip { transform: rotateY(180deg); }
}

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 15, 20, .92);
  display: none; align-items: center; justify-content: center;
  z-index: 2000;
  padding: 2rem;
  opacity: 0; transition: opacity .3s;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img {
  max-width: 90vw; max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: zoom-in .4s var(--ease);
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 1.6rem; line-height: 1;
  border-radius: 50%;
  transition: background .25s, transform .25s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .25); transform: rotate(90deg); }

@keyframes zoom-in { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* CONTATO */
.contato { background: transparent; padding-bottom: 4rem; }
.contato-card {
  background: linear-gradient(135deg, #1a2733 0%, #2a3a4a 100%);
  border-radius: 32px;
  padding: 4rem;
  display: grid; grid-template-columns: 1.3fr 1fr;
  align-items: center; gap: 3rem;
  color: var(--bg-alt);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.contato-card .section-tag { color: var(--accent-soft); }
.contato-card h2 { color: var(--bg-alt); margin-bottom: 1rem; }
.contato-card h2 em { color: var(--accent); }
.contato-card > div > p {
  color: rgba(255, 255, 255, .75);
  font-size: 1.05rem; margin-bottom: 2.5rem;
  max-width: 480px;
}
.contact-rows { display: grid; gap: 1rem; }
.contact-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  transition: all .3s var(--ease);
}
a.contact-row:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateX(6px);
  border-color: var(--accent);
}
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(184, 153, 104, .15);
  color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row small {
  display: block; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .2em;
  color: rgba(255, 255, 255, .5);
}
.contact-row strong { display: block; font-size: 1rem; font-weight: 500; margin-top: .15rem; }

.contato-visual {
  position: relative; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  transform-style: preserve-3d;
}
.ring {
  position: absolute; border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  animation: rotate-3d 20s linear infinite;
}
.r1 { width: 100%; height: 100%; }
.r2 { width: 80%; height: 80%; animation-duration: 15s; animation-direction: reverse; border-color: rgba(184, 153, 104, .2); }
.r3 { width: 60%; height: 60%; animation-duration: 12s; }
@keyframes rotate-3d {
  0% { transform: rotate(0) rotateX(60deg); }
  100% { transform: rotate(360deg) rotateX(60deg); }
}
/* ============ THREE.JS CANVASES ============ */
/* Floating canvas: pinned to viewport, follows the user through the page. */
.three-floating {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: block;
  transition: filter .35s linear;
}
.three-canvas {
  display: block;
  width: 100%; height: 100%;
}
.contato-visual .three-tooth {
  position: absolute; inset: 0;
  z-index: 2;
  width: 100%; height: 100%;
}

@media (max-width: 820px) {
  .contato-card { grid-template-columns: 1fr; padding: 2.5rem 1.75rem; border-radius: 24px; }
  .contato-visual { height: 320px; aspect-ratio: auto; }
  .ring { display: none; }
}
@media (max-width: 480px) {
  .contato-visual { height: 240px; }
  .contato-card { padding: 2rem 1.25rem; }
}

/* FOOTER */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  margin-bottom: .25rem;
}
.footer small { color: var(--muted); font-size: .82rem; }

/* ============ REVEAL ANIMATIONS ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].visible {
  opacity: 1; transform: translateY(0);
}

/* SaaS-style stagger — children of [data-stagger] reveal with 3D entrance + cascade */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(60px) rotateX(14deg) scale(.96);
  transform-origin: center top;
  transition:
    opacity .9s var(--ease),
    transform .9s var(--ease);
  will-change: transform, opacity;
}
[data-stagger].in-view > * {
  opacity: 1;
  transform: translateY(0) rotateX(0) scale(1);
}
[data-stagger].in-view > *:nth-child(1)  { transition-delay: .00s; }
[data-stagger].in-view > *:nth-child(2)  { transition-delay: .07s; }
[data-stagger].in-view > *:nth-child(3)  { transition-delay: .14s; }
[data-stagger].in-view > *:nth-child(4)  { transition-delay: .21s; }
[data-stagger].in-view > *:nth-child(5)  { transition-delay: .28s; }
[data-stagger].in-view > *:nth-child(6)  { transition-delay: .35s; }
[data-stagger].in-view > *:nth-child(7)  { transition-delay: .42s; }
[data-stagger].in-view > *:nth-child(8)  { transition-delay: .49s; }
[data-stagger].in-view > *:nth-child(9)  { transition-delay: .56s; }
[data-stagger].in-view > *:nth-child(10) { transition-delay: .63s; }
[data-stagger].in-view > *:nth-child(11) { transition-delay: .70s; }
[data-stagger].in-view > *:nth-child(12) { transition-delay: .77s; }

/* skills-grid is dense — tighter cascade */
.skills-grid[data-stagger].in-view > *:nth-child(n) { transition-delay: calc(.04s * (var(--i, 0))); }
.skills-grid[data-stagger] > *:nth-child(1)  { --i: 0; }
.skills-grid[data-stagger] > *:nth-child(2)  { --i: 1; }
.skills-grid[data-stagger] > *:nth-child(3)  { --i: 2; }
.skills-grid[data-stagger] > *:nth-child(4)  { --i: 3; }
.skills-grid[data-stagger] > *:nth-child(5)  { --i: 4; }
.skills-grid[data-stagger] > *:nth-child(6)  { --i: 5; }

/* ============ RESPONSIVE REFINEMENTS ============ */
/* Tablet portrait & small laptop */
@media (max-width: 1024px) {
  .section { padding: 5.5rem 0; }
  .section-head { margin-bottom: 3rem; }
  h2 { font-size: clamp(1.85rem, 4.2vw, 2.75rem); }
}

/* Stacked-hero range — hide the floating decorative cards so they don't
   collide with Camilla's photo when the column shrinks. Also drop the
   scroll-indicator (the little mouse icon) that overlaps the meta row. */
@media (max-width: 900px) {
  .floating-card { display: none; }
  .photo-ring { inset: -12px; }
  .scroll-indicator { display: none; }
}

/* Tablet portrait — 700-820px */
@media (max-width: 820px) {
  .sobre-pillars { grid-template-columns: repeat(2, 1fr); }
  .sobre-pillars .pillar:nth-child(3) { grid-column: 1 / -1; max-width: 360px; margin-inline: auto; }
  .timeline { padding-left: 2rem; }
  .timeline-dot { left: -2rem; width: 14px; height: 14px; }
  .timeline-card { padding: 1.5rem 1.5rem; }
  .hero-actions { gap: .75rem; }
  .btn { padding: .85rem 1.4rem; font-size: .9rem; }
  .hero-inner { gap: 2.5rem; }
  .hero { padding-top: 6.5rem; padding-bottom: 3.5rem; min-height: auto; }
}

/* Mobile */
@media (max-width: 600px) {
  .section { padding: 4rem 0; }
  .section-head { margin-bottom: 2.25rem; }
  .nav { padding: 1rem 5%; }
  .nav.scrolled { padding: .75rem 5%; }
  .container { width: min(1200px, 90%); }

  .hero { padding-top: 5.5rem; padding-bottom: 2.5rem; min-height: auto; }
  .hero-inner { gap: 2rem; width: 90%; }
  .hero-title { font-size: clamp(2rem, 8.5vw, 2.6rem); margin-bottom: 1rem; letter-spacing: -0.025em; }
  .hero-title .word { margin-right: .22em; }
  .hero-subtitle { font-size: .97rem; margin-bottom: 1.75rem; line-height: 1.55; }
  .hero-actions { margin-bottom: 2rem; gap: .65rem; }
  .btn { padding: .8rem 1.3rem; font-size: .88rem; }
  .hero-meta { gap: 1.1rem; justify-content: flex-start; width: 100%; }
  .meta-item strong { font-size: 1.45rem; }
  .meta-item span { font-size: .72rem; }
  .meta-divider { height: 26px; }
  .photo-stack { max-width: 260px; }
  .eyebrow { font-size: .7rem; padding: .35rem .8rem; margin-bottom: 1.1rem; letter-spacing: .2em; }

  .section-tag { font-size: .68rem; letter-spacing: .2em; }
  .sobre-pillars { grid-template-columns: 1fr; gap: 1rem; }
  .sobre-pillars .pillar:nth-child(3) { max-width: 100%; }
  .sobre-lead { font-size: 1.1rem; }
  .sobre-body { font-size: .95rem; }
  .pillar { padding: 1.5rem 1.25rem; }

  .timeline { padding-left: 1.75rem; }
  .timeline-dot { left: -1.75rem; width: 13px; height: 13px; border-width: 2px; }
  .timeline-card { padding: 1.25rem 1.25rem; }
  .timeline-card h3 { font-size: 1.02rem; }
  .timeline-card .desc { font-size: .85rem; }

  .exp-card { padding: 1.4rem 1.2rem; }
  .exp-card h3 { font-size: 1rem; }
  .exp-card p { font-size: .85rem; }
  .skills { margin-top: 2.5rem; }
  .skills-title { font-size: 1.25rem; }
  .skill { padding: .5rem 1rem; font-size: .8rem; }

  .gallery { gap: .85rem; }
  .gallery-label { font-size: .68rem; left: .75rem; bottom: .75rem; padding: .3rem .7rem; }
  .gallery-back { padding: 1.25rem 1.1rem; }
  .gallery-back h3 { font-size: 1.05rem; margin-bottom: .55rem; }
  .gallery-back p { font-size: .82rem; margin-bottom: 1rem; line-height: 1.45; }
  .gallery-zoom { padding: .55rem 1rem; font-size: .8rem; }

  .portfolio-filters { gap: .35rem; margin-bottom: 1.75rem; }
  .filter { padding: .45rem .9rem; font-size: .75rem; }

  .contato { padding-bottom: 3rem; }
  .contato-card { padding: 1.85rem 1.25rem; border-radius: 20px; }
  .contato-card h2 { font-size: 1.55rem; line-height: 1.2; }
  .contato-card > div > p { font-size: .92rem; margin-bottom: 1.5rem; }
  .contact-row { padding: .8rem .9rem; gap: .75rem; }
  .contact-row strong { font-size: .88rem; }
  .contact-row small { font-size: .65rem; letter-spacing: .15em; }
  .contact-icon { width: 36px; height: 36px; border-radius: 10px; }
  .contact-icon svg { width: 16px; height: 16px; }

  .footer { padding: 2rem 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; gap: .5rem; }
  .footer-logo { font-size: 1rem; }
}

/* Small mobile */
@media (max-width: 380px) {
  .hero-title { font-size: 1.95rem; }
  .hero-meta { gap: .6rem; }
  .meta-item strong { font-size: 1.3rem; }
  .meta-divider { height: 22px; }
  .photo-stack { max-width: 230px; }
  .btn { padding: .75rem 1.15rem; font-size: .85rem; }
  .nav-logo { font-size: 1rem; }
  .contato-card { padding: 1.5rem 1rem; }
}

/* Large desktop polish */
@media (min-width: 1600px) {
  .hero-inner { width: min(1380px, 92%); }
  .container { width: min(1280px, 92%); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
