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

  :root {
    --bg:        #080a0f;
    --surface:   #0d1017;
    --surface-2: #14181f;
    --surface-3: #1a1f28;
    --border:    rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text:      #e8e4dc;
    --text-soft: rgba(232, 228, 220, 0.65);
    --muted:     #5a5f6e;
    --accent:    #00d4ff;
    --accent-deep: #00a9cc;
    --accent2:   #ff6b35;

    --font-display: "Bebas Neue", "Impact", sans-serif;
    --font-sans:    "Outfit", "Inter", -apple-system, "Segoe UI", sans-serif;
    --font-mono:    "DM Mono", "JetBrains Mono", "Courier New", monospace;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    overflow-x: hidden;
    position: relative;
  }

  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
  }

  body::after {
    content: '';
    position: fixed; inset: -10%; z-index: 0; pointer-events: none;
    background:
      radial-gradient(ellipse 60% 40% at 20% 20%, rgba(0,212,255,.10) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 80% 80%, rgba(255,107,53,.06) 0%, transparent 65%);
    animation: blobDrift 90s ease-in-out infinite;
    will-change: transform;
  }

  @keyframes blobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(4%, -3%) scale(1.05); }
  }

  /* ===================== LAYOUT ===================== */
  .wrap { position: relative; z-index: 1; }
  .container {
    max-width: 86rem;
    margin: 0 auto;
    padding-inline: 2rem;
  }

  /* ===================== NAVBAR (glass) ===================== */
  header.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding-block: 1.4rem;
    background: transparent;
    border-bottom: 1px solid transparent;
    isolation: isolate;
    transition: background 0.4s ease,
                backdrop-filter 0.4s ease,
                border-color 0.4s ease,
                padding-block 0.3s ease;
  }

  header.site-nav.scrolled {
    background: rgba(8, 10, 15, 0.55);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    
  }

  .nav-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .nav-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.08em;
    color: var(--text);
    text-decoration: none;
    line-height: 1;
    transition: color 0.3s ease;
    margin-right: auto;
    
  }

  @media (max-width: 768px) {
  .nav-logo {
    font-size: 1.75rem;
    letter-spacing: 0.03em;
  }
}

  .nav-logo .accent { color: var(--accent); }

  .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
  }

  .nav-links a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.4s ease;
    position: relative;
    padding-block: 4px;
  }

  .nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
  }

  .nav-links a:hover { color: var(--text); }
  .nav-links a:hover::after { transform: scaleX(1); }

  .nav-mobile-toggle { display: none; }

  .nav-links a.active {
    color: var(--accent);
  }

  .nav-links a.active::after {
    transform: scaleX(1);
  }

  /* ===================== CATEGORY HEADER (iGAMING) ===================== */
  .category {
    padding: 160px 0 40px;
    text-align: center;
    position: relative;
  }

  .category-title {
    font-family: var(--font-display);
    font-size: clamp(72px, 14vw, 180px);
    line-height: 0.92;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
  }

  .category-title .accent { color: var(--accent); }

  .category-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    max-width: 540px;
    margin-inline: auto;
  }

  .category-label span {
    flex: 1;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
  }

  .category-label em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 13px;
    letter-spacing: 0.4em;
    color: var(--accent);
    line-height: 1;
  }

  .category-desc {
    max-width: 620px;
    margin: 0 auto;
    color: var(--text-soft);
    font-size: 20px;
    line-height: 1.7;
  }

  /* ===================== SECTIONS ===================== */
  section.work-section {
    padding: 60px 0;
    max-width: 86rem;
    margin: 0 auto;
    padding-inline: 2rem;
  }

  .s-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
  }

  .s-head-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
  }

  .s-num {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--muted);
  }

  .s-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .s-title .accent { color: var(--accent); }

  /* ===================== CARDS BASE ===================== */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s ease,
                transform 0.5s cubic-bezier(.2, .9, .3, 1.2),
                box-shadow 0.5s ease;
  }

  .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  }


  /* ===================== TRÁFEGO (zoom + glow) ===================== */
  .grid-trafego {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
  .grid-trafego .card { aspect-ratio: 1; }
  .grid-trafego .card.tall { aspect-ratio: 4/5; }
  .grid-trafego .card.wide { aspect-ratio: 16/9; grid-column: span 2; }

  .grid-trafego .card:hover {
    transform: scale(1.04);
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
    z-index: 2;
  }

  /* ===================== POP-UPS (tilt + sombra) ===================== */
  .grid-popups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
  .grid-popups .card { aspect-ratio: 4/5; }

  .grid-popups .card:hover {
    transform: rotate(-2deg) translateY(-6px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow:
      -10px 20px 40px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(0, 212, 255, 0.1);
    z-index: 2;
  }

/* ===================== POP-UP ANIMADO (destaque) ===================== */
  .work-section.popup-anim-section {
    padding: 20px 0 60px;
  }

  .popup-anim-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .popup-anim-label {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
  }

  .popup-anim-frame {
    width: 440px;
    height: 560px;
    position: relative;
  }

  .popup-anim-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    pointer-events: none;
  }

  @media (max-width: 480px) {
    .popup-anim-wrap {
        gap: 25px;
    }

    .popup-anim-frame {
      width: 240px;
      height: 350px;
    }
  }

  /* ===================== BANNERS (lift + borda ciano) =====================
     Layout masonry: grid de 6 colunas que cria padrão "tijolo".
     - .banner.short  (1266×600  ≈ 2.11:1)  → ocupa 2 colunas (de 6)
     - .banner.wide   (1600×375  ≈ 4.27:1)  → ocupa 3 colunas (de 6)
     Combine 3 short numa linha, ou 2 wide numa linha, ou alternâncias.
  ==================================================================== */
  .grid-banners {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }

  .banner {
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s ease,
                transform 0.5s cubic-bezier(.2, .9, .3, 1.2),
                box-shadow 0.5s ease;
  }

  .banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .banner.short {
    grid-column: span 2;
    aspect-ratio: 1266 / 600;
  }

  .banner.wide {
    grid-column: span 3;
    aspect-ratio: 1600 / 375;
  }

  .banner:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  /* ===================== WIDGETS=================== */

  .grid-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
  }

  .widget {
    aspect-ratio: 1552 / 873;
    overflow: visible;
    position: relative;
    transition: transform 0.5s cubic-bezier(.2, .9, .3, 1.2),
                filter 0.5s ease;
    background: transparent;
    border: none;
  }

  .widget img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    transition: filter 0.5s ease;
  }

  .widget:hover {
    transform: translateY(-6px) scale(1.02);
  }

  .widget:hover img {
    filter: drop-shadow(0 12px 36px rgba(0, 212, 255, 0.25));
  }

  /* ===================== WIDGET VIVO (destaque ao final dos widgets) ===================== */
 .work-section .widget-live-section {
    padding: 60px 0 0;
  }

  .widget-live-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .widget-live-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
  }

  .widget-live-num {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--muted);
  }

  .widget-live-name {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--text);
  }

  .widget-live-kind {
    font-size: 16px;
    color: var(--accent);
    font-style: italic;
  }

  .widget-live-desc {
    font-size: 16px;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 720px;
  }

  .widget-live-frame {
    width: 100%;
    height: 460px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #1B1E1C;
  }

  .widget-live-frame iframe {
    width: 100%;
    height: 460px;
    border: 0;
    display: block;
  }

  @media (max-width: 768px) {
    .widget-live-frame {
      height: 420px;
    }
  }

  /* ===================== GAMIFICAÇÃO (3D) ===================== */
  .grid-gamif {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 32px;
    padding: 20px 0;
    perspective: 1200px;
  }

  .gamif-card {
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(.2, .9, .3, 1.4),
                box-shadow 0.6s ease,
                border-color 0.4s;
    cursor: pointer;
    will-change: transform;
  }

  .gamif-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 0;
    padding: 1rem 1rem 3rem;
  }

  .gamif-card img.small {
    transform: scale(0.75);
    padding: 1rem 1rem 2rem;
  }

  .gamif-card:hover {
    transform: rotateY(-8deg) rotateX(4deg) translateZ(20px);
    box-shadow:
      -20px 30px 50px rgba(0, 0, 0, 0.5),
      0 0 60px rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.4);
  }

  .gamif-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, transparent 50%, rgba(255, 107, 53, 0.04) 100%);
    pointer-events: none;
    z-index: 1;
  }


  .gamif-card-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-soft);
  }

  .gamif-card-num {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--accent);
    letter-spacing: 0.04em;
    line-height: 1;
  }

  /* ===================== GAMIFICAÇÃO — Banners promocionais (extras) ===================== */
  .grid-gamif-banners {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
  }

  .gamif-banner {
    height: 200px;
    flex: 0 1 auto;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s cubic-bezier(.2, .9, .3, 1.2),
                box-shadow 0.5s ease,
                border-color 0.4s;
    cursor: pointer;
  }

  .gamif-banner img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: cover;
  }

  .gamif-banner:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.45),
      0 0 50px rgba(0, 212, 255, 0.1);
  }

  @media (max-width: 768px) {
    .grid-gamif-banners {
      flex-direction: column;
      align-items: center;
    }
    .gamif-banner {
      height: auto;
      width: 100%;
      max-width: 500px;
    }
    .gamif-banner img {
      width: 100%;
      height: auto;
    }
  }

  /* ===================== EMAILS ===================== */
  .grid-emails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
  }

  .email-card {
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.4s, transform 0.4s;
    position: relative;
  }

  .email-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
  }

  .email-preview {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0B0E14;
  }

  .email-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  .email-meta {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .email-name {
    font-size: 13px;
    color: var(--text);
    font-weight: 400;
  }

  .email-action {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
  }

  .email-action:hover { color: var(--accent); }

  /* ===================== FERRAMENTAS ===================== */
  #ferramentas .grid-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 450px));
    justify-content: center;
    gap: 35px;
    margin-top: 40px;
  }

  .tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 32px;
    transition: border-color 0.4s, transform 0.4s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,212,255,.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
  }

  .tool-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
  }

  .tool-card:hover::before { opacity: 1; }

  .tool-num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--muted);
  }

  .tool-name {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--text);
  }

  .tool-kind {
    font-size: 13px;
    color: var(--accent);
    font-style: italic;
  }

  .tool-desc {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.6;
    flex: 1;
  }

  .tool-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }

  .tool-stack {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
  }

  .tool-arrow {
    font-size: 14px;
    color: var(--muted);
    transition: color 0.3s, transform 0.3s;
  }

  .tool-card:hover .tool-arrow {
    color: var(--accent);
    transform: translateX(4px);
  }

  /* ===================== CONTATO ===================== */
  #contato {
    padding: 120px 2rem;
    text-align: center;
    position: relative;
  }

  #contato::before {
    content: 'CONTATO';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(120px, 22vw, 280px);
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.06em;
    line-height: 1;
    z-index: 0;
  }

  .contact-inner {
    position: relative;
    z-index: 1;
  }

  .contact-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
  }

  .contact-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 96px);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 16px;
  }

  .contact-title .accent { color: var(--accent); }

  .contact-sub {
    font-size: 18px;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto 40px;
  }

  .contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 30px;
    color: var(--bg);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid var(--accent);
    background: transparent;
    transition: color 0.8s ease, box-shadow 0.45s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }

  /* camada de fundo ciano que recolhe no hover */
  .contact-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform-origin: right center;
    transform: scaleX(1);
    transition: transform 0.6s cubic-bezier(.6, .04, .3, 1);
    z-index: -1;
  }

  /* texto e seta acima da camada */
  .contact-cta > span {
    position: relative;
    z-index: 1;
  }

  /* fix de especificidade pra ganhar do .reveal.on */
  .contact-cta.reveal.on:hover,
  .contact-cta:hover {
    color: var(--accent);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
  }

  .contact-cta:hover::before {
    transform: scaleX(0);
  }

  .contact-secondary {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
  }

  .contact-secondary a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
  }

  .contact-secondary a:hover { color: var(--accent); }

  /* ===================== FOOTER ===================== */
  footer {
    border-top: 1px solid var(--border);
    padding: 28px 2rem;
    max-width: 86rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-wrap: wrap;
    gap: 16px;
  }

  footer .accent { color: var(--accent); }

  .back-to-top {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, border-color 0.3s, transform 0.3s;
    cursor: pointer;
    background: transparent;
    font-size: 14px;
  }

  .back-to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
  }

  /* ===================== SCROLL REVEAL ===================== */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s ease, transform 0.9s ease;
  }

  .reveal.on {
    opacity: 1;
    transform: translateY(0);
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .disabled {
    display: none;
  }

  /* ===================== MOBILE ===================== */
  @media (max-width: 900px) {
    .container { padding-inline: 1.25rem; }

    header.site-nav,
    header.site-nav.scrolled {
      padding-block: 0.875rem !important;
      background: var(--bg) !important;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    .nav-links {
      position: fixed;
      top: 56px;
      left: 0; right: 0;
      flex-direction: column;
      gap: 0;
      background: rgba(8, 10, 15, 0.97);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-top: 1px solid var(--border);
      padding: 0;
      transform: translateY(-110%);
      transition: transform 0.3s ease, opacity 0.3s ease;
      z-index: 99;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
    }

    .nav-links.open {
      transform: translateY(0);
      pointer-events: auto;
      opacity: 1;
      visibility: visible;
    }

    .nav-links li { border-bottom: 1px solid var(--border); }

    .nav-links a { display: block; padding: 18px 20px; }
    .nav-links a::after { display: none; }

    .nav-mobile-toggle {
      display: flex;
      flex-direction: column;
      gap: 5px;
      background: transparent;
      border: 0;
      cursor: pointer;
      padding: 6px;
    }

    .nav-mobile-toggle span {
      display: block;
      width: 22px;
      height: 1.5px;
      background: var(--text);
      transition: 0.3s;
    }

    .nav-mobile-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-mobile-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    .category { padding: 120px 24px 30px; }

    section.work-section { padding: 40px 24px; }

    .s-head { flex-direction: column; align-items: flex-start; }


    #contato { padding: 80px 24px; }

    .grid-banners { grid-template-columns: 1fr; }
    .banner.short, .banner.wide { grid-column: span 1; }
    .grid-widgets { grid-template-columns: 1fr; gap: 24px; }
    .grid-trafego .card.wide { grid-column: span 1; }

    .grid-trafego,
    .grid-popups,
    .grid-gamif {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .grid-trafego .card,
    .grid-trafego .card.tall,
    .grid-popups .card,
    .gamif-card {
      max-width: 100%;
    }

    .grid-gamif {
      padding: 0;
      gap: 14px;
    }

    .gamif-card img {
      padding: 0.75rem 0.75rem 2.25rem;
    }

    .gamif-card-num {
      font-size: 22px;
      top: 12px;
      right: 12px;
    }

    .gamif-card-label {
      font-size: 8px;
      left: 10px;
      bottom: 12px;
    }

    footer { padding: 24px; flex-direction: column; gap: 12px; text-align: center; }
  }

@media (max-width: 600px) {
  .back-to-top {
    width: 42px;
    height: 42px;
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer {
    padding-bottom: 28px;
  }
}

@media (max-width: 360px) {
  .grid-trafego,
  .grid-popups,
  .grid-gamif {
    grid-template-columns: 1fr;
  }

  .grid-trafego .card,
  .grid-popups .card,
  .gamif-card {
    max-width: 260px;
    margin-inline: auto;
  }
}

/* ===================== HOME ===================== */
.home-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 220px 0 80px;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
}

.hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-profile img {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.hero-profile span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-align: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(55px, 7vw, 110px);
  line-height: 0.9;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(17px, 1.5vw, 22px);
  color: var(--text-soft);
  margin-bottom: 32px;
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid var(--accent);
  transition: 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-secondary {
  color: var(--accent);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.18);
}

.home-about {
  padding: 80px 0;
}

.home-about-layout {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: flex-start;
}

.home-about {
  padding: 80px 0;
}

.home-about-layout {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.about-copy .s-num {
  display: block;
  margin-bottom: 24px;
}

.about-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.04em;
  margin-bottom: 34px;
}

.about-copy h2 .accent {
  color: var(--accent);
}

.about-copy p {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 22px;
  max-width: 760px;
}

.skills-card {
  border: 1px solid var(--border);
  background: rgba(13, 16, 23, 0.55);
  padding: 32px;
  margin-top: 45px;
}

.skills-card h3 {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.skill-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.skill-row:last-child {
  border-bottom: 0;
}

.skill-row strong {
  font-size: 16px;
  color: var(--text);
}

.skill-row span {
  color: var(--text-soft);
  text-align: right;
  line-height: 1.5;
}

.home-about-inner {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(32px, 6vw, 96px);
}

.about-text {
  max-width: 820px;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}

.about-text p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 22px;
}

.home-projects {
  padding: 80px 0 120px;
}

.projects-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 42px;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-preview-card {
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  transition: 0.4s ease;
}

.project-preview-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 22px;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-preview-card:hover .project-thumb img {
  transform: scale(1.04);
}

.project-preview-info h3 {
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 18px;
}

.project-tags {
  display: flex;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
}

.home-project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  min-height: 260px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.4s ease;
}

.home-project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.home-project-card span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.home-project-card h3 {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.home-project-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

.contact-socials {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.contact-socials a {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 20px;
  transition: 0.3s ease;
}

.contact-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-info {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 20px;
  transition: 0.3s ease;
}

.contact-line i {
  font-size: 22px;
  width: 22px;
  text-align: center;
}

.contact-line:hover {
  color: var(--accent);
}

.contact-socials {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

@media (max-width: 900px) {
  .home-hero {
    min-height: auto;
    padding: 120px 0 20px;
  }

  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: center;
    justify-items: center;
  }

  .hero-profile {
    align-items: center;
  }

  .hero-profile img {
    width: 96px;
    height: 96px;
  }

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

  .hero-content h1 {
    font-size: clamp(46px, 14vw, 72px);
    line-height: 0.95;
    letter-spacing: 0.02em;
    margin-bottom: 22px;
  }

  .hero-sub {
    font-size: 18px;
    max-width: 320px;
    margin-bottom: 24px;
  }

  .hero-actions {
    width: 100%;
    max-width: 280px;
    gap: 12px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 12px 18px;
    font-size: 11px;
  }

  .home-project-grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-copy h2 {
    font-size: clamp(48px, 16vw, 72px);
    max-width: 100%;
  }

  .about-copy p {
    font-size: 18px;
    line-height: 1.65;
    max-width: 100%;
  }

  .skills-card {
    width: 100%;
    padding: 26px 22px;
    margin-top: 0;
  }

  .skill-row {
    flex-direction: column;
    gap: 8px;
  }

  .skill-row span {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .home-project-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: clamp(64px, 20vw, 96px);
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .about-copy h2 {
    font-size: 52px;
  }

  .about-copy p {
    font-size: 17px;
  }

  .skills-card h3 {
    font-size: 12px;
    line-height: 1.5;
  }
}

/* ===================== ERROR PAGE ===================== */

.error-page {
  min-height: 100vh;
  padding: 40px 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.error-logo {
  position: absolute;
  top: 32px;
  left: 2rem;
}

.error-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.error-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.error-content h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 160px);
  line-height: 0.9;
  letter-spacing: 0.03em;
  margin-bottom: 28px;
}

.error-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.error-title > span {
  display: block;
  line-height: 0.9;
}

.error-title .accent {
  display: inline;
  line-height: inherit;
}

.error-title span:first-child {
  font-size: clamp(72px, 9vw, 150px);
}

.error-title span:last-child {
  font-size: clamp(72px, 9vw, 150px);
  white-space: nowrap;
}

.error-content p {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--text-soft);
  margin-bottom: 38px;
}

span.accent {
  color: var(--accent);
}

@media (max-width: 600px) {
  .error-page {
    padding: 32px 1.5rem;
  }

  .error-logo {
    left: 1.5rem;
    top: 24px;
  }

  .error-content h1 {
    font-size: clamp(64px, 20vw, 92px);
  }
}

@media (max-width: 600px) {
  .home-projects {
    padding-inline: 0;
  }

  .home-project-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-preview-card {
    width: 100%;
    padding: 18px;
  }

  .project-thumb {
    aspect-ratio: 16 / 10;
    margin-bottom: 22px;
  }

  .project-preview-info h3 {
    font-size: 30px;
  }

  .project-tags {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .project-tags span {
    font-size: 10px;
    padding: 7px 12px;
  }
}

@media (max-width: 420px) {
  .project-preview-card {
    padding: 14px;
  }

  .project-tags span {
    font-size: 9px;
    padding: 6px 10px;
  }
}

@media (max-width: 600px) {
  .error-content {
    max-width: 100%;
  }

  .error-content h1 {
    font-size: 64px;
    line-height: 0.92;
    letter-spacing: 0.02em;
    margin-bottom: 22px;
  }

  .error-content p {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 30px;
  }

  .error-actions,
  .error-content .btn-primary,
  .error-content .btn-secondary {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  .error-title {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
    overflow-wrap: normal;
  }

  .error-title > span:first-child {
    font-size: clamp(52px, 18vw, 76px);
  }

  .error-title > span:last-child {
    font-size: clamp(42px, 14vw, 58px);
    white-space: normal;
    text-wrap: balance;
  }

  .error-title .accent {
    display: inline;
  }
}