/* ============================================================
   PORTFOLIO — MATHEUS SOUZA
   style.css
   ============================================================ */

/* Configurações globais e cores do tema dark */
:root {
  --bg:     #0a0a0c;
  --bg2:    #111116;
  --bg3:    #18181f;
  --card:   #16161d;
  --border: rgba(255,255,255,0.07);
  --blue:   #0070f3;
  --blue2:  #3291ff;
  --text:   #f0ede8;
  --muted:  #8a8794;
  --radius: 14px;
  --font-display: 'Fira Code', monospace;
  --font-body:    'Fira Code', monospace;
  --nav-bg:       rgba(10,10,12,0.72);
  --nav-bg-scroll:rgba(10,10,12,0.95);
}

:root[data-theme="light"] {
  --bg:     #f4f4f6;
  --bg2:    #ffffff;
  --bg3:    #e8e8eb;
  --card:   #ffffff;
  --border: rgba(0,0,0,0.08);
  --blue:   #0056b3;
  --blue2:  #0070f3;
  --text:   #1a1a1c;
  --muted:  #5c5a66;
  --nav-bg:       rgba(255,255,255,0.72);
  --nav-bg-scroll:rgba(255,255,255,0.95);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6vw;
  height: 68px;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
nav.scrolled {
  background: var(--nav-bg-scroll);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.5px;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--blue); }

.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .4px;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width .3s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s, transform 0.2s;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle:hover {
  color: var(--blue);
  transform: scale(1.1);
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../assets/images/profile/fundo.png');
  background-size: cover;
  background-position: center top;
  filter: brightness(.38) saturate(.7);
  transform: scale(1.05);
  animation: slowZoom 20s ease-in-out infinite alternate;
}
@keyframes slowZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.13); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,10,12,.15) 0%,
    rgba(10,10,12,.05) 35%,
    rgba(10,10,12,.75) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 820px; padding: 0 2rem;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--blue2);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp .8s .3s forwards;
}
.hero-tag::before,
.hero-tag::after {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--blue);
  opacity: .6;
}

.hero-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -2px;
  color: #fff;
  opacity: 0;
  animation: fadeUp .8s .5s forwards;
}
.hero-title em { font-style: normal; color: var(--blue); }

.hero-role {
  display: inline-block;
  margin-top: 1rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: rgba(255,255,255,.8);
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeUp .8s .65s forwards;
}
.hero-role strong { color: var(--blue2); font-weight: 600; }

.hero-sub {
  margin-top: 1.2rem;
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  font-weight: 300;
  max-width: 500px;
  margin-left: auto; margin-right: auto;
  opacity: 0;
  animation: fadeUp .8s .75s forwards;
}

.hero-cta {
  margin-top: 2.6rem;
  display: flex; gap: 1rem;
  justify-content: center; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s .9s forwards;
}

.hero-scroll {
  position: absolute; bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2; opacity: 0;
  animation: fadeUp .8s 1.2s forwards;
  display: flex; flex-direction: column;
  align-items: center; gap: .4rem;
}
.hero-scroll p {
  font-size: .7rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.hero-scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1; }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 2.1rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue2);
  border-color: var(--blue2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,112,243,0.38);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
#hero .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.btn-ghost:hover {
  border-color: var(--blue);
  background: rgba(0,112,243,0.05);
}
#hero .btn-ghost:hover {
  border-color: var(--blue2);
  background: rgba(255,255,255,.1);
}

/* ============================================================
   SECTIONS — SHARED
   ============================================================ */
section { padding: 100px 6vw; }

.section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .55rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.section-title em { font-style: normal; color: var(--blue); }

.divider {
  width: 44px; height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin-bottom: 3rem;
}

/* ============================================================
   ABOUT
   ============================================================ */
#sobre { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.about-img-wrap { position: relative; }
.about-img-frame {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
}
.about-img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.9);
  transition: transform .6s ease, filter .4s;
}
.about-img-frame:hover img {
  transform: scale(1.03);
  filter: saturate(1);
}
.about-badge {
  position: absolute;
  bottom: -22px; right: -22px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  line-height: 1.3;
  box-shadow: 0 10px 28px rgba(0,112,243,0.45);
}
.about-badge strong { display: block; font-size: 2.2rem; line-height: 1; }

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.03rem;
}

.about-stats {
  display: flex; gap: 2.8rem;
  margin-top: 2.2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--blue);
  line-height: 1;
}
.stat-label {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .2rem;
}

/* ============================================================
   SKILLS
   ============================================================ */
#habilidades { background: var(--bg); }

