/* =============================================
   Pedro Naves - Portfolio Styles v2
   Editorial, assimétrico, personalidade própria
   ============================================= */

/* ---------- CSS Variables (Dark Mode Only) ---------- */
:root {
  --bg: #1a1a1a;
  --bg-alt: #222;
  --text: #f0f0f0;
  --text-secondary: #999;
  --text-muted: #666;
  --accent: #fbbf24;
  --accent-hover: #fcd34d;
  --accent-soft: rgba(251, 191, 36, 0.1);
  --accent-glow: rgba(251, 191, 36, 0.12);
  --card-bg: #262626;
  --card-border: #333;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(26, 26, 26, 0.85);
  --nav-border: #333;
  --tag-bg: #2a2a2a;
  --tag-text: #ccc;
  --tag-border: #3a3a3a;
  --input-bg: #262626;
  --input-border: #444;
  --input-focus: #fbbf24;
  --footer-bg: #0f0f0f;
  --footer-text: #777;
  --hero-glow: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(251, 191, 36, 0.06) 0%, transparent 70%);
  --timeline-line: #3a3a3a;
  --skill-bar: #333;
  --divider: #2a2a2a;
  --selection-bg: #fbbf24;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1200px;
  --section-pad: 120px 0;
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.2s ease-out;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s, color 0.3s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--accent); color: #1a1a1a; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 8px;
}
.btn-ghost:hover { color: var(--accent); }

.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease-out, background 0.2s ease-out;
}
@supports (padding-top: env(safe-area-inset-top)) {
  .navbar { padding-top: env(safe-area-inset-top); }
}
.navbar.scrolled { border-bottom-color: var(--nav-border); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links { display: flex; align-items: center; gap: 24px; }

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease-out;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease-out;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Hamburger ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger-line {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Section Shared ---------- */
.section {
  padding: var(--section-pad);
  position: relative;
}
.section-alt { background: var(--bg-alt); }

/* Navegação interna entre seções */
.section-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.section-nav-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--divider);
}
.section-nav-number {
  color: var(--accent);
  font-weight: 600;
}
.section-nav-title {
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  color: inherit;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  background-image: var(--hero-glow);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.hero-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-label-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-label-dot { animation: none; }
  .skill-tag, .skill-tag[data-brand]::before { transition: none; }
  .hero-deco-1, .hero-deco-2 { animation: none; }
}
.hero-label-dot.paused { animation-play-state: paused; }

.hero-title {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
}
.hero-name {
  display: block;
  color: var(--accent);
}

.hero-role {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 24px;
  max-width: 480px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Hero Image */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  max-width: 100%;
}

.hero-image-block {
  position: relative;
}

