*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --border: #e2dfd8;
  --text: #1a1916;
  --muted: #7a7870;
  --accent: #2b5be0;
  --accent-light: #ebf0ff;
  --tag-bg: #eeecea;
  --tag-text: #4a4843;
  --green: #1d9e75;
  --green-light: #e1f5ee;
  --amber: #ba7517;
  --amber-light: #faeeda;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--accent-light);
  color: var(--accent);
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: "DM Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

section,
.hero {
  scroll-margin-top: 56px;
}

/* HERO */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
}

.hero-label {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero h1 strong {
  font-weight: 500;
}

.hero-desc {
  font-size: 17px;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #1f47c7;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: #ccc;
}

/* SECTIONS */
section {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.section-label i {
  margin-right: 0.5rem;
}

/* SOBRE */
.about-text {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  font-weight: 300;
  max-width: 700px;
}

.about-text strong {
  font-weight: 500;
}

/* SKILLS */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--border);
}

/* EXPERIÊNCIA */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.5s ease both;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-meta {
  padding-top: 2px;
}

.timeline-period {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.timeline-role {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.timeline-bullets {
  list-style: disc;
  padding-left: 1.25rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tag {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--accent-light);
  color: var(--accent);
}

/* FORMAÇÃO */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-period {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
}

.edu-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 3px;
}

.edu-inst {
  font-size: 13px;
  color: var(--muted);
}

.edu-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-top: 4px;
}

.badge-done {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-ongoing {
  background: var(--amber-light);
  color: var(--amber);
}

/* CONTATO */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 25, 22, 0.06);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.contact-value {
  font-size: 14px;
  font-weight: 500;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  animation: fadeUp 0.6s ease both;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  nav {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 4rem 1rem 3rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .timeline-item,
  .edu-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
  }

  .carousel-wrapper {
    gap: 0.35rem;
  }

  .carousel-btn {
    width: 30px;
    height: 38px;
    flex-shrink: 0;
  }
}

/* meus cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  min-width: 320px;
  max-width: 320px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(26, 25, 22, 0.1);
}

.card-image {
  width: 100%;
  height: 170px;
  position: relative;
  overflow: hidden;
  background: #1a1916;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-placeholder svg {
  opacity: 0.2;
}

.card-image-ai {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 70% 25%, rgba(106, 142, 255, 0.7), transparent 34%),
    linear-gradient(135deg, #182345, #293f80 55%, #385dd0);
}

.card-image-ai i {
  font-size: 3.5rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-done-concluido {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
  float: inline-end;
  border-radius: 6px;
}

.badge-done-andamento {
  background: rgb(230, 255, 1);
  color: white;
  border: 1px solid rgba(224, 248, 5, 0.144);
  float: inline-end;
  border-radius: 6px;
}

.badge-wip {
  background: rgba(0, 0, 0, 0);
  color: #b45309;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-challenge {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-desc {
  font-size: 13px;
  color: #6b6b6b;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-status {
  align-self: flex-start;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #8a5b13;
  background: var(--amber-light);
  border-radius: 999px;
  padding: 4px 9px;
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 11px;
  color: #555;
  background: #eeece8;
  border-radius: 6px;
  padding: 3px 9px;
}

.card-footer {
  border-top: 1px solid #e8e5e0;
  padding-top: 1rem;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.project-link:hover {
  opacity: 0.7;
}

/* Carousel */

.contact-grid-cards-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 10px 4px 18px;
  flex: 1;
  min-width: 0;
}

.contact-grid-cards-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.carousel-btn {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.carousel-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.all-projects-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0.5rem 0 0 3.5rem;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.all-projects-link:hover {
  color: var(--accent);
}

.contact-group {
  display: grid;
  gap: 12px;
}

.contact-icon i {
  color: var(--accent);
  font-size: 20px;
}

@media (max-width: 640px) {
  .card {
    min-width: min(280px, calc(100vw - 5rem));
    max-width: min(280px, calc(100vw - 5rem));
  }

  .contact-grid-cards-carousel {
    gap: 12px;
  }

  .all-projects-link {
    margin-left: 2.2rem;
  }
}
