/* ═══════════════════════════════════════════════════════════════════════════
   Pedro Ivo — Personal Portfolio
   Dark Minimalist Theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:             #0A0A0A;
  --surface:        #111111;
  --surface-2:      #161616;
  --border:         #1E1E1E;
  --border-hover:   #2E2E2E;
  --accent:         #F97316;
  --accent-2:       #FBBF24;
  --accent-glow:    rgba(249, 115, 22, .22);
  --accent-subtle:  rgba(249, 115, 22, .07);
  --accent-medium:  rgba(249, 115, 22, .14);
  --text:           #E8E8E8;
  --text-secondary: #888888;
  --text-muted:     #484848;
  --green:          #22c55e;
  --green-subtle:   rgba(34, 197, 94, .08);
  --green-border:   rgba(34, 197, 94, .22);
  --radius:         14px;
  --radius-sm:      8px;
  --transition:     .25s cubic-bezier(.4, 0, .2, 1);
  --max-width:      1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar              { width: 5px; }
::-webkit-scrollbar-track        { background: var(--bg); }
::-webkit-scrollbar-thumb        { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: var(--text-muted); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

#nav.scrolled {
  background: rgba(10, 10, 10, .88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.3px;
  color: var(--accent);
  width: 40px; height: 40px;
  background: var(--accent-subtle);
  border: 1px solid rgba(249, 115, 22, .2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.nav-logo:hover {
  background: var(--accent-medium);
  border-color: rgba(249, 115, 22, .45);
  box-shadow: 0 0 20px rgba(249, 115, 22, .15);
}

.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-links a:hover                { color: var(--text); }
.nav-links a:hover::after         { width: 100%; }

.nav-right {
  display: flex; align-items: center; gap: 10px;
}

.lang-toggle {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 11px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.lang-toggle:hover {
  color: var(--accent);
  border-color: rgba(249, 115, 22, .35);
  background: var(--accent-subtle);
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text-secondary); border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-mobile {
  display: none; flex-direction: column;
  background: rgba(10, 10, 10, .96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary);
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), background var(--transition);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--accent); background: var(--accent-subtle); }
.nav-mobile-lang { color: var(--text-muted) !important; font-size: 14px !important; }

/* ── Section Shared ───────────────────────────────────────────────────────── */
section { padding: 100px 0; }

.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-label::before {
  content: ''; display: block;
  width: 22px; height: 2px;
  background: var(--accent); border-radius: 1px;
}

.section-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700; letter-spacing: -1.2px; line-height: 1.12;
  margin-bottom: 14px;
}
.section-subtitle {
  font-size: 16px; color: var(--text-secondary);
  max-width: 520px; line-height: 1.75;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100dvh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  position: relative; overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 72% 20%, rgba(249, 115, 22, .09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 15% 85%, rgba(139, 92, 246, .05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
}

.hero-text { max-width: 580px; }

.availability-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--green-subtle);
  border: 1px solid var(--green-border);
  border-radius: 50px;
  font-size: 12px; font-weight: 600;
  color: #4ade80;
  margin-bottom: 28px;
}
.availability-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  50%       { opacity: .8; box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.hero-greeting {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.hero-greeting::before {
  content: ''; display: inline-block;
  width: 28px; height: 1px; background: var(--accent);
}

.hero-name {
  font-size: clamp(46px, 8vw, 76px);
  font-weight: 900; letter-spacing: -3px; line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(150deg, #F0F0F0 0%, #909090 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(17px, 2.5vw, 22px);
  font-weight: 500; color: var(--accent);
  height: 34px; margin-bottom: 22px;
  display: flex; align-items: center;
}
.hero-role .cursor {
  display: inline-block; width: 2px; height: 1.15em;
  background: var(--accent);
  animation: blink .85s step-end infinite;
  margin-left: 3px; flex-shrink: 0;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

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

.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover {
  background: #ea6c0a;
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(249, 115, 22, .38);
}
.btn-outline {
  background: var(--accent-subtle); color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  background: var(--accent-medium);
  border-color: rgba(249, 115, 22, .35);
  transform: translateY(-2px);
}
.btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.hero-social { display: flex; gap: 10px; }
.social-link {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.social-link:hover {
  background: var(--accent-subtle);
  border-color: rgba(249, 115, 22, .35);
  color: var(--accent);
  transform: translateY(-2px);
}
.social-link svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Hero Photo ───────────────────────────────────────────────────────────── */
.hero-photo-col {
  display: flex; align-items: center; justify-content: center;
}
.hero-photo-wrapper {
  position: relative; width: 312px; height: 312px; flex-shrink: 0;
}
.hero-photo-wrapper::before {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent) 0deg, var(--accent-2) 80deg,
    transparent 160deg, transparent 260deg,
    var(--accent) 360deg
  );
  animation: rotate-border 5s linear infinite;
  z-index: 0;
}
.hero-photo-wrapper::after {
  content: '';
  position: absolute; inset: -32px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, .16) 0%, transparent 65%);
  z-index: -1;
}
.hero-photo-bg {
  position: absolute; inset: 4px; border-radius: 50%;
  background: var(--bg); z-index: 1;
}
.hero-photo {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);  /* Garante que ocupe o espaço interno */
  height: calc(100% - 12px); /* Força a altura a ser igual à largura */
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  z-index: 2;
  animation: float 7s ease-in-out infinite;
}
.hero-photo-placeholder {
  position: absolute; inset: 6px; border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 800;
  color: var(--accent); letter-spacing: -2px;
  z-index: 2;
}
@keyframes rotate-border { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* scroll hint */
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  animation: fade-hint 2s ease-in-out infinite;
}
.scroll-hint-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}
@keyframes fade-hint {
  0%, 100% { opacity: .4; } 50% { opacity: 1; }
}

