:root {
    --bg: #050508;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --indigo: #6366f1;
    --pink: #a855f7;
    --white: #f8f8ff;
    --muted: #6b7280;
    --glass: rgba(255,255,255,0.03);
    --border: rgba(139,92,246,0.15);
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
    cursor: none;
  }

  /* ── CURSOR ── */
  #cursor {
    position: fixed; top: 0; left: 0;
    width: 12px; height: 12px;
    background: var(--violet);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, background 0.3s;
    mix-blend-mode: difference;
  }
  #cursor-ring {
    position: fixed; top: 0; left: 0;
    width: 40px; height: 40px;
    border: 1px solid rgba(139,92,246,0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.4s ease;
  }

  /* ── CANVAS ── */
  #bg-canvas {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
  }

  /* ── FLOATING SHAPES ── */
  .float-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: floatDrift linear infinite;
  }
  .fs1 { width:500px;height:500px; background:rgba(99,102,241,0.12); top:-100px;left:-150px; animation-duration:25s; }
  .fs2 { width:350px;height:350px; background:rgba(139,92,246,0.1); bottom:10%;right:-100px; animation-duration:30s;animation-delay:-10s; }
  .fs3 { width:250px;height:250px; background:rgba(59,130,246,0.08); top:40%;left:30%; animation-duration:20s;animation-delay:-5s; }

  @keyframes floatDrift {
    0%   { transform: translateY(0) rotate(0deg); }
    33%  { transform: translateY(-40px) rotate(5deg); }
    66%  { transform: translateY(20px) rotate(-3deg); }
    100% { transform: translateY(0) rotate(0deg); }
  }

  /* ── MAX WIDTH WRAPPER ── */
  .inner {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* ── NAV ── */
  nav {
    position: fixed; top: 0; width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5,5,8,0.8) 0%, transparent 100%);
    backdrop-filter: blur(0);
    display: flex; justify-content: center;
  }
  .nav-inner {
    max-width: 1280px; width: 100%;
    padding: 24px 60px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800; font-size: 1rem;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    white-space: nowrap;
  }
  .nav-links { display: flex; gap: 40px; list-style: none; }
  .nav-links a {
    font-size: 0.85rem; letter-spacing: 0.05em; text-decoration: none;
    color: var(--muted);
    transition: color 0.3s;
    font-weight: 400;
  }
  .nav-links a:hover { color: var(--white); }

  /* ── SECTIONS WRAPPER ── */
  main { position: relative; z-index: 1; }

  /* ── HERO ── */
  #hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 120px 60px 100px;
    position: relative;
    overflow: hidden;
    gap: 60px;
    max-width: 1280px;
    margin-left: auto; margin-right: auto;
  }
  .hero-content {
    display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start;
    z-index: 1;
  }
  .hero-visual {
    display: flex; align-items: center; justify-content: center;
    position: relative;
    width: 320px; height: 360px;
    flex-shrink: 0;
    opacity: 0; animation: fadeIn 1s ease 1s forwards;
    z-index: 1;
  }
  .hero-avatar-ring {
    position: absolute; inset: 0;
    border-radius: 38% 62% 55% 45% / 48% 40% 60% 52%;
    border: 1.5px solid rgba(139,92,246,0.45);
    animation: morphRing 8s ease-in-out infinite;
  }
  .hero-avatar-ring-2 {
    position: absolute; inset: -14px;
    border-radius: 55% 45% 38% 62% / 52% 60% 40% 48%;
    border: 1px solid rgba(99,102,241,0.28);
    animation: morphRing 12s ease-in-out infinite reverse;
  }
  .hero-avatar-ring-3 {
    position: absolute; inset: -28px;
    border-radius: 42% 58% 60% 40% / 45% 55% 45% 55%;
    border: 1px dashed rgba(168,85,247,0.2);
    animation: morphRing 16s ease-in-out infinite;
  }
  @keyframes morphRing {
    0%,100% { border-radius: 38% 62% 55% 45% / 48% 40% 60% 52%; transform: rotate(0deg); }
    33%      { border-radius: 55% 45% 42% 58% / 52% 62% 38% 48%; transform: rotate(8deg); }
    66%      { border-radius: 45% 55% 62% 38% / 40% 48% 55% 60%; transform: rotate(-6deg); }
  }
  .hero-avatar-box {
    width: 260px; height: 300px;
    border-radius: 36% 64% 52% 48% / 46% 42% 58% 54%;
    background: linear-gradient(145deg, rgba(99,102,241,0.18) 0%, rgba(139,92,246,0.12) 50%, rgba(168,85,247,0.08) 100%);
    border: 1px solid rgba(139,92,246,0.3);
    backdrop-filter: blur(12px);
    overflow: hidden;
    position: relative;
    animation: morphBox 10s ease-in-out infinite;
    display: flex; align-items: center; justify-content: center;
  }
  @keyframes morphBox {
    0%,100% { border-radius: 36% 64% 52% 48% / 46% 42% 58% 54%; }
    50%      { border-radius: 52% 48% 36% 64% / 58% 54% 46% 42%; }
  }
  .hero-avatar-box::before { display: none; }
  .hero-avatar-initials {
    font-family: 'Syne', sans-serif;
    font-size: 4.5rem; font-weight: 800;
    background: linear-gradient(135deg, rgba(248,248,255,0.25), rgba(139,92,246,0.6));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    user-select: none;
    letter-spacing: -0.04em;
    position: relative; z-index: 1;
  }
  .hero-avatar-img {
    width: 82%;
    height: 82%;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 50%;
    position: relative; z-index: 1;
    display: block;
  }
  .av-float {
    position: absolute;
    padding: 8px 14px;
    background: rgba(5,5,8,0.88);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 50px;
    font-size: 0.73rem; color: rgba(248,248,255,0.8);
    backdrop-filter: blur(12px);
    white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
  }
  .av-float-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--violet);
    box-shadow: 0 0 6px rgba(139,92,246,0.8);
    animation: pulseDot 2s ease infinite;
  }
  @keyframes pulseDot {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
  }
  /* badges: arriba-centro, izquierda-medio, abajo-derecha */
  .avf1 { top: 15px;   left: 50%; transform: translateX(-50%); animation: floatTag 5s ease-in-out infinite; }
  .avf2 { bottom: 149px; left: -141px;                          animation: floatTag 6s ease-in-out infinite; animation-delay: -2s; }
  .avf3 { bottom: -20px; right: -30px;                          animation: floatTag 7s ease-in-out infinite; animation-delay: -4s; }

  /* Nav scrolled */
  nav { transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
  nav.scrolled {
    background: rgba(5,5,8,0.96) !important;
    backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
  }
  .hero-tag {
    font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--violet); margin-bottom: 24px;
    display: flex; align-items: center; gap: 12px;
    opacity: 0; animation: fadeUp 0.8s ease 0.3s forwards;
  }
  .hero-tag::before {
    content: ''; display: block; width: 40px; height: 1px;
    background: var(--violet);
  }
  h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.8rem, 5vw, 3.75rem); /* max ~60px */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 700px;
    opacity: 0; animation: fadeUp 0.9s ease 0.5s forwards;
  }
  h1 .accent {
    background: linear-gradient(135deg, var(--blue) 0%, var(--violet) 50%, var(--pink) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
  }
  @keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
  }
  .hero-sub {
    margin-top: 32px; max-width: 480px;
    font-size: 1.05rem; line-height: 1.7;
    color: rgba(248,248,255,0.5);
    font-weight: 300;
    opacity: 0; animation: fadeUp 0.9s ease 0.7s forwards;
  }
  .hero-cta {
    margin-top: 48px; display: flex; gap: 20px; align-items: center;
    opacity: 0; animation: fadeUp 0.9s ease 0.9s forwards;
  }
  .btn-primary {
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    color: #fff; border: none; border-radius: 50px;
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500;
    letter-spacing: 0.05em; cursor: none; text-decoration: none;
    position: relative; overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 30px rgba(99,102,241,0.3);
  }
  .btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0; transition: opacity 0.3s;
  }
  .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 50px rgba(99,102,241,0.5); }
  .btn-primary:hover::after { opacity: 1; }
  .btn-ghost {
    color: var(--muted); font-size: 0.9rem; text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    transition: color 0.3s;
  }
  .btn-ghost:hover { color: var(--white); }
  .btn-ghost svg { transition: transform 0.3s; }
  .btn-ghost:hover svg { transform: translateX(4px); }

  /* scroll indicator */
  
  
  @keyframes scrollPulse {
    0%,100% { opacity: 0.3; transform: scaleY(1); }
    50%      { opacity: 1;   transform: scaleY(1.1); }
  }

  /* orbiting particles */
  .orbit-ring {
    position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
    width: 420px; height: 420px;
    animation: spin 20s linear infinite;
    opacity: 0; animation: spin 20s linear infinite, fadeIn 1s ease 1s forwards;
  }
  @keyframes spin { from { transform: translateY(-50%) rotate(0deg); } to { transform: translateY(-50%) rotate(360deg); } }
  .orbit-ring svg { width: 100%; height: 100%; }

  /* ── ABOUT ── */
  #about {
    padding: 100px 60px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
    max-width: 1280px; margin-left: auto; margin-right: auto;
  }
  .about-label {
    font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--violet); margin-bottom: 24px;
    display: flex; align-items: center; gap: 12px;
  }
  .about-label::before { content: ''; display: block; width: 30px; height: 1px; background: var(--violet); }
  h2 {
    font-family: 'Syne', sans-serif; font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 28px;
  }
  .about-text { font-size: 1rem; line-height: 1.8; color: rgba(248,248,255,0.5); font-weight: 300; }
  .about-text + .about-text { margin-top: 16px; }
  .skills-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin-top: 48px;
  }
  .skill-pill {
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    color: rgba(248,248,255,0.7);
    transition: border-color 0.3s, transform 0.3s;
    display: flex; align-items: center; gap: 10px;
  }
  .skill-pill:hover { border-color: var(--violet); transform: translateY(-2px); }
  .skill-dot { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--violet)); flex-shrink: 0; }
  .about-visual {
    position: relative; display: flex; justify-content: center; align-items: center;
    height: 400px;
  }
  .av-card {
    width: 280px; height: 360px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.04));
    backdrop-filter: blur(20px);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 24px;
    position: relative; overflow: hidden;
    animation: floatCard 6s ease-in-out infinite;
  }
  .av-photo-card-wrap {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 52px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    display: flex; align-items: center; justify-content: center;
    padding: 12px 12px 0;
  }
  .av-photo-card {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
  }
  .av-badge-overlay {
    position: absolute; top: 12px; right: 12px;
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; z-index: 2;
  }
  @keyframes floatCard {
    0%,100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-20px) rotate(1deg); }
  }
  .av-card::before {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 60% 40%, rgba(139,92,246,0.12) 0%, transparent 60%);
  }
  .av-dots { display: flex; gap: 8px; margin-bottom: 20px; }
  .av-dot { width: 10px; height: 10px; border-radius: 50%; }
  .av-dot:nth-child(1) { background: rgba(99,102,241,0.6); }
  .av-dot:nth-child(2) { background: rgba(139,92,246,0.6); }
  .av-dot:nth-child(3) { background: rgba(168,85,247,0.6); }
  .av-name { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; }
  .av-role { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
  .av-badge {
    position: absolute; top: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
  }
  .floating-tag {
    position: absolute;
    padding: 10px 18px;
    border-radius: 50px;
    background: rgba(10,10,20,0.9);
    border: 1px solid var(--border);
    font-size: 0.78rem; color: rgba(248,248,255,0.7);
    backdrop-filter: blur(10px);
    animation: floatTag 5s ease-in-out infinite;
  }
  .ft1 { top: 20px; left: -10px; animation-delay: 0s; }
  .ft2 { bottom: 40px; right: -20px; animation-delay: -2s; }
  @keyframes floatTag {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
  }

  
  /* ── WORK / FILTERED GRID ── */
  #work { padding: 100px 60px; max-width: 1280px; margin-left: auto; margin-right: auto; }
  .filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
  .filter-btn {
    font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 7px 18px; border-radius: 50px;
    border: 1px solid var(--border);
    background: transparent; color: var(--muted);
    cursor: pointer; transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
  }
  .filter-btn:hover { border-color: rgba(139,92,246,0.5); color: var(--white); }
  .filter-btn.active { background: rgba(99,102,241,0.15); border-color: var(--violet); color: var(--white); }
  .filter-count { font-size: 0.78rem; color: var(--muted); margin-bottom: 40px; }
  .filter-count span { color: var(--white); font-weight: 600; }
  .projects-grid-filter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .pf-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--glass);
    transition: transform 0.35s cubic-bezier(.23,1,.32,1), border-color 0.3s, box-shadow 0.35s, opacity 0.3s;
    cursor: pointer;
    opacity: 1;
  }
  .pf-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139,92,246,0.4);
    box-shadow: 0 24px 60px rgba(99,102,241,0.12);
  }
  .pf-card.hiding { opacity: 0; transform: scale(0.96); }
  .pf-thumb {
    height: 190px; position: relative; overflow: hidden;
  }
  .pf-thumb img {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
    display: block; transition: transform 0.45s ease;
  }
  .pf-card:hover .pf-thumb img { transform: scale(1.04); }
  .pf-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.55), rgba(139,92,246,0.55));
    opacity: 0; transition: opacity 0.3s;
    display: flex; align-items: center; justify-content: center;
  }
  .pf-card:hover .pf-overlay { opacity: 1; }
  .pf-view-btn {
    padding: 10px 22px; border-radius: 50px;
    background: rgba(5,5,8,0.9); border: 1px solid var(--violet);
    color: var(--white); font-size: 0.78rem;
    text-decoration: none; font-family: 'DM Sans', sans-serif;
    transform: translateY(8px); transition: transform 0.3s;
    display: inline-block;
  }
  .pf-card:hover .pf-view-btn { transform: translateY(0); }
  .pf-info { padding: 18px 18px 20px; }
  .pf-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
  .pf-tag {
    padding: 3px 10px; border-radius: 50px;
    border: 1px solid var(--border);
    font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
  }
  .pf-title { font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
  .pf-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

  /* ── SERVICES ── */
  #experience { padding: 140px 60px; max-width: 1280px; margin-left: auto; margin-right: auto; }
  .services-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
    border: 1px solid rgba(200,200,220,0.2); border-radius: 20px; overflow: hidden;
    margin-top: 40px;
  }
  .service-item {
    padding: 48px 40px;
    border-right: 1px solid rgba(200,200,220,0.2);
    position: relative; overflow: hidden;
    transition: background 0.4s;
  }
  .service-item:last-child { border-right: none; }
  .service-item:hover { background: rgba(99,102,241,0.05); }
  .service-item::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 1px; background: linear-gradient(90deg, transparent, var(--violet), transparent);
    transform: scaleX(0); transition: transform 0.4s;
  }
  .service-item:hover::after { transform: scaleX(1); }
  .service-num {
    font-family: 'Syne', sans-serif; font-size: 0.7rem; letter-spacing: 0.2em;
    color: var(--violet); margin-bottom: 24px;
  }
  .service-icon { font-size: 2rem; margin-bottom: 20px; }
  .service-name {
    font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 700;
    margin-bottom: 16px;
  }
  .service-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }

  /* ── EXPERIENCE (ex-services) ── */
  #experience { padding: 100px 60px; max-width: 1280px; margin-left: auto; margin-right: auto; }

  /* ── TIMELINE ── */
  #testimonials { padding: 100px 60px; max-width: 1280px; margin-left: auto; margin-right: auto; }
  .timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 64px;
    position: relative;
  }
  .timeline::before {
    content: '';
    position: absolute;
    top: 18px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--violet), rgba(139,92,246,0.2), transparent);
  }
  .tl-item {
    position: relative;
    padding-top: 40px;
  }
  .tl-dot {
    position: absolute;
    top: 10px; left: 0;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo), var(--violet));
    box-shadow: 0 0 12px rgba(139,92,246,0.6);
  }
  .tl-role {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem; font-weight: 700;
    margin-bottom: 4px;
  }
  .tl-company {
    font-size: 0.88rem;
    color: var(--violet);
    margin-bottom: 4px;
    font-weight: 500;
  }
  .tl-meta {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 20px;
  }
  .tl-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
  }
  .tl-list li {
    font-size: 0.84rem;
    color: rgba(248,248,255,0.6);
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
  }
  .tl-list li::before {
    content: '·';
    position: absolute; left: 0;
    color: var(--violet);
    font-size: 1.2rem; line-height: 1.3;
  }

  /* ── CONTACT ── */
  #contact {
    padding: 100px 60px;
    text-align: center;
    position: relative; overflow: hidden;
    max-width: 1280px; margin-left: auto; margin-right: auto;
  }
  .contact-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 800px; height: 400px;
    background: radial-gradient(ellipse, rgba(99,102,241,0.12) 0%, transparent 70%);
    pointer-events: none;
  }
  #contact h2 { font-size: clamp(2.5rem, 6vw, 5rem); }
  #contact p {
    font-size: 1.05rem; color: rgba(248,248,255,0.4);
    margin: 24px auto 48px; max-width: 440px; line-height: 1.7;
  }
  .contact-form {
    max-width: 560px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 16px;
  }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-field {
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--white);
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
  }
  .form-field::placeholder { color: var(--muted); }
  .form-field:focus { border-color: var(--violet); }
  .form-field.textarea { resize: vertical; min-height: 120px; }
  .contact-links {
    display: flex; justify-content: center; gap: 16px; margin-top: 60px;
  }
  .contact-link {
    padding: 14px 28px;
    border: 1px solid var(--border); border-radius: 50px;
    color: var(--muted); text-decoration: none; font-size: 0.85rem;
    transition: border-color 0.3s, color 0.3s;
    display: flex; align-items: center; gap: 8px;
  }
  .contact-link:hover { border-color: var(--violet); color: var(--white); }

  /* ── FOOTER ── */
  footer {
    padding: 40px 60px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    position: relative; z-index: 1;
    max-width: 1280px; margin-left: auto; margin-right: auto;
  }
  .footer-logo {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  }
  .footer-copy { font-size: 0.8rem; color: var(--muted); }

  /* ── REVEAL ── */
  .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.23,1,.32,1); }
  .reveal.visible { opacity: 1; transform: translateY(0); }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }

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

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

  /* ── HAMBURGER BUTTON ── */
  .nav-hamburger {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; cursor: pointer; z-index: 200;
    background: none; border: none; padding: 4px;
  }
  .nav-hamburger span {
    display: block; width: 100%; height: 2px;
    background: var(--white); border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
  }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ── MOBILE MENU OVERLAY ── */
  .mobile-menu-close {
    position: absolute; top: 24px; right: 24px;
    background: none; border: none;
    color: var(--white); font-size: 1.4rem;
    cursor: pointer; padding: 8px;
    line-height: 1;
    opacity: 0.7; transition: opacity 0.2s;
  }
  .mobile-menu-close:hover { opacity: 1; }
  .mobile-menu {
    position: fixed; inset: 0;
    background: rgba(5,5,8,0.97);
    backdrop-filter: blur(20px);
    z-index: 150;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center; gap: 40px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-menu.open { opacity: 1; pointer-events: all; }
  .mobile-menu a {
    font-family: 'Syne', sans-serif; font-size: 2.2rem; font-weight: 700;
    color: var(--white); text-decoration: none; letter-spacing: -0.02em;
    transition: color 0.2s;
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
  }
  .mobile-menu.open a { opacity: 1; transform: translateY(0); }
  .mobile-menu.open a:nth-child(1) { transition-delay: 0.05s; }
  .mobile-menu.open a:nth-child(2) { transition-delay: 0.1s; }
  .mobile-menu.open a:nth-child(3) { transition-delay: 0.15s; }
  .mobile-menu.open a:nth-child(4) { transition-delay: 0.2s; }
  .mobile-menu a:hover { color: var(--violet); }

  @media (max-width: 767px) {
    .av-photo-card-wrap { bottom: 60px; }
  }

  @media (max-width: 1262px) and (min-width: 768px) {
    .ft2 { bottom: 2px; }
  }
  @media (max-width: 1024px) {
    nav { padding: 0; }
    .nav-inner { padding: 20px 36px; }
    .logo { font-size: 0.95rem; }

    #hero { padding: 100px 36px 60px; gap: 40px; min-height: auto; }
    .hero-visual { width: 240px; height: 280px; }
    /* badges más pegados en tablet */
    .avf2 { bottom: 120px; left: -100px; }
    .avf3 { bottom: -22px; right: -20px; }
    .av-float { font-size: 0.66rem; padding: 6px 10px; }
    #about, #work, #experience, #testimonials, #contact { padding-top: 64px; padding-bottom: 64px; padding-left: 36px; padding-right: 36px; }
    footer { padding: 32px 36px; }

    #about { grid-template-columns: 1fr 1fr; gap: 48px; }
    .timeline { grid-template-columns: 1fr; gap: 36px; }
    .timeline::before { display: none; }

    .projects-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .project-card.featured { grid-column: span 2; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }

    .testi-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    .orbit-ring { width: 300px; height: 300px; right: 2%; }

    /* Tablet: hero text */
    h1 { font-size: clamp(2.6rem, 5vw, 3.4rem); }

    /* Tablet: about visual */
    .av-card { width: 260px; height: 360px; }
    .av-photo-card-wrap { bottom: 72px; }
    .floating-tag { font-size: 0.74rem; }
  }

  /* ── MOBILE (≤ 767px) ── */
  @media (max-width: 767px) {
    body { cursor: auto; }
    #cursor, #cursor-ring { display: none; }

    /* Nav */
    nav { padding: 0; }
    .nav-inner { padding: 16px 20px; }
    .logo { font-size: 0.88rem; letter-spacing: 0.02em; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }

    /* Hero */
    #hero {
      grid-template-columns: 1fr;
      padding: 100px 20px 80px;
      min-height: 100svh;
      gap: 48px;
      align-items: start;
    }
    .hero-content { align-items: flex-start; }
    .hero-visual { display: flex; width: 220px; height: 260px; margin: 0 auto; }
    .av-float { font-size: 0.65rem; padding: 6px 10px; }
    .avf1 { top: -18px; left: 50%; transform: translateX(-50%); }
    .avf2 { left: -90px; bottom: 80px; }
    .avf3 { right: -90px; bottom: -22px; }
    h1 { font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1.1; }
    .hero-sub { font-size: 0.95rem; max-width: 100%; margin-top: 24px; }
    .hero-cta { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 36px; }
    .btn-primary { width: 100%; text-align: center; padding: 15px 28px; }
    .btn-ghost { justify-content: center; }
    .orbit-ring { display: none; }
    /* About */
    #about {
      padding: 60px 20px 20px;
      grid-template-columns: 1fr;
      gap: 20px;
    }
    h2 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
    .about-visual {
      height: auto;
      padding: 40px 0 20px;
      min-height: 340px;
    }
    .about-visual { height: auto; padding: 10px 0 0; min-height: unset; }
    .av-card {
      width: 100%;
      height: auto;
      padding: 0 0 20px;
      max-width: 100%;
      margin: 0;
    }
    .av-photo-card-wrap {
      position: relative;
      height: 280px;
      bottom: unset; top: unset; left: unset; right: unset;
      border-radius: 20px 20px 0 0;
    }
    .av-badge-overlay { top: 10px; right: 10px; }
    .av-name { font-size: 1.1rem; margin: 16px 20px 4px; }
    .av-role { margin: 0 20px 8px; }
    .floating-tag { font-size: 0.71rem; padding: 8px 13px; }
    .ft1 { top: 10px; left: 0; }
    .ft2 { bottom: 20px; right: 0; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }
    .skill-pill { font-size: 0.78rem; padding: 10px 12px; }

    /* Work carousel */
    #work { padding: 56px 20px; }
    .projects-grid-filter { grid-template-columns: 1fr; gap: 14px; }
    .filter-bar { gap: 8px; }
    .filter-btn { font-size: 0.68rem; padding: 6px 14px; }
    .project-card { flex: 0 0 100%; }
    .carousel-controls { margin-top: 24px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 32px; }
    .projects-grid { grid-template-columns: 1fr; gap: 14px; }
    .project-card.featured { grid-column: span 1; }
    .project-card.featured .project-thumb { height: 200px; }
    .project-thumb { height: 180px; }
    .project-info { padding: 18px 16px; }
    .project-name { font-size: 1rem; }
    .project-desc { font-size: 0.82rem; }

    /* Services */
    #services { padding: 56px 20px; }
    .services-grid {
      grid-template-columns: 1fr;
      border-radius: 16px;
      margin-top: 32px;
    }
    .service-item {
      border-right: none;
      border-bottom: 1px solid rgba(200,200,220,0.2);
      padding: 24px 20px;
    }
    .service-item:last-child { border-bottom: none; }
    .service-name { font-size: 1.1rem; }

    /* Contact / Experience */
    #experience { padding: 56px 20px; }
    .services-grid { grid-template-columns: 1fr; border-radius: 16px; margin-top: 32px; }
    .service-item { border-right: none; border-bottom: 1px solid var(--border); padding: 24px 20px; }
    .service-item:last-child { border-bottom: none; }

    /* Timeline */
    #testimonials { padding: 56px 20px; }
    #contact { padding: 56px 20px 40px; }
    .timeline { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
    .timeline::before { display: none; }
    .tl-dot { top: 0; }

    #contact h2 { font-size: clamp(2.2rem, 9vw, 3.5rem); }
    #contact p { font-size: 0.95rem; margin: 20px auto 36px; }
    .contact-form { padding: 0; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .contact-links {
      flex-direction: column; align-items: stretch;
      gap: 10px; margin-top: 36px;
    }
    .contact-link { width: 100%; justify-content: center; }

    /* Footer */
    footer {
      padding: 24px 20px;
      flex-direction: column; gap: 8px; text-align: center;
    }
    .footer-logo { font-size: 0.82rem; }

    /* Ambient shapes — less intrusive on mobile */
    .fs1 { width: 260px; height: 260px; top: -60px; left: -80px; }
    .fs2 { width: 180px; height: 180px; }
    .fs3 { display: none; }
  }

  /* ── SMALL MOBILE (≤ 390px) ── */
  @media (max-width: 390px) {
    .logo { font-size: 0.82rem; }
    h1 { font-size: clamp(1.9rem, 10vw, 2.4rem); line-height: 1.1; }
    h2 { font-size: clamp(1.6rem, 9vw, 2.2rem); }
    .btn-primary { font-size: 0.83rem; padding: 14px 24px; }
    .skills-grid { grid-template-columns: 1fr; }
    .skill-pill { font-size: 0.76rem; }
    .av-card { width: 200px; height: 230px; }
    .floating-tag { font-size: 0.68rem; padding: 7px 11px; }
    .testi-card { padding: 22px 16px; }
    .contact-link { font-size: 0.8rem; padding: 12px 20px; }
  }

.pf-agency {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.pf-agency-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.5;
  flex-shrink: 0;
  margin-top: 4px;
}
.pf-agency strong { font-weight: 600; color: rgba(248,248,255,0.75); }