.hero-image-frame {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 2;
  border: 3px solid var(--card-bg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Decorative elements around the photo */
.hero-deco {
  position: absolute;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0.2;
  z-index: 1;
}
.hero-deco-1 {
  width: 360px;
  height: 360px;
  top: -20px;
  left: -20px;
  transform-origin: center;
  animation: hero-ripple 4s ease-out infinite;
}
.hero-deco-2 {
  width: 400px;
  height: 400px;
  top: -40px;
  left: -40px;
  border-color: var(--text-muted);
  opacity: 0.08;
  transform-origin: center;
  animation: hero-ripple 4s ease-out 2s infinite;
}
@keyframes hero-ripple {
  0%   { transform: scale(1);    opacity: 0.22; }
  70%  { opacity: 0.04; }
  100% { transform: scale(1.28); opacity: 0; }
}

.hero-years {
  position: absolute;
  bottom: 16px;
  right: -8px;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 50px;
  z-index: 3;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.about-text p { margin-bottom: 1.2em; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
}
.highlight-row:last-child { border-bottom: none; }

.highlight-number {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 80px;
}

.highlight-text {
  color: var(--text-secondary);
  line-height: 1.5;
}
.highlight-text strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

/* ---------- SKILLS ---------- */
.skills-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.skills-intro {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.skills-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 32px;
}

.skill-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-size: 13px;
  font-weight: 450;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 6px 14px 6px 34px;
  border-radius: 50px;
  transition: all 0.2s ease-out;
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* Brand icon — monochrome (text color) by default, brand color on hover */
.skill-tag[data-brand]::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: var(--tag-text);
  mask-image: var(--brand-icon);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: var(--brand-icon);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  transition: background-color 0.2s ease-out;
}
.skill-tag[data-brand]:hover::before {
  background-color: var(--brand-color);
}
.skill-tag[data-brand]:hover {
  border-color: var(--brand-color);
  color: var(--brand-color);
  background: var(--accent-soft);
  background: color-mix(in srgb, var(--brand-color) 10%, var(--tag-bg));
}
.skill-tag small {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  margin-left: 2px;
}
.skill-tag strong {
  font-size: 12px;
  color: var(--accent);
  margin-left: 3px;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.skill-tag-sm { font-size: 12px; padding: 4px 12px 4px 30px; }
.skill-tag-sm[data-brand]::before {
  left: 8px;
  width: 12px;
  height: 12px;
}

/* ---------- PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  position: relative;
  box-shadow: var(--card-shadow);
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}
.project-card:hover::before { opacity: 1; }

.project-card:first-child {
  grid-column: 1 / -1;
}

.project-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.project-card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 16px;
}
.project-card-features li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
}
.project-card-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ---------- EXPERIENCE ---------- */
.timeline {
  max-width: 700px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding-bottom: 36px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-meta {
  text-align: right;
  padding-top: 2px;
}

.timeline-year {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
  white-space: nowrap;
}

.timeline-dot {
  display: none; /* simplified — year is the marker */
}

.timeline-body {
  position: relative;
  padding-left: 20px;
  border-left: 1.5px solid var(--timeline-line);
  padding-bottom: 4px;
}
.timeline-item:last-child .timeline-body { border-left-color: transparent; }

.timeline-body::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-role {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.timeline-company {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- EDUCATION ---------- */
.education-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 600px;
}

.edu-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s;
  box-shadow: var(--card-shadow);
}
.edu-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.edu-degree {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.edu-school {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- PORTFOLIO GRID ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  display: block;
  color: inherit;
  text-decoration: none;
}
.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.portfolio-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tag-bg);
}
.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}
.portfolio-item:hover .portfolio-img img {
  transform: scale(1.05);
}

.portfolio-info {
  padding: 14px 16px 16px;
}

.portfolio-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.portfolio-service {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1px;
}

.portfolio-client {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- RESUME CTA ---------- */
.resume-cta {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.resume-cta h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.resume-cta p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.contact-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-value {
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s;
}
.contact-value:hover { color: var(--accent); }

/* Animated send illustration */
.contact-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  color: var(--accent);
}
.contact-visual-text {
  max-width: 100%;
}
.contact-visual-text h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.contact-visual-text p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.send-anim {
  width: 100%;
  max-width: 320px;
  height: auto;
  overflow: visible;
}
.send-anim .plane {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}
.send-anim .env-flap {
  transform-box: fill-box;
  transform-origin: center;
}
.send-anim .trail line {
  transform-box: fill-box;
  transform-origin: right center;
}
.send-anim .cloud,
.send-anim .signal {
  transform-box: fill-box;
  transform-origin: center;
}
/* Animation runs (looping) once .playing is added on scroll into view */
.contact-visual.playing .send-anim .plane {
  animation: plane-fly 4.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.contact-visual.playing .send-anim .trail {
  animation: trail-show 4.5s ease-in-out infinite;
}
.contact-visual.playing .send-anim .env-flap {
  animation: flap 1.4s ease-in-out 0.3s infinite alternate;
}
.contact-visual.playing .send-anim .cloud-1 {
  animation: float-cloud 7s ease-in-out infinite;
}
.contact-visual.playing .send-anim .cloud-2 {
  animation: float-cloud 9s ease-in-out 1s infinite reverse;
}
.contact-visual.playing .send-anim .signal {
  animation: signal-pulse 3s ease-in-out infinite;
  transform-origin: 236px 150px;
}
@keyframes plane-fly {
  0%   { opacity: 0; transform: translate(0, 30px) rotate(0deg) scale(0.85); }
  14%  { opacity: 1; }
  50%  { transform: translate(0, 0) rotate(0deg) scale(1); }
  72%  { transform: translate(40px, -10px) rotate(6deg) scale(1); }
  100% { opacity: 0; transform: translate(120px, -58px) rotate(14deg) scale(0.75); }
}
@keyframes trail-show {
  0%   { opacity: 0; }
  45%  { opacity: 0; }
  60%  { opacity: 0.85; }
  100% { opacity: 0; }
}
@keyframes flap {
  0%   { transform: rotateX(0deg); }
  100% { transform: rotateX(45deg); }
}
@keyframes float-cloud {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes signal-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.95); }
  50%      { opacity: 0.9; transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-visual.playing .send-anim .plane { animation: none; opacity: 1; transform: none; }
  .contact-visual.playing .send-anim .trail,
  .contact-visual.playing .send-anim .signal { animation: none; opacity: 0.9; }
  .contact-visual.playing .send-anim .env-flap,
  .contact-visual.playing .send-anim .cloud-1,
  .contact-visual.playing .send-anim .cloud-2 { animation: none; }
}

/* Form */
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--card-shadow);
}

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}
.form-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-textarea { resize: vertical; min-height: 100px; }