/* ── About ────────────────────────────────────────────────────────────────── */
#about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}
.about-bio {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.85; margin-bottom: 22px;
}
.about-bio strong { color: var(--text); font-weight: 600; }

.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.stat-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover {
  border-color: rgba(249, 115, 22, .25);
  transform: translateY(-2px);
}
.stat-number {
  font-size: 30px; font-weight: 800;
  letter-spacing: -1px; color: var(--accent);
  line-height: 1; margin-bottom: 5px;
}
.stat-label {
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
}

/* ── Skills ───────────────────────────────────────────────────────────────── */
.skills-grid { display: flex; flex-direction: column; gap: 32px; margin-top: 52px; }
.skill-group-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: all var(--transition);
}
.skill-tag:hover {
  background: var(--accent-subtle);
  border-color: rgba(249, 115, 22, .32);
  color: var(--accent);
  transform: translateY(-1px);
}
.skill-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: .55; flex-shrink: 0;
}

/* ── Projects ─────────────────────────────────────────────────────────────── */
#projects {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.projects-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 48px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  /* Se tiver poucos cards, eles não esticam até a borda */
  justify-content: start;
}
.project-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .55);
}
.project-card:hover::before { opacity: 1; }

.project-icon {
  width: 44px; height: 44px;
  background: var(--accent-subtle); border: 1px solid rgba(249, 115, 22, .15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.project-name {
  font-size: 16px; font-weight: 700; letter-spacing: -.3px;
}
.project-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.65; flex: 1;
}
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
  color: var(--accent); background: var(--accent-subtle);
  padding: 3px 9px; border-radius: 4px;
}
.project-links {
  display: flex; gap: 14px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.project-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition);
}
.project-link:hover { color: var(--accent); }
.project-link svg { width: 13px; height: 13px; fill: currentColor; }

/* ── Experience ──────────────────────────────────────────────────────────── */
#experience { 
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
 }

/* ── Education ───────────────────────────────────────────────────────────── */
#education {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* Role subtitle inside experience cards */
.exp-role-subtitle {
  font-size: 12px; font-weight: 600;
  color: var(--accent); letter-spacing: .2px;
  margin-top: -6px;
}

/* Period + current badge in the project-links row */
.exp-period-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
}
.exp-period-tag svg { width: 13px; height: 13px; flex-shrink: 0; }
.exp-current-badge {
  font-size: 9px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--green);
  background: var(--green-subtle);
  border: 1px solid var(--green-border);
  border-radius: 20px;
  padding: 2px 8px; white-space: nowrap;
}

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; margin-top: 52px;
}

.contact-info-title {
  font-size: 20px; font-weight: 700;
  letter-spacing: -.3px; margin-bottom: 12px;
}
.contact-info-desc {
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: 30px;
}
.contact-methods { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.contact-method {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--text-secondary);
  transition: color var(--transition);
}
.contact-method:hover { color: var(--text); }
.contact-method-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.contact-method-icon svg { width: 14px; height: 14px; fill: currentColor; }

.contact-social { display: flex; gap: 10px; }

/* form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group   { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; resize: none; width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(249, 115, 22, .5);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .1);
}
.hp-field { display: none !important; visibility: hidden !important; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-status {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; display: none;
}
.form-status.success {
  background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .28);
  color: #4ade80; display: block;
}
.form-status.error {
  background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .28);
  color: #f87171; display: block;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-copy {
  font-size: 13px; color: var(--text-muted);
}
.footer-copy span { color: var(--accent); font-weight: 600; }
.footer-social { display: flex; gap: 10px; }

/* ── Scroll Reveal Animations ─────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-group > * {
  opacity: 0; transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal-group.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.reveal-group.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: .09s; }
.reveal-group.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: .18s; }
.reveal-group.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: .27s; }
.reveal-group.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: .36s; }
.reveal-group.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: .45s; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner              { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-photo-col          { order: -1; }
  .hero-greeting           { justify-content: center; }
  .hero-cta                { justify-content: center; }
  .hero-social             { justify-content: center; }
  .hero-bio                { margin-left: auto; margin-right: auto; }
  .availability-badge      { display: inline-flex; }
  .about-inner             { grid-template-columns: 1fr; }
  .projects-grid           { grid-template-columns: repeat(2, 1fr); }
  .contact-inner           { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links     { display: none; }
  .nav-toggle    { display: flex; }
  section        { padding: 72px 0; }
  .hero-photo-wrapper { width: 230px; height: 230px; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-stats   { grid-template-columns: 1fr 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  .projects-header { flex-direction: column; align-items: flex-start; }
  .hero-photo-wrapper { 
    width: 230px !important; 
    height: 230px !important; /* Força a altura fixa para evitar o achatamento */
    margin: 0 auto; 
  }
}
