
    /* =============================================
       VARIÁVEIS & RESET
    ============================================= */
    :root {
      --bg:        #0a0f1e;
      --bg-alt:    #111827;
      --surface:   #1a2235;
      --border:    rgba(255,255,255,0.08);
      --navy:      #1E3A8A;
      --yellow:    #FFC72C;
      --text:      #e2e8f0;
      --muted:     #94a3b8;
      --radius:    14px;
      --nav-h:     70px;
      --transition: 0.35s cubic-bezier(.4,0,.2,1);
      --accent: #FFC72C;
      --accent-ink: #0a0f1e;
      --raised: #1a2235;
      --mono: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
    }

    :root[data-theme=light] {
      --bg:       #f0f4ff;
      --bg-alt:   #e2e8f0;
      --surface:  #ffffff;
      --border:   rgba(0,0,0,0.08);
      --text:     #0f172a;
      --muted:    #475569;
      --accent:   #735000;
      --yellow:   #735000;
      --accent-ink: #fff;
      --raised:   #e2e8f0;
    }

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

    html { scroll-behavior: smooth; }

    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: 'DM Sans', 'DM Sans Fallback', sans-serif;
      line-height: 1.6;
      transition: background-color var(--transition), color var(--transition);
    }

    a { text-decoration: none; color: inherit; }
    ul { list-style: none; }
    img { max-width: 100%; display: block; }

    /* =============================================
       NAVBAR
    ============================================= */
    nav {
      position: fixed;
      top: 0;
      width: 100%;
      height: var(--nav-h);
      z-index: 1000;
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      background: rgba(10,15,30,0.75);
      border-bottom: 1px solid var(--border);
      transition: background var(--transition);
    }

    :root[data-theme=light] nav {
      background: rgba(240,244,255,0.85);
    }

    .nav-inner {
      max-width: 1200px;
      margin: 0 auto;
      height: 100%;
      padding: 0 2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-weight: 600;
      font-size: 1.1rem;
      color: var(--yellow);
    }

    .nav-logo i { font-size: 1.4rem; }

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

    .nav-links a {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: 0.85rem;
      letter-spacing: 0.05em;
      color: var(--muted);
      transition: color var(--transition);
    }

    .nav-links a:hover { color: var(--yellow); }

    .nav-links .btn-contato {
      padding: 0.45rem 1.1rem;
      border: 1px solid var(--yellow);
      border-radius: 6px;
      color: var(--yellow);
    }

    .nav-links .btn-contato:hover {
      background: var(--yellow);
      color: #0a0f1e;
    }

    /* Toggle dark/light */
    .theme-toggle {
      background: none;
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 0.3rem 0.7rem;
      cursor: pointer;
      color: var(--muted);
      font-size: 0.9rem;
      transition: all var(--transition);
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .theme-toggle:hover { color: var(--yellow); border-color: var(--yellow); }
    .theme-toggle .icon-moon { display: block; }
    .theme-toggle .icon-sun  { display: none; }
    :root[data-theme=light] .theme-toggle .icon-moon { display: none; }
    :root[data-theme=light] .theme-toggle .icon-sun  { display: block; }

    /* Hamburguer mobile */
    .hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 4px;
    }

    .hamburger span {
      display: block;
      width: 24px;
      height: 2px;
      background: var(--text);
      border-radius: 2px;
      transition: all var(--transition);
    }

    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* =============================================
       HERO
    ============================================= */
    #home {
      min-height: 100vh;
      display: flex;
      align-items: center;
      padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
      max-width: 1200px;
      margin: 0 auto;
      gap: 4rem;
    }

    .hero-text { flex: 1; }

    .hero-tag {
      display: inline-block;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: 0.8rem;
      color: var(--yellow);
      border: 1px solid rgba(255,199,44,0.35);
      padding: 0.3rem 0.8rem;
      border-radius: 4px;
      margin-bottom: 1.2rem;
      letter-spacing: 0.1em;
    }

    .hero-title {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 700;
      line-height: 1.15;
      letter-spacing: -0.02em;
      color: var(--text);
      margin-bottom: 1rem;
    }

    .hero-title .highlight { color: var(--yellow); }

    #typing-animation {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: clamp(1rem, 2.5vw, 1.3rem);
      color: var(--muted);
      min-height: 2em;
      display: block;
      margin-bottom: 1.5rem;
    }

    .hero-desc {
      font-size: 1rem;
      color: var(--muted);
      max-width: 480px;
      margin-bottom: 2rem;
    }

    .hero-actions {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .btn-primary {
      padding: 0.7rem 1.6rem;
      background: var(--yellow);
      color: #0a0f1e;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.9rem;
      transition: all var(--transition);
      border: none;
      cursor: pointer;
    }

    .btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }

    .btn-outline {
      padding: 0.7rem 1.6rem;
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 8px;
      font-size: 0.9rem;
      transition: all var(--transition);
    }

    .btn-outline:hover { border-color: var(--yellow); color: var(--yellow); transform: translateY(-2px); }

    .hero-photo {
      flex-shrink: 0;
      width: 340px;
      height: 400px;
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid var(--border);
      box-shadow: 0 0 60px rgba(30,58,138,0.3);
      position: relative;
    }

    .hero-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center 15%;
    }

    .hero-photo-placeholder {
      width: 100%;
      height: 100%;
      background: var(--surface);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      color: var(--muted);
    }

    .hero-photo-placeholder i { font-size: 5rem; color: var(--navy); }

    /* =============================================
       SEÇÕES COMUNS
    ============================================= */
    section {
      padding: 6rem 2rem;
    }

    .section-inner {
      max-width: 1200px;
      margin: 0 auto;
    }

    .section-tag {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: 0.75rem;
      color: var(--yellow);
      letter-spacing: 0.15em;
      text-transform: uppercase;
      margin-bottom: 0.5rem;
    }

    .section-title {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: clamp(1.5rem, 3vw, 2.2rem);
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

    .section-line {
      width: 48px;
      height: 3px;
      background: var(--yellow);
      border-radius: 2px;
      margin-bottom: 3rem;
    }

    /* =============================================
       SOBRE MIM
    ============================================= */
    #about { background: var(--bg-alt); }

    .about-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4rem;
      align-items: start;
    }

    .about-text p {
      color: var(--muted);
      font-size: 1rem;
      margin-bottom: 1.2rem;
      line-height: 1.8;
    }

    .about-text p strong { color: var(--text); }

    .about-socials {
      display: flex;
      gap: 1rem;
      margin-top: 2rem;
    }

    .social-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      border: 1px solid var(--border);
      color: var(--muted);
      transition: all var(--transition);
    }

    .social-btn:hover { transform: translateY(-3px); border-color: var(--yellow); color: var(--yellow); }
    .social-btn.linkedin:hover { border-color: #0e76a8; color: #0e76a8; }
    .social-btn.github:hover { border-color: var(--text); color: var(--text); }
    .social-btn.instagram:hover { border-color: #ff2992; color: #ff2992; }

    .about-info { display: flex; flex-direction: column; gap: 1rem; }

    .info-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.2rem 1.5rem;
      display: flex;
      align-items: center;
      gap: 1rem;
      transition: border-color var(--transition);
    }

    .info-card:hover { border-color: rgba(255,199,44,0.3); }

    .info-card i { font-size: 1.3rem; color: var(--yellow); width: 24px; text-align: center; }

    .info-card-text small {
      display: block;
      font-size: 0.72rem;
      color: var(--muted);
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      letter-spacing: 0.05em;
      margin-bottom: 0.15rem;
    }

    .info-card-text span {
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text);
    }

    /* =============================================
       HABILIDADES
    ============================================= */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 1rem;
    }

    .skill-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.4rem 1rem;
      text-align: center;
      transition: all var(--transition);
      cursor: default;
    }

    .skill-card:hover {
      border-color: var(--yellow);
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(255,199,44,0.1);
    }

    .skill-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.6rem;
    }
    .skill-card i { font-size: 2.4rem; }
    .skill-card span { font-size: 0.78rem; font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace; color: var(--muted); letter-spacing: 0.05em; text-align: center; }

    .skill-html  i { color: #F16529; }
    .skill-css   i { color: #2076A0; }
    .skill-js    i { color: #F7DF1E; }
    .skill-py    i { color: #3776ab; }
    .skill-ai    i { color: var(--yellow); }
    .skill-bi    i { color: #F2C811; }
    .skill-azure i { color: #0078D4; }
    .skill-api   i { color: #009688; }
    .skill-db    i { color: #4479A1; }
    .skill-data  i { color: #150458; }
    .skill-flask i { color: #7f8c9b; }
    .skill-map   i { color: #199900; }
    .skill-chart i { color: #FF6384; }

    :root[data-theme=light] .skill-data i { color: #3b3bb3; }

    /* Agrupamento de habilidades por trilha */
    .skill-groups { display: flex; flex-direction: column; gap: 2.5rem; }

    .skill-group-title {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: 0.8rem;
      color: var(--text);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 0.7rem;
    }

    .skill-group-title::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    /* =============================================
       PROJETOS
    ============================================= */
    #projetos { background: var(--bg-alt); }

    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 1.5rem;
    }

    .project-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      transition: all var(--transition);
      display: flex;
      flex-direction: column;
    }

    .project-card:hover {
      border-color: rgba(255,199,44,0.35);
      transform: translateY(-4px);
      box-shadow: 0 12px 32px rgba(30,58,138,0.2);
    }

    .project-thumb {
      height: 180px;
      background: var(--navy);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3.5rem;
      position: relative;
      overflow: hidden;
    }

    .project-thumb::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(30,58,138,0.6), rgba(255,199,44,0.1));
    }

    .project-thumb i { position: relative; z-index: 1; }

    .project-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; gap: 0.8rem; }

    .project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

    .project-tag {
      font-size: 0.7rem;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      padding: 0.2rem 0.6rem;
      border-radius: 4px;
      background: rgba(255,199,44,0.1);
      color: var(--yellow);
      border: 1px solid rgba(255,199,44,0.2);
    }

    .project-title {
      font-size: 1rem;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .project-desc {
      font-size: 0.87rem;
      color: var(--muted);
      line-height: 1.6;
      flex: 1;
    }

    .project-links {
      display: flex;
      gap: 0.8rem;
      margin-top: auto;
      padding-top: 0.8rem;
      border-top: 1px solid var(--border);
    }

    .project-link {
      font-size: 0.8rem;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: color var(--transition);
    }

    .project-link:hover { color: var(--yellow); }

    .badge-wip {
      font-size: 0.65rem;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      padding: 0.15rem 0.5rem;
      border-radius: 4px;
      background: rgba(255,199,44,0.15);
      color: var(--yellow);
      border: 1px solid rgba(255,199,44,0.3);
    }

    .badge-private {
      font-size: 0.65rem;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      padding: 0.15rem 0.5rem;
      border-radius: 4px;
      background: rgba(148,163,184,0.12);
      color: var(--muted);
      border: 1px solid var(--border);
    }

    /* Card com múltiplos blocos de texto: o .project-note (margin-top:auto)
       resolve o rodapé, então os parágrafos não devem disputar o espaço extra. */
    .project-desc.desc-flow { flex: 0 0 auto; }

    .project-list {
      font-size: 0.84rem;
      color: var(--muted);
      line-height: 1.6;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .project-list li {
      padding-left: 1rem;
      position: relative;
    }

    .project-list li::before {
      content: '▸';
      position: absolute;
      left: 0;
      color: var(--yellow);
    }

    .project-note {
      font-size: 0.75rem;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      color: var(--muted);
      margin-top: auto;
      padding-top: 0.8rem;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    /* =============================================
       EXPERIÊNCIA
    ============================================= */
    .timeline { display: flex; flex-direction: column; gap: 0; }

    .timeline-item {
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 2rem;
      position: relative;
    }

    .timeline-item:not(:last-child)::after {
      content: '';
      position: absolute;
      left: 139px;
      top: 28px;
      bottom: -1px;
      width: 1px;
      background: var(--border);
    }

    .timeline-date {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: 0.72rem;
      color: var(--muted);
      text-align: right;
      padding-top: 4px;
      letter-spacing: 0.03em;
    }

    .timeline-body {
      padding: 0 0 2.5rem 2rem;
      border-left: 1px solid var(--border);
      position: relative;
    }

    .timeline-body::before {
      content: '';
      position: absolute;
      left: -5px;
      top: 6px;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--yellow);
      border: 2px solid var(--bg);
    }

    .timeline-role {
      font-weight: 600;
      font-size: 1rem;
      color: var(--text);
      margin-bottom: 0.15rem;
    }

    .timeline-company {
      font-size: 0.82rem;
      color: var(--yellow);
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      margin-bottom: 0.7rem;
    }

    .timeline-desc {
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.7;
    }

    .timeline-desc li {
      list-style: none;
      padding-left: 1rem;
      position: relative;
      margin-bottom: 0.3rem;
    }

    .timeline-desc li::before {
      content: '▸';
      position: absolute;
      left: 0;
      color: var(--yellow);
    }

    /* =============================================
       CONTATO
    ============================================= */
    #contact { background: var(--bg-alt); }

    .contact-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4rem;
      align-items: center;
    }

    .contact-text h2 {
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      font-size: clamp(1.5rem, 3vw, 2rem);
      margin-bottom: 1rem;
      animation: glow 2.5s ease-in-out infinite;
    }

    @keyframes glow {
      0%, 100% { text-shadow: 0 0 20px rgba(255,199,44,0.3); }
      50% { text-shadow: none; }
    }

    .contact-text p { color: var(--muted); margin-bottom: 2rem; }

    .contact-items { display: flex; flex-direction: column; gap: 1rem; }

    .contact-item {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1rem 1.2rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      cursor: pointer;
      transition: all var(--transition);
      text-align: left;
      color: var(--text);
      font-family: inherit;
      font-size: 1rem;
      width: 100%;
    }

    .contact-item:hover { border-color: var(--yellow); transform: translateX(4px); }
    .contact-item i { color: var(--yellow); width: 20px; }
    .contact-item small { display: block; font-size: 0.7rem; color: var(--muted); font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace; }
    .contact-item span { font-size: 0.9rem; }

    .contact-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

    .social-card {
      padding: 1.2rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      text-align: center;
      transition: all var(--transition);
      color: var(--muted);
    }

    .social-card:hover { transform: translateY(-4px); border-color: var(--yellow); color: var(--yellow); }
    .social-card i { font-size: 1.6rem; margin-bottom: 0.4rem; display: block; }
    .social-card span { font-size: 0.78rem; font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace; }

    .toast {
      position: fixed;
      bottom: 2rem;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: var(--yellow);
      color: #0a0f1e;
      padding: 0.7rem 1.5rem;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
      transition: transform 0.4s cubic-bezier(.4,0,.2,1);
      z-index: 9999;
    }

    .toast.show { transform: translateX(-50%) translateY(0); }

    /* =============================================
       FOOTER
    ============================================= */
    footer {
      text-align: center;
      padding: 2rem;
      border-top: 1px solid var(--border);
      font-size: 0.8rem;
      color: var(--muted);
      font-family: 'Fira Code', 'Fira Code Fallback', 'Fira Code Fallback 2', monospace;
    }

    footer a { color: var(--yellow); }

    /* =============================================
       BACK TO TOP
    ============================================= */
    .back-top {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      width: 44px;
      height: 44px;
      background: var(--yellow);
      color: #0a0f1e;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      opacity: 0;
      pointer-events: none;
      transition: all var(--transition);
      z-index: 999;
      animation: bounce 2s infinite;
    }

    .back-top.visible { opacity: 1; pointer-events: all; }

    @keyframes bounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-4px); }
    }


    /* =============================================
       FADE IN SCROLL
    ============================================= */
    .fade-in {
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .fade-in.visible {
      opacity: 1;
      transform: translateY(0);
    }
    /* =============================================
       MOBILE
    ============================================= */
    @media (max-width: 900px) {
      #home { flex-direction: column; padding-top: calc(var(--nav-h) + 3rem); gap: 2rem; }
      .hero-photo { width: 220px; height: 260px; margin: 0 auto; }
      .about-grid { grid-template-columns: 1fr; gap: 2rem; }
      .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
      .timeline-item { grid-template-columns: 1fr; }
      .timeline-date { text-align: left; }
      .timeline-item:not(:last-child)::after { display: none; }

      .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1.5rem 2rem;
        gap: 1.2rem;
      }

      .nav-links.open { display: flex; }
      .hamburger { display: flex; }
    }

dialog{width:min(730px,calc(100% - 32px));max-height:85dvh;overflow-y:auto;padding:32px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text)}dialog::backdrop{background:rgba(8,12,10,.82);backdrop-filter:blur(6px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}.dialog-header .icon-button{display:flex;flex-shrink:0}dialog h2{font-size:32px}.dialog-intro{font-size:15px;color:var(--muted);margin:15px 0 26px;line-height:1.8}.dialog-section{border-top:1px solid var(--border);padding-top:18px;margin-top:18px}.dialog-section h3{font-size:16px;letter-spacing:-.01em;color:var(--accent)}.dialog-section p,.dialog-section li{color:var(--muted);font-size:13px;line-height:1.85}.dialog-section p{margin-top:10px}.dialog-section ul{padding-left:20px}.dialog-section li{margin-bottom:6px}.dialog-links{display:flex;gap:15px;margin-top:25px;flex-wrap:wrap}.dialog-links a{color:var(--accent);font-size:13px;text-decoration:underline;text-underline-offset:4px}.dialog-note{margin-top:25px;font-size:10px;color:var(--muted)}.feedback{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);padding:12px 20px;border:1px solid var(--border);background:var(--raised);color:var(--text);z-index:90;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;font-size:13px;border-radius:5px}.feedback.visible{opacity:1;transform:translate(-50%,0)}

/* Improvements preserve the original portfolio identity and section layout. */
html { scroll-padding-top: 90px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 5px; }
.hero-text { min-width: 0; }
.btn-primary { color: var(--accent-ink); }
.hero-photo { max-width: 100%; }
.hero-tag { letter-spacing: .05em; }
#typing-animation::after { display: none; }
.contact-text h2, .back-top { animation: none; }
.back-top[hidden] { display: none; }
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px,100%),1fr)); }
.project-card[hidden] { display: none; }
.project-thumb { height: 120px; font-size: 2.5rem; }
.project-thumb i { color: #e2e8f0; }
.project-links { flex-wrap: wrap; }
.project-note { margin-top: 0; border: 0; padding-top: 0; }
.project-link.case-link { border: 0; background: none; cursor: pointer; font: inherit; font-size: .8rem; text-align: left; }
.js-control { display: none; }
.enhanced .js-control { display: inline-flex; }
.filter-bar { flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.filter { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); padding: 9px 15px; font: inherit; font-size: .85rem; cursor: pointer; }
.filter.active { background: var(--yellow); color: var(--accent-ink); }
#filter-count { font-size: .8rem; color: var(--muted); margin-left: auto; }
.section-footnote { font-size: .8rem; color: var(--muted); margin-top: 24px; }
#copy-email { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 10px 15px; border-radius: 6px; font: inherit; cursor: pointer; }
.footer-control { background: none; color: var(--muted); border: 0; font: inherit; margin-top: 15px; cursor: pointer; }
.hamburger { border: 0; background: none; }
.reading-progress { position: fixed; top: 69px; left: 0; right: 0; height: 2px; z-index: 1001; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.skip-link { position: fixed; z-index: 2000; top: -100px; left: 20px; background: var(--yellow); color: var(--accent-ink); padding: 10px 20px; }
.skip-link:focus { top: 10px; }
.reveal { opacity: 1; transform: none; }
.enhanced[data-motion=on] .reveal:not(.visible) { opacity: 0; transform: translateY(18px); }
[data-motion=off], [data-motion=off] * { scroll-behavior: auto!important; animation: none!important; transition: none!important; }
[data-motion=off] .reveal { opacity: 1!important; transform: none!important; }
dialog .icon-button { border: 1px solid var(--border); background: none; color: var(--text); width: 38px; height: 38px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.dialog-section { padding: 18px 0 0; }
.dialog-section ul { list-style: disc; }
.tiny-label, .eyebrow { font: 11px/1.6 var(--mono); color: var(--yellow); }
@media(min-width:901px) { .enhanced .hamburger { display: none; } }
@media(max-width:900px) {
 .nav-inner { padding-inline: 20px; }
 .nav-links { font-size: .85rem; }
 html:not(.enhanced) nav { position: relative; height: auto; }
 html:not(.enhanced) .nav-inner { flex-wrap: wrap; padding-block: 15px; }
 html:not(.enhanced) .nav-links { display: flex; position: static; padding: 20px 0 0; width: 100%; }
 html:not(.enhanced) #home { padding-top: 40px; }
 #filter-count { flex-basis: 100%; margin-left: 0; }
}
@media(max-width:350px) { section, #home { padding-inline: 20px; } .hero-title { font-size: 30px; } }
@media(prefers-reduced-motion:reduce) {
 html, *, *::before, *::after { scroll-behavior: auto!important; transition: none!important; animation: none!important; }
 .reveal { opacity: 1!important; transform: none!important; }
}
/* Font Awesome loads without blocking render; reserve icon boxes so its arrival does not shift layout. */
i[class*="fa-"] { display: inline-block; min-width: 1em; min-height: 1em; }
/* Local fallbacks sized to the web fonts' width, so the swap does not rewrap the hero. Ratios measured in Edge. */
@font-face { font-family: 'Fira Code Fallback'; src: local('Consolas'); size-adjust: 109%; }
@font-face { font-family: 'Fira Code Fallback 2'; src: local('Courier New'), local('Liberation Mono'); size-adjust: 100%; }
@font-face { font-family: 'DM Sans Fallback'; src: local('Arial'), local('Liberation Sans'), local('Roboto'); size-adjust: 103%; }

/* ===== Hero entrance (stage 1). Runs from first paint under .intro, set in <head> only when motion is on. ===== */
:root { --flow-line: rgba(148,163,184,.22); --flow-node: rgba(120,150,230,.7); }
:root[data-theme=light] { --flow-line: rgba(30,58,138,.16); --flow-node: rgba(30,58,138,.45); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-line, .hero-title .highlight { display: inline-block; }
#home { position: relative; isolation: isolate; }
.hero-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; animation: hero-fade 1.2s ease both; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(.45em); } }
@keyframes hero-fade { from { opacity: 0; } }
@keyframes hero-unmask { from { transform: scaleY(1); } to { transform: scaleY(0); } }
.intro[data-motion=on] .hero-tag { animation: hero-rise .6s cubic-bezier(.2,.7,.2,1) both; }
.intro[data-motion=on] .hero-line { animation: hero-rise .7s .1s cubic-bezier(.2,.7,.2,1) both; }
.intro[data-motion=on] .hero-title .highlight { animation: hero-rise .7s .22s cubic-bezier(.2,.7,.2,1) both; }
/* Fallback if hero.js never runs: the subtitle still appears. */
.intro[data-motion=on] #typing-animation { animation: hero-fade .3s 1.7s both; }
.intro[data-motion=on] #typing-animation.typing, .intro[data-motion=on] #typing-animation.typed { animation: none; }
#typing-animation.typing .typed-char:not(.on) { opacity: 0; }
#typing-animation .typed-char { position: relative; }
#typing-animation .typed-char.caret::after { content: ''; position: absolute; left: 100%; top: .15em; width: .5em; height: 1em; margin-left: 1px; background: var(--yellow); }
.intro[data-motion=on] .hero-desc { animation: hero-rise .6s .55s cubic-bezier(.2,.7,.2,1) both; }
.intro[data-motion=on] .hero-actions { animation: hero-rise .6s .7s cubic-bezier(.2,.7,.2,1) both; }
.intro[data-motion=on] .hero-photo::after { content: ''; position: absolute; inset: 0; background: var(--bg); transform-origin: top; animation: hero-unmask .9s .25s cubic-bezier(.7,0,.2,1) both; pointer-events: none; }
@media (min-width: 901px) { .enhanced[data-motion=on] .hero-photo img { transform: scale(1.06); } }

/* ===== Sobre: três momentos (stage 2) ===== */
.journey { list-style: none; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 4rem; }
.journey::before { content: ''; position: absolute; left: 0; right: 0; top: 1.1rem; height: 1px; background: var(--border); }
.journey-rail { position: absolute; left: 0; right: 0; top: calc(1.1rem - 1px); height: 3px; border-radius: 2px; background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.journey-step { position: relative; padding-top: 3.2rem; }
.journey-index { position: absolute; top: 0; left: 0; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--yellow); color: var(--yellow); font: 600 .75rem var(--mono); z-index: 1; }
.journey-date { display: block; font: .72rem var(--mono); color: var(--muted); letter-spacing: .03em; }
.journey-title { font: 600 1.05rem var(--mono); color: var(--text); margin: .3rem 0 .6rem; }
.journey-step p { color: var(--muted); font-size: .92rem; line-height: 1.7; }
.journey.live .journey-step { transition: opacity .5s ease, transform .5s ease; }
.journey.live .journey-step.is-active:nth-of-type(2) { transition-delay: .15s; }
.journey.live .journey-step.is-active:nth-of-type(3) { transition-delay: .3s; }
/* Inactive moments only slide; text keeps full contrast. The decorative index dims instead. */
.journey.live .journey-step:not(.is-active) { transform: translateY(16px); }
.journey.live .journey-index { transition: opacity .5s ease; }
.journey.live .journey-step:not(.is-active) .journey-index { opacity: .35; }
.enhanced[data-motion=on] .section-line.reveal { transform-origin: left; }
.enhanced[data-motion=on] .section-line.reveal:not(.visible) { opacity: 1; transform: scaleX(0); }
@media (max-width: 900px) {
  .journey { grid-template-columns: 1fr; }
  .journey::before { left: 1.1rem; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .journey-rail { left: calc(1.1rem - 1px); right: auto; top: 0; bottom: 0; width: 3px; height: auto; transform: scaleY(0); transform-origin: top; }
  .journey-step { padding: 0 0 0 3.4rem; }
}

/* ===== Projetos: thumbs que mostram o fluxo (stage 3). Static frame without JS or with motion off. ===== */
.thumb-svg { position: relative; z-index: 1; width: 100%; max-width: 340px; height: 100%; }
.thumb-svg .t-box { fill: rgba(10,15,30,.35); stroke: rgba(226,232,240,.55); stroke-width: 1.2; }
.thumb-svg .t-hot { stroke: #FFC72C; }
.thumb-svg .t-label { fill: #e2e8f0; font: 500 11px 'Fira Code', 'Fira Code Fallback', monospace; text-anchor: middle; }
.thumb-svg .t-small { font-size: 9.5px; fill: #cbd5e1; }
.thumb-svg .t-link { stroke: rgba(226,232,240,.45); stroke-width: 1.2; fill: none; stroke-dasharray: 3 4; }
.thumb-svg .t-packet, .thumb-svg .t-pin { fill: #FFC72C; }
.thumb-svg .t-ink { stroke: #1E3A8A; stroke-width: 1.2; }
.thumb-svg .t-shape { fill: rgba(255,199,44,.12); stroke: #FFC72C; stroke-width: 1.2; }
.thumb-svg .t-thin { fill: none; stroke-width: .9; }
.thumb-svg .t-ring { fill: none; stroke: rgba(226,232,240,.6); stroke-width: 1.2; }
.thumb-svg .t-hand { stroke: #FFC72C; stroke-width: 1.5; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; }
.thumb-svg .t-check { fill: none; stroke: #FFC72C; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes t-travel { 0% { transform: translateX(0); opacity: 0; } 12%, 82% { opacity: 1; } 100% { transform: translateX(var(--dx)); opacity: 0; } }
@keyframes t-blocked { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 45% { transform: translateX(var(--dx)); opacity: 1; } 60%, 100% { transform: translateX(var(--dx)); opacity: 0; } }
@keyframes t-sequence { 0%, 100% { opacity: .3; } 12%, 55% { opacity: 1; } 75% { opacity: .3; } }
@keyframes t-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes t-spin { to { transform: rotate(360deg); } }
@keyframes t-late { 0%, 70% { opacity: 0; } 80%, 95% { opacity: 1; } 100% { opacity: 0; } }
.enhanced[data-motion=on] .project-card.in-view .t-move { animation: t-travel var(--dur, 3s) var(--delay, 0s) ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-stop { animation-name: t-blocked; }
.enhanced[data-motion=on] .project-card.in-view .t-seq { animation: t-sequence 3.6s var(--delay) ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-pulse { animation: t-glow 3s ease-in-out infinite; }
.enhanced[data-motion=on] .project-card.in-view .t-hand { animation: t-spin 2.8s linear infinite; }
.enhanced[data-motion=on] .project-card.in-view .t-late { animation: t-late 3s ease-in-out infinite both; }
.project-card { position: relative; }
.card-spot { position: absolute; top: 0; left: 0; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,199,44,.13), transparent 65%); pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 2; }
.project-card:hover .card-spot { opacity: 1; }
/* Case-study flow diagram */
.dialog-flow { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding: 18px 0 4px; }
.dialog-flow li { position: relative; font: 12px/1.4 var(--mono); color: var(--text); border: 1px solid var(--yellow); border-radius: 6px; padding: 7px 11px; background: var(--raised); }
.dialog-flow li:not(:last-child)::after { content: '→'; position: absolute; right: -20px; top: 50%; transform: translateY(-50%); color: var(--accent); }
.dialog-flow li:last-child { background: var(--yellow); color: var(--accent-ink); }
.dialog-flow-note { font: 12px var(--mono); color: var(--muted); margin-top: 8px; }
@keyframes flow-in { from { opacity: 0; transform: translateY(8px); } }
.enhanced[data-motion=on] dialog[open] .dialog-flow li { animation: flow-in .4s calc(var(--i) * 140ms) cubic-bezier(.2,.7,.2,1) both; }
@media (max-width: 600px) {
  .dialog-flow { flex-direction: column; align-items: flex-start; gap: 22px; }
  .dialog-flow li:not(:last-child)::after { content: '↓'; right: auto; left: 14px; top: auto; bottom: -21px; transform: none; }
}

/* ===== Competências e timeline (stage 4) ===== */
.competencias { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 1rem; }
.competencia { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .8rem; }
.competencia h3 { font: 600 .95rem/1.4 var(--mono); color: var(--text); }
.competencia h3::before { content: '▸ '; color: var(--yellow); }
.competencia-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.competencia-tags li { font: .78rem/1.4 var(--mono); padding: .3rem .65rem; border-radius: 5px; background: rgba(255,199,44,.1); color: var(--yellow); border: 1px solid rgba(255,199,44,.22); }
.enhanced[data-motion=on] .competencia.fade-in { transition-delay: calc(var(--i) * 40ms); }
.timeline { position: relative; }
.timeline-rail { position: absolute; top: 0; bottom: 0; left: calc(140px + 2rem - 1px); width: 3px; border-radius: 2px; background: var(--yellow); transform: scaleY(0); transform-origin: top; pointer-events: none; }
.timeline-body::before { transition: transform .35s ease; }
.timeline-item.passed .timeline-body::before { transform: scale(1.45); }
@media (max-width: 900px) { .timeline-rail { left: -1px; } .timeline-date { padding-left: 1rem; } }

/* ===== Contato: fechamento (stage 5) ===== */
#contact { position: relative; overflow: hidden; isolation: isolate; }
#contact::before { content: ''; position: absolute; z-index: -1; width: 640px; height: 640px; left: 50%; top: 40%; border-radius: 50%; background: radial-gradient(circle, rgba(255,199,44,.10), transparent 62%); transform: translate(-50%, -50%); pointer-events: none; }
.contact-lead { color: var(--text) !important; font-weight: 500; margin: -1.2rem 0 1.4rem !important; }
.contact-cta { display: inline-flex; align-items: center; gap: .6rem; font-size: 1rem; padding: .9rem 1.8rem; margin-bottom: 1.6rem; box-shadow: 0 10px 30px rgba(255,199,44,.18); }
.cta-arrow { display: inline-block; transition: transform .25s ease; }
.contact-cta:hover .cta-arrow, .contact-cta:focus-visible .cta-arrow { transform: translateX(5px); }
.contact-cta:active, #copy-email:active { transform: scale(.97); }
#copy-email { transition: transform .15s ease, border-color .2s, color .2s; align-self: flex-start; }
#copy-email.copied { border-color: var(--yellow); color: var(--yellow); }
@keyframes cta-nudge { 0%, 100% { transform: none; } 40% { transform: scale(1.05); } 70% { transform: scale(.99); } }
.enhanced[data-motion=on] .contact-cta.visible { animation: cta-nudge .7s .45s ease both; }

/* Contato: o card do e-mail e as redes ficam na mesma linha de base e na mesma altura. */
.contact-grid { align-items: end; }
.contact-socials { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .social-card { padding: 1rem .35rem; } .social-card span { font-size: .72rem; } }
@media (min-width: 901px) {
  .contact-items { flex-direction: row; align-items: stretch; }
  .contact-items .contact-item { flex: 1; min-width: 0; }
  #copy-email { align-self: stretch; align-items: center; white-space: nowrap; }
  .social-card { min-height: 100%; height: 76px; display: flex; flex-direction: column; justify-content: center; }
}

/* =============================================
   CERTIFICADOS
============================================= */
.cert-intro { color: var(--muted); font-size: 14px; margin: -6px 0 28px; }
.cert-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.cert-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .35s; }
.cert-card:hover, .cert-card:focus-visible { transform: translateY(-4px); border-color: var(--yellow); box-shadow: 0 18px 40px -22px rgba(0,0,0,.6); }
.cert-card:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.cert-thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #fff; border-bottom: 1px solid var(--border); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cert-card:hover .cert-thumb { transform: scale(1.04); }
.cert-meta { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.cert-date { font: 11px/1.6 var(--mono); color: var(--yellow); }
.cert-title { font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--text); }
.cert-kind { font-size: 13px; color: var(--muted); }
.cert-cta { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--accent); }

.cert-dialog { width: min(1000px, calc(100% - 32px)); max-height: 94dvh; padding: 26px 28px; overflow-x: hidden; }
.cert-dialog h2 { font-size: 26px; }
.cert-dialog.flying { overflow: visible; }
.enhanced[data-motion=on] .cert-dialog[open] { animation: cert-dialog-in .35s cubic-bezier(.2,.8,.2,1); }
.enhanced[data-motion=on] .cert-dialog[open]::backdrop { animation: cert-fade .35s ease both; }
.cert-stage { display: flex; justify-content: center; perspective: 1600px; padding: 18px 8px 10px; }
.cert-tilt { position: relative; max-width: 100%; transform-style: preserve-3d; transition: transform .25s ease-out; border-radius: 6px; }
.cert-flipper { position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.cert-flipper.flipped { transform: rotateY(180deg); }
.cert-face { width: auto; height: auto; max-width: 100%; max-height: min(64dvh, 620px); border-radius: 6px; background: #fff; box-shadow: 0 28px 60px -24px rgba(0,0,0,.7); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cert-back { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; transform: rotateY(180deg); }
.cert-gloss { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; pointer-events: none; }
.cert-gloss::before { content: ''; position: absolute; top: -10%; bottom: -10%; left: -60%; width: 60%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.7), transparent); transform: skewX(-12deg); opacity: 0; }
.enhanced[data-motion=on] .cert-gloss.shine::before { animation: cert-shine 1.2s .6s cubic-bezier(.35,.6,.2,1) both; }
.cert-glare { position: absolute; inset: 0; border-radius: 6px; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), transparent 55%); opacity: 0; transition: opacity .3s; }
.cert-tilt.glaring .cert-glare { opacity: 1; }
.cert-seal { position: absolute; right: -12px; bottom: -12px; width: 84px; height: 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #fff1b8, #ffc72c 45%, #d99a00 100%); color: #1a1300; font: 700 9.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 10px 24px -8px rgba(0,0,0,.6), inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 0 6px rgba(160,110,0,.35); transform: translateZ(30px) rotate(-12deg); pointer-events: none; }
.cert-seal span { font-size: 24px; line-height: 1; }
.enhanced[data-motion=on] .cert-seal.stamp { animation: cert-stamp .55s 1s cubic-bezier(.3,1.5,.5,1) both; }
.cert-spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #ffd75e; box-shadow: 0 0 8px 2px rgba(255,199,44,.8); pointer-events: none; transform: translate(-50%, -50%); }
.cert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 22px; }
.cert-actions .dialog-links { margin-top: 0; }
.cert-flip { font: 600 13px/1 'DM Sans', 'DM Sans Fallback', sans-serif; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--yellow); background: none; color: var(--accent); cursor: pointer; transition: background .2s, color .2s; }
.cert-flip:hover, .cert-flip:focus-visible { background: var(--yellow); color: var(--accent-ink); }
.cert-flip[hidden] { display: none; }
.cert-dialog .dialog-note { margin-top: 14px; font-size: 12px; }
@keyframes cert-dialog-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes cert-fade { from { opacity: 0; } }
@keyframes cert-shine { 0% { opacity: 0; transform: translateX(0) skewX(-12deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateX(330%) skewX(-12deg); } }
@keyframes cert-stamp { from { opacity: 0; transform: translateZ(30px) scale(2.6) rotate(-45deg); } to { opacity: 1; transform: translateZ(30px) scale(1) rotate(-12deg); } }
@media (max-width: 600px) {
  .cert-dialog { padding: 20px 16px; }
  .cert-dialog h2 { font-size: 21px; }
  .cert-face { max-height: 56dvh; }
  .cert-seal { width: 64px; height: 64px; font-size: 8px; right: -6px; bottom: -6px; }
  .cert-seal span { font-size: 18px; }
}
/* O reset global zera a margem; sem isto os diálogos modais grudam no canto superior esquerdo. */
dialog:modal { margin: auto; }

/* Projetos em 3 colunas no desktop (3 + 3), 2 no tablet, 1 no celular. */
@media (min-width: 1001px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 641px) and (max-width: 1000px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }

/* Cards de formação do "sobre" abrem o certificado. */
.info-link { color: inherit; cursor: pointer; }
.info-link:hover { border-color: rgba(255,199,44,.55); }
.info-link:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.info-go { margin-left: auto; font: .72rem/1 var(--mono); color: var(--accent); transition: transform .25s ease; white-space: nowrap; }
.info-link:hover .info-go, .info-link:focus-visible .info-go { transform: translateX(3px); }

/* Competências: brilho em volta do card no hover, num pseudo-elemento (o card e o título não se mexem). */
.competencia { position: relative; }
.competencia::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--yellow); box-shadow: 0 0 0 1px rgba(255,199,44,.12), 0 0 22px -2px rgba(255,199,44,.35); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.competencia:hover::after { opacity: 1; }

/* Botão de fechar dos diálogos: X desenhado, centralizado, com borda visível e hover discreto. */
dialog .dialog-header .icon-button { display: grid; place-items: center; padding: 0; line-height: 1; border-color: rgba(148,163,184,.35); transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
dialog .icon-button:hover, dialog .icon-button:focus-visible { border-color: var(--yellow); color: var(--yellow); background: rgba(255,199,44,.08); }
dialog .icon-button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.icon-x { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; transition: transform .25s ease; }
dialog .icon-button:hover .icon-x { transform: rotate(90deg); }

/* Thumbs com movimento próprio por projeto. Estado parado (sem JS ou com pausa) continua legível. */
.thumb-svg .t-flash { fill: rgba(255,199,44,.14); stroke: #FFC72C; stroke-width: 1.6; opacity: 0; }
.thumb-svg .t-reject { fill: none; stroke: #fca5a5; stroke-width: 2.2; stroke-linecap: round; opacity: 0; }
.thumb-svg .t-scan { stroke: #FFC72C; stroke-width: 2; stroke-linecap: round; opacity: 0; }
.thumb-svg .t-caret { stroke: #FFC72C; stroke-width: 1.4; }
.thumb-svg .t-inserted { opacity: 0; }
.thumb-svg .t-pick { fill: rgba(255,199,44,.2); stroke: rgba(255,199,44,.6); stroke-width: 1; }
@keyframes t-flash { 0%, 100% { opacity: 0; } 8%, 26% { opacity: 1; } 40% { opacity: 0; } }
@keyframes t-done { 0%, 72% { opacity: 0; } 78%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes t-reject { 0%, 40% { opacity: 0; } 47%, 62% { opacity: 1; } 72%, 100% { opacity: 0; } }
@keyframes t-scan { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: .95; } 50% { transform: translateX(60px); } 90% { opacity: .95; } 100% { transform: translateX(0); opacity: 0; } }
@keyframes t-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes t-typed { 0%, 58% { opacity: 1; } 64%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes t-inserted { 0%, 60% { opacity: 0; } 66%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes t-pick { 0%, 24% { transform: translateY(0); } 32%, 100% { transform: translateY(18px); } }
.enhanced[data-motion=on] .project-card.in-view .t-flash { animation: t-flash 3.6s var(--delay, 0s) ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-done { animation: t-done 3.6s ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-reject { animation: t-reject 3s 1s ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-scan { animation: t-scan 2.4s ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-caret { animation: t-blink 1s steps(1) infinite; }
.enhanced[data-motion=on] .project-card.in-view .t-typed, .enhanced[data-motion=on] .project-card.in-view .t-menu { animation: t-typed 4.4s ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-inserted { animation: t-inserted 4.4s ease-in-out infinite both; }
.enhanced[data-motion=on] .project-card.in-view .t-pick { animation: t-pick 4.4s ease-in-out infinite both; }
/* A regra global de pausa usa `*`, que não alcança pseudo-elementos. */
[data-motion=off] .competencia::after { transition: none; }