.skills-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.skills-header { text-align: center; margin-bottom: 1rem; }
.skills-header .divider { margin-left: auto; margin-right: auto; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.2rem;
  text-align: center;
  font-weight: 500;
  font-size: .88rem;
  color: var(--muted);
  transition: border-color .25s, transform .25s, box-shadow .25s, color .25s;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
}
.skill-card:hover {
  border-color: var(--blue);
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,112,243,0.2);
  color: var(--text);
}
.skill-card img {
  width: 40px; height: 40px;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter .25s;
}
.skill-card:hover img { filter: grayscale(0%); }

/* ── EDUCAÇÃO E CURSOS ── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.education-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.education-card:hover {
  border-color: var(--blue);
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,112,243,0.15);
}

.edu-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.edu-inst {
  font-size: 0.95rem;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 1rem;
}

.edu-status {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(0,112,243,0.1);
  color: var(--blue2);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: auto;
  align-self: flex-start;
}

.edu-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: auto;
}

.edu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.edu-list li {
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  padding-left: 1.2rem;
}

.edu-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--blue);
}

/* ============================================================
   PROJECTS
   ============================================================ */
#projetos { background: var(--bg2); }

.projects-wrap { max-width: 1200px; margin: 0 auto; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .28s, border-color .28s, box-shadow .28s;
}
.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(0,112,243,0.38);
  box-shadow: 0 18px 52px rgba(0,0,0,.55);
}
.project-thumb {
  height: 210px;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.project-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .5s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.05); }

.project-thumb-placeholder {
  font-size: 4rem;
  opacity: .45;
  user-select: none;
}
.project-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(0,112,243,0.1) 0%,
    transparent 55%);
  pointer-events: none;
}

.project-body {
  padding: 1.6rem;
  flex: 1; display: flex; flex-direction: column;
}
.project-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .45rem;
}
.project-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  margin-bottom: .7rem;
}
.project-desc {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
  flex: 1;
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.project-chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip {
  font-size: .7rem;
  font-weight: 600;
  padding: .22rem .65rem;
  border-radius: 50px;
  background: rgba(0,112,243,0.1);
  color: var(--blue2);
  border: 1px solid rgba(0,112,243,0.2);
  white-space: nowrap;
}
.project-link {
  color: var(--muted);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: .3rem;
  white-space: nowrap;
  transition: color .2s;
  /* reset para quando for <button> */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
}
.project-link:hover { color: var(--blue); }

/* ============================================================
   CONTACT
   ============================================================ */
#contato { background: var(--bg); }

.contact-wrap {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.contact-text {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2.6rem;
}
.contact-links {
  display: flex; gap: 1rem;
  justify-content: center; flex-wrap: wrap;
  margin-top: 2rem;
}
.contact-link {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.7rem;
  border-radius: 50px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: border-color .2s, transform .2s, box-shadow .2s, color .2s;
}
.contact-link:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,112,243,0.2);
  color: var(--blue2);
}
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 2rem;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer span { color: var(--blue); }

/* ── WHATSAPP FAB ── */
.fab-wa {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 200;
  width: 54px; height: 54px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.fab-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37,211,102,.65);
}
.fab-wa svg { width: 28px; height: 28px; fill: #fff; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
[id] {
  scroll-margin-top: 80px;
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }


/* ============================================================
   MODAL — GALERIA DE PROJETO
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,5,8,.88);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
  transform: translateY(24px) scale(.97);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

/* scrollbar dentro do modal */
.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 2px; }

/* ── CLOSE ── */
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  width: 36px; height: 36px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.2);
  background: var(--card);
}

/* ── MODAL DE CONTATO ── */
.contact-modal-box {
  max-width: 500px;
  padding: 2.5rem 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0,112,243,0.2);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── GALLERY ── */
.modal-gallery { position: relative; }

.modal-gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0d0d10;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}
.modal-gallery-main img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity .25s ease;
  cursor: zoom-in;
}
.modal-gallery-main img.fading { opacity: 0; }

/* ── LIGHTBOX (imagem ampliada) ── */
.lightbox {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.96);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0,0,0,.8);
  transform: scale(.94);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: fixed; top: 1.2rem; right: 1.2rem;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-close svg { width: 16px; height: 16px; }

/* nav arrows */
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5;
  width: 40px; height: 40px;
  background: rgba(10,10,12,.65);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background .2s, border-color .2s, transform .2s;
}
.gallery-nav svg { width: 18px; height: 18px; }
.gallery-nav:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-50%) scale(1.08);
}
.gallery-prev { left: 1rem; }
.gallery-next { right: 1rem; }
.gallery-nav:disabled { opacity: .25; pointer-events: none; }

.gallery-counter {
  position: absolute; bottom: .9rem; right: 1rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  background: rgba(0,0,0,.5);
  padding: .2rem .6rem;
  border-radius: 50px;
  pointer-events: none;
}

/* thumbnails */
.modal-thumbs-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1rem 0;
  user-select: none;
}
.modal-thumbs {
  display: flex; gap: .5rem;
  overflow-x: hidden; /* esconde scroll nativo */
  scrollbar-width: none;
  cursor: grab;
}
.modal-thumbs:active { cursor: grabbing; }
.modal-thumbs::-webkit-scrollbar { display: none; }

/* barra de rolagem customizada */
.modal-scrollbar {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  margin: .55rem 0 .75rem;
  position: relative;
  cursor: pointer;
}
.modal-scrollbar-thumb {
  position: absolute; top: 0; left: 0;
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  min-width: 32px;
  cursor: grab;
  transition: background .15s, height .15s, top .15s;
}
.modal-scrollbar:hover .modal-scrollbar-thumb,
.modal-scrollbar-thumb.dragging {
  background: var(--blue2);
  height: 6px;
  top: -1px;
}
.modal-scrollbar-thumb.dragging { cursor: grabbing; }

.modal-thumb {
  flex-shrink: 0;
  width: 72px; height: 48px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, opacity .2s;
  opacity: .55;
}
.modal-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.modal-thumb:hover { opacity: .85; }
.modal-thumb.active { border-color: var(--blue); opacity: 1; }

/* ── INFO ── */
.modal-info { padding: 1.6rem 1.8rem 2rem; }

.modal-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -.5px;
  margin-top: .2rem;
}
.modal-desc {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.modal-btn-url { flex-shrink: 0; font-size: .85rem; padding: .6rem 1.4rem; }

/* placeholder quando não há imagem */
.modal-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: var(--bg3);
  color: rgba(255,255,255,.15);
}

/* ── RESPONSIVE ── */

/* Tablets e Mobile Landscape (abaixo de 1024px) */
@media (max-width: 1024px) {
  nav { padding: 0 5vw; }
  
  .nav-links {
    position: fixed;
    top: 68px; left: -100%;
    width: 100%; height: calc(100vh - 68px);
    background: var(--nav-bg-scroll);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 99;
  }

  .nav-links.open { left: 0; }
  
  .nav-hamburger { display: flex; }
  
  .nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.active span:nth-child(2) { opacity: 0; }
  .nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  section { padding: 80px 5vw; }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }
  
  .about-img-wrap { max-width: 500px; margin: 0 auto; }
  
  .divider { margin-left: auto; margin-right: auto; }
  
  .about-stats { justify-content: center; }

  .projects-grid { grid-template-columns: 1fr; }
}

/* Mobile (abaixo de 768px) */
@media (max-width: 768px) {
  .hero-title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  
  .hero-cta { flex-direction: column; width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
  .btn { width: 100%; justify-content: center; }

  .stat-num { font-size: 1.6rem; }
  .stat-label { font-size: 0.75rem; }
  
  .education-grid { grid-template-columns: 1fr; }
  
  .modal-box { width: 95%; max-height: 95vh; }
  
  .modal-gallery-main { aspect-ratio: 4/3; }
}

@media (max-width: 480px) {
  .about-stats { gap: 1.2rem; justify-content: center; }
  .stat-num { font-size: 1.3rem; }
  .stat-label { font-size: 0.6rem; }
  
  .contact-modal-box { padding: 1.5rem 1rem; }
  .contact-form { gap: 0.8rem; }
  .modal-title { font-size: 1.3rem; margin-bottom: 1rem !important; }
  
  .modal-info-header { flex-direction: column; gap: 1rem; }
  .modal-btn-url { width: 100%; justify-content: center; }
  
  .gallery-nav { width: 34px; height: 34px; }
  
  .modal-thumb { width: 60px; height: 40px; }
}

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card);
  color: var(--text);
  padding: 1rem 2rem;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.error {
  border-left: 4px solid #f44336;
}
.toast.success {
  border-left: 4px solid #4caf50;
}

/* ── HIDDEN LOGIN LINK ── */
.footer-hidden-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--muted);
  opacity: 0.05;
  transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
  cursor: default;
}
.footer-hidden-link:hover,
.footer-hidden-link:focus {
  opacity: 0.6;
  color: var(--blue2);
  transform: scale(1.1);
  cursor: pointer;
}
.footer-hidden-link svg {
  width: 14px;
  height: 14px;
}