/* ================================================
   Ítallo Nóbrega Primo — Currículo Profissional
   Design: Light, Minimalist, Elegant
   ================================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f5f4;
  --color-border: #e7e5e4;
  --color-border-soft: #f0eeed;
  --color-text: #1c1917;
  --color-text-secondary: #57534e;
  --color-text-muted: #a8a29e;
  --color-accent: #292524;
  --color-accent-soft: #44403c;
  --color-highlight: #b08d57;
  --color-highlight-soft: rgba(176, 141, 87, 0.08);
  --color-highlight-medium: rgba(176, 141, 87, 0.15);
  --color-green: #16a34a;
  --color-green-soft: rgba(22, 163, 74, 0.08);

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.04);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Language Toggle --- */
.lang-toggle {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out);
}

.lang-toggle:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.lang-flag {
  font-size: 1.125rem;
  line-height: 1;
}

.lang-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Hero / Header --- */
.hero {
  position: relative;
  padding: var(--space-4xl) var(--space-xl) var(--space-3xl);
  text-align: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-highlight), var(--color-accent), var(--color-highlight));
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero-photo {
  margin-bottom: var(--space-xl);
}

.hero-photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--color-highlight);
  transition: transform var(--duration-normal) var(--ease-out);
}

.hero-photo img:hover {
  transform: scale(1.05);
}

.hero-badge {
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.hero-badge span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-green-soft);
  color: var(--color-green);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-xl);
  text-transform: uppercase;
}

.hero-badge span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: var(--space-xl);
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  transition: all var(--duration-normal) var(--ease-out);
}

a.contact-pill:hover {
  background: var(--color-highlight-soft);
  border-color: var(--color-highlight);
  color: var(--color-accent);
}

.contact-pill svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* --- Main --- */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid var(--color-border-soft);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.section:last-child {
  border-bottom: none;
}

/* Stagger animation */
.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.2s; }
.section:nth-child(5) { animation-delay: 0.25s; }
.section:nth-child(6) { animation-delay: 0.3s; }
.section:nth-child(7) { animation-delay: 0.35s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-xl);
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--color-highlight);
  border-radius: 1px;
}

/* --- Profile Card --- */
.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.profile-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.profile-card strong {
  color: var(--color-accent);
  font-weight: 600;
}

/* --- Skills Grid --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.skill-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.skill-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-highlight);
}

.skill-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-highlight-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  color: var(--color-highlight);
}

.skill-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.skill-card p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 2px);
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-highlight);
  z-index: 1;
}

.timeline-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.timeline-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-accent);
}

.timeline-role {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-highlight);
  font-weight: 500;
  margin-top: var(--space-xs);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
}

.timeline-details {
  padding-left: var(--space-md);
}

.timeline-details li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.timeline-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-highlight);
}

.timeline-link,
.timeline-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-highlight);
  font-weight: 500;
  transition: color var(--duration-fast);
}

.timeline-link:hover,
.timeline-links a:hover {
  color: var(--color-accent);
}

.timeline-link::after,
.timeline-links a::after {
  content: '↗';
  font-size: 0.75rem;
}

.timeline-links {
  display: flex;
  gap: var(--space-md);
}

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.portfolio-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.portfolio-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-highlight);
}

.portfolio-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  line-height: 1;
}

.portfolio-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.portfolio-card p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Portfolio cards with logo images */
.portfolio-logo {
  height: 48px;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
}

.portfolio-logo img {
  max-height: 48px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* --- Recognition / Testimonial --- */
.recognition-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.recognition-text blockquote {
  margin: 0;
  padding: 0;
}

.recognition-text blockquote p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  font-style: italic;
}

.recognition-text blockquote strong {
  color: var(--color-accent);
  font-style: normal;
}

.recognition-text cite {
  display: block;
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-highlight);
  font-style: normal;
}

.recognition-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.recognition-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Education --- */
.education-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.education-item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.education-item:hover {
  box-shadow: var(--shadow-md);
}

.education-year {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-highlight);
  white-space: nowrap;
  min-width: 50px;
}

.education-detail h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.education-detail p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.cert-link {
  color: var(--color-highlight);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast);
}

.cert-link:hover {
  color: var(--color-accent);
}

/* --- Tools --- */
.tools-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.tool-group h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tool-tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: all var(--duration-normal) var(--ease-out);
}

.tool-tag:hover {
  background: var(--color-highlight-soft);
  border-color: var(--color-highlight);
  color: var(--color-accent);
}

/* --- Languages --- */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.language-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.language-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.language-flag {
  font-size: 2.5rem;
  line-height: 1;
  display: block;
  margin-bottom: var(--space-md);
}

.language-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.language-level {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: var(--space-md);
}

.language-bar {
  height: 4px;
  background: var(--color-surface-alt);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.language-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--level, 0%);
  background: linear-gradient(90deg, var(--color-highlight), var(--color-accent));
  border-radius: 2px;
  animation: fillBar 1.2s var(--ease-out) forwards;
  animation-delay: 0.5s;
  transform-origin: left;
  transform: scaleX(0);
}

@keyframes fillBar {
  to {
    transform: scaleX(1);
  }
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  border-top: 1px solid var(--color-border-soft);
  margin-top: var(--space-xl);
}

.footer p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .section {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .language-bar::after {
    animation: none;
    transform: scaleX(1);
  }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    padding: var(--space-3xl) var(--space-md) var(--space-2xl);
  }

  .main {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .timeline-header {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

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

  .lang-toggle {
    top: var(--space-md);
    right: var(--space-md);
  }

  .hero-contacts {
    flex-direction: column;
    align-items: center;
  }

  .hero-photo img {
    width: 120px;
    height: 120px;
  }

  .recognition-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .languages-grid {
    grid-template-columns: 1fr;
  }

  .education-item {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* --- Print Styles --- */
@media print {
  .lang-toggle { display: none; }
  .hero::before { display: none; }
  
  body {
    font-size: 11pt;
    color: #000;
  }

  .section {
    opacity: 1;
    transform: none;
    animation: none;
    page-break-inside: avoid;
  }

  .skill-card,
  .portfolio-card,
  .timeline-content,
  .education-item,
  .language-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .skill-card:hover,
  .portfolio-card:hover,
  .language-card:hover,
  .education-item:hover {
    transform: none;
    box-shadow: none;
  }
}