.form-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }

.input-error { border-color: #dc2626 !important; }
.input-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important; }

.form-footnote {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}
.form-footnote a { color: var(--accent); font-weight: 500; }

/* Honeypot anti-spam — oculto de humanos, visível para bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.form-status {
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  min-height: 1px;
}
.form-status.visible.error { color: #dc2626; }

.form-success {
  text-align: center;
  padding: 32px 16px;
  animation: fade-in 0.4s ease-out;
}
.form-success[hidden] { display: none; }
.form-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-success h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-success p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 56px 0 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
}
.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(10);
}
.footer-tagline {
  font-size: 13px;
  margin-top: 2px;
}

.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  transition: all 0.3s;
}
.footer-social a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy { font-size: 12px; opacity: 0.5; }

.back-top {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  transition: all 0.3s;
}
.back-top:hover { background: var(--accent); color: #1a1a1a; }

/* ---------- SCROLL ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-grid { gap: 40px; }
  .skills-layout { grid-template-columns: 1fr; gap: 40px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }

  .section-nav { margin-bottom: 32px; }

  /* Nav mobile */
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--nav-border);
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.4s;
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-right { display: none; }
  .nav-links .nav-actions { display: flex; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--divider); }
  .nav-link { font-size: 16px; }

  /* Logo centralizada no mobile */
  .nav-inner { position: relative; justify-content: center; }
  .nav-logo { width: 100%; justify-content: center; }
  .hamburger { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }

  /* Botão voltar ao topo fixo no rodapé (mobile) */
  .back-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1500;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #1a1a1a;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  }

  /* Hero */
  .hero { min-height: auto; padding: 110px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
  .hero-image-frame { width: 220px; height: 220px; }
  .hero-deco-1 { width: 260px; height: 260px; top: -20px; left: -20px; }
  .hero-deco-2 { width: 300px; height: 300px; top: -40px; left: -40px; }
  .hero-years { bottom: 8px; right: 0; font-size: 11px; padding: 6px 14px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Skills */
  .skills-layout { grid-template-columns: 1fr; }
  .skills-groups { grid-template-columns: 1fr; }
  .skills-intro { margin-bottom: 8px; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .project-card:first-child { grid-column: 1; }

  /* Portfolio */
  .portfolio-grid { grid-template-columns: 1fr; }

  /* Timeline */
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .timeline-meta { text-align: left; }
  .timeline-body { margin-left: 0; }

  /* Education */
  .education-list { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-visual { margin: 8px 0; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-logo { justify-content: center; width: 100%; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 32px; }
  .hero-image-frame { width: 180px; height: 180px; }
  .hero-deco-1 { width: 220px; height: 220px; }
  .hero-deco-2 { width: 260px; height: 260px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .project-card { padding: 24px; }
  .contact-form { padding: 24px; }
  .send-anim { max-width: 240px; }
  .contact-visual-text h3 { font-size: 20px; }
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 48px 64px;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  display: flex;
  gap: 32px;
  align-items: center;
  max-width: 960px;
  width: 100%;
  max-height: 85vh;
}

.lightbox-image {
  flex: 1;
  min-width: 0;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-image img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-info {
  flex: 0 0 240px;
  color: #e0e0e0;
}
.lightbox-info h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.lightbox-info .lb-service {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.lightbox-info .lb-client {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 20px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.1); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(251, 191, 36, 0.15);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}
.lightbox-nav:hover {
  background: var(--accent);
  color: #1a1a1a;
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 768px) {
  .lightbox { padding: 32px 16px; }
  .lightbox-inner { flex-direction: column; gap: 16px; }
  .lightbox-info { flex: none; width: 100%; text-align: center; }
  .lightbox-image { max-height: 50vh; }
  .lightbox-image img { max-height: 50vh; }
  /* Setas abaixo da imagem, alinhadas com o texto */
  .lightbox-nav {
    position: absolute;
    top: auto;
    bottom: calc(50% + 12px);
    transform: none;
    font-size: 24px;
    width: 44px;
    height: 44px;
  }
  .lightbox-nav:hover { transform: scale(1.08); }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

/* ---------- FOCUS ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
