Tunable critical Casimir forces counteract Casimir–Lifshitz attraction

In developing micro- and nanodevices, stiction between their parts, that is, static friction preventing surfaces in contact from moving, is a well-known problem. It is caused by the finite-temperature analogue of the quantum electrodynamical Casimir–Lifshitz forces, which are normally attractive. Repulsive Casimir–Lifshitz forces have been realized experimentally, but their reliance on specialized materials severely limits their applicability and prevents their dynamic control. Here we demonstrate that repulsive critical Casimir forces, which emerge in a critical binary liquid mixture upon approaching the critical temperature, can be used to counteract stiction due to Casimir–Lifshitz forces and actively control microscopic and nanoscopic objects with nanometre precision. Our experiment is conducted on a microscopic gold flake suspended above a flat gold-coated substrate immersed in a critical binary liquid mixture. This may stimulate the development of micro- and nanodevices by preventing stiction as well as by providing active control and precise tunability of the forces acting between their constituent parts. Casimir forces are normally attractive and cause stiction, that is, static friction preventing surfaces in contact from starting to move. Now, a system exhibiting tunable repulsive critical Casimir forces, relevant for the development of micro- and nanodevices, is demonstrated.


I. INTRODUCTION
Long-ranged forces emerge on microscopic objects when a fluctuating field is spatially confined by them, irrespective of their actual nature.Quantum-electro-dynamical (QED) Casimir forces, for example, act on neighboring uncharged conducting objects because they effectively confine electromagnetic fluctuations of the quantum vacuum 1 .Their generalization at finite temperature and in material media are known as Casimir-Lifshitz forces [1][2][3] .
Since these forces are attractive, they can cause the well-known problem of stiction between the metallic parts of nanodevices, such as those found in micro-and nanoelectromechanical systems (MEMS and NEMS) 4 .This has motivated several recent studies to search for repulsive Casimir-Lifshitz forces both in vacuum [5][6][7] and in media 8,9 .However, these repulsive forces have only been obtained for specifically-engineered systems, e.g., by a careful choice of the materials of the two interacting surfaces and the separating liquid 10 , by using metamaterials with negative refractive index that are not readily available 5 , by coating one of the surfaces with a low-refractive-index material 11 , or by adjusting the concentration of ligands in solution 12 .Recently, experimental studies have shown that a combination of attractive and repulsive Casimir-Lifshitz forces can be used to levitate particles away from a surface 11 , and that they can trap freely floating particles near surfaces leading to the formation of Fabry-Pérot cavities when multiple particles assemble on-top of each other 12 .Despite these advances in the manipulation of nanoparticles, these systems are inherently static and lack any tunable system parameters to allow dynamic control.Critical Casimir forces are the thermodynamic analogue of QED Casimir forces and were first theoretically predicted by Fisher and de Gennes in 1978 13 .They arise, for example, between objects immersed in a binary liquid mixture kept near a second-order phase transition, due to the confinement of the thermal fluctuations of the local concentration of one of the components of a binary mixture (which is the order parameter of the transition) 14 .In soft matter, thermal fluctuations typically occur on molecular length scales (subnanometer) and, accordingly, the effects they produce are generally negligible at larger separations; however, upon approaching the critical point of a second-order phase transition, the fluctuations become correlated on much longer length-scales (up to several microns) and thus can significantly affect the behavior of microscopic systems 14,15 .Importantly, critical Casimir forces can be either attractive or repulsive depending on the surface chemistry of the involved objects [16][17][18] : While the critical Casimir forces between surfaces with similar adsorption preferences (either hydrophilic or hydrophobic) are attractive, they become repulsive when these preferences are opposite.
The first direct experimental measurement of critical Casimir forces was achieved only in 2008 17 : Using total internal reflection microscopy (TIRM), femtonewton forces were measured on a single spherical microscopic particle facing a planar surface, both being immersed in a critical water-lutidine mixture.Since then, these forces have been investigated under various conditions, e.g., by varying the properties of the involved surfaces, demonstrating the occurrence of both attractive and repulsive forces 19 as well as the existence of many-body effects 20 .Studies of the phase behavior of colloidal dispersions in a critical mixture 18,21 have indicated critical Casimir forces as viable candidates to control the self-assembly of microand nanostructures [22][23][24] and quantum dots 25 .In addition, fluctuation-induced effects similar to critical Casimir forces have been investigated, e.g., at the percolation transition of a chemical sol 26 , in the presence of temperature gradients 27 , in granular fluids 28 , and in active matter systems 29,30 .
Here, we experimentally demonstrate that repulsive critical Casimir forces can be used to compensate for attractive Casimir-Lifshitz forces.In particular, we study a microscopic gold flake diffusing above a gold surface immersed in a critical binary liquid mixture.We control the attractive/repulsive character of the critical Casimir forces by chemical functionalization of the gold flake and surface, obtaining repulsive forces for opposite surface functionalizations, and the magnitude of these forces by varying the temperature of the mixture.Far from the critical temperature, we observe stiction between the flake and the surface due to Casimir-Lifshitz forces.However, as we approach the critical temperature, we observe the emergence of repulsive critical Casimir forces that are sufficiently strong to prevent stiction and to release the flake from the surface, above which it then levitates.In addition, we demonstrate that this behavior is reversible and can be employed to actively control the flake position above a structured surface.

A. Working principle
We first describe a simple model to clarify how repulsive critical Casimir forces can be employed to compensate for attractive Casimir-Lifshitz forces, by estimating theoretically the orders of magnitude of the involved forces.We consider two flat parallel plates, as shown in Fig. 1a: One is a thin gold flake (length a = 1520 nm, thickness b = 34 nm) suspended in a critical binary mixture above a gold-coated (thickness 40 nm) glass substrate, which is the second plate.The first plate hovers at a height h above the surface because of the interplay of three forces (see details in Methods IV A): the Casimir-Lifshitz force, which, in this case, is attractive; the critical Casimir force, the character and strength of which can be varied by modifying on the surface functionalization and tuning the solvent temperature; and the electrostatic force, which provides a short-range repulsion between the flake and the substrate.The gravitational force acting on the flake is negligible compared to the other forces acting on the flake in close proximity to the substrate.
The attractive Casimir-Lifshitz force between two metallic plates depends on h as where G CL is the Casimir-Lifshitz free energy per unit area of the system and S is the area of the flake (Ref.31 and Methods IV A).In this case, the force depends on the thicknesses of the flake and of the gold layer deposited on the glass surface, as well as on the dielectric properties of the glass and of the solvent (Methods IV A and Supplementary Fig. S1).The resulting Casimir-Lifshitz forces are plotted as dashed orange lines in Figs.1b, c for two opposite surface treatments of the gold layer.
The critical Casimir forces are induced by the confinement of the critical mixture between the flake and the substrate.Their strength F crit depends on the adsorption preference of the involved surfaces and on the difference ∆T = T − T c between the actual temperature T of the binary mixture and its critical temperature T c .In particular, where ξ(∆T ) is the correlation length of the order parameter of the fluctuations of the mixture depending on ∆T , and θ (h/ξ(∆T )) is a universal scaling function 14 .For the sake of simplicity, in the following we will omit the explicit dependence on ∆T of ξ.Whether the critical Casimir forces are repulsive or attractive depends on the boundary conditions given by the surface preferential adsorption of one of the two components of the mixture (indicated by − or +).We can control these boundary conditions by chemically functionalizing the surfaces with appropriate self-assembled monolayers (SAMs, see Methods IV B).In the case of symmetric boundary conditions (−, −) or (+, +) (i.e., the flake and surface prefer the same component of the mixture), the critical Casimir forces are attractive (dashed blue line in Fig. 1b).For antisymmetric boundary conditions (−, +) (i.e., preference for different components), the critical Casimir forces are repulsive (dashed red line in Fig. 1c).
The electrostatic repulsive force F ES is due to the double layer of counterions in the near proximity of the surface of the flake and of the substrate 32 .According to DLVO theory 33 (neglecting boundary effects), we have where λ D is the Debye screening length of the critical mixture, and P 0 is a parameter with the dimension of a pressure.
The theoretical predictions presented in Figs.1b,c show that, in the configuration we consider at ∆T = −0.1 K, the magnitude of the critical Casimir forces is expected to be larger than that of the Casimir-Lifshitz forces so that we can use the critical Casimir forces to tune the equilibrium position of the flake above the surface.In the case of asymmetric boundary conditions (−, +) (Fig. 1c), this provides an additional repulsion between flake and surface, which can be used to prevent stiction.

B. Experimental setup and analysis
In the experiment we consider a gold flake suspended in a near-critical water-2,6-lutidine mixture (lutidine critical concentration c c L = 0.286 mass fraction, lower critical temperature T c ≈ 310 K, i.e., 34 • C) above a gold-coated surface, as illustrated in Fig. 1a.The gold flakes are fabricated using a wet-chemical synthesis method 34 that produces cetrimonium bromide ligand molecules (CTAB) stabilized single crystalline gold flakes (diameter, d = 3 ± 2 µm) with average thickness of b = 34 ± 10 nm in aqueous solution 12 and of various geometrical shapes (SEM image in Fig. 2a, details in Methods IV B).These flakes are hydrophilic due to the formation of a CTAB bilayer on their surface 35 .For this study, we select flakes with the shape of equilateral hexagons (inset of Fig. 2b) due to their larger degree of symmetry.
The substrate is constituted by a glass slide on which a 35-nm-thick gold coating is deposited by sputtering.In order to control the surface preferential adsorption, the gold coating is chemically functionalized by a SAM of either hydrophilic or hydrophobic thiols by immersing the surface in a 1-mmol thiol solution with different end groups (Methods IV B) 36 .
We tune the temperature of the sample via a two-stage feedback temperature controller with ±20 mK stability 20,37 and thus control the strength of the critical Casimir forces.As anticipated by our theoretical predictions (Fig. 1 and discussion above), a change in the magnitude or sign of the critical Casimir force acting on the flake alters its equilibrium height h above the surface.However, these changes are of the order of few tens of nanometers and, thus, are difficult to measure directly.A more convenient approach consists in measuring the lateral diffusion of the flakes along the substrate, which depends sensitively on their height: the higher (lower) the flake is above the surface, the larger (smaller) its diffusion is.Accordingly, we record a video of the flake's motion for a long period of time (ca. 100 s, with a sample rate of 100 Hz) using a brightfield microscope (Supplementary Fig. S2).Using digital video microscopy, we reconstruct the projection of the flake's position on the xy-plane, where x and y are the Cartesian coordinates along the surface of the substrate (solid line in Fig. 2b, Supplementary Video 1).The flake is freely diffusing along the xy-plane, while its motion along the z-direction (perpendicular to the substrate) is negligible.From the xytrajectory, we calculate the mean square displacement (MSD(t) at time t in Fig. 2c) which, for a freely diffusing flake, grows as MSD(t) = 4Dt where D is the diffusion constant.D can be obtained by fitting the measured MSD (Methods IV C).Since D depends sensitively on h, its value can be used to infer the equilibrium position h of the flake above the surface.
We have calibrated the theoretical reference D(h) (blue line in Fig. 2d) using hydrodynamic simulations of the flake (Methods IV D), which permits a determination of the equilibrium height of the flake with nanometer precision (±1.3 nm), as shown by the black dashed lines in Fig. 2d.In addition, we validated the indirect measurement of h obtained as described above by alternatively measuring the Fabry-Pérot cavity modes (Section II of Supplementary Information).In fact, a microcavity is formed between the flake and the gold substrate, of which we measure the reflectivity spectrum to determine the spatial variation of the cavity thickness using a spectrometer (Methods IV E and Supplementary Fig. S3) 12 .The measured cavity modes in the reflection spectrum at different positions were analyzed by the standard transfer-matrix method 12 .We find that the flake is about 90 ± 10 nm away from the surface inside a critical water-2,6-lutidine mixture at ∆T = −0.5 K, in good agreement with our measurements h = 100 nm using hydrodynamic simulations.

C. Measurement of the Casimir-Lifshitz force
Using the method described in the previous section, we can investigate the separate effects of the various forces on the flake.We start by determining the (attractive) Casimir-Lifshitz force at low temperature ∆T ≈ −1 K, at which the critical Casimir force is negligible (importantly, the Casimir-Lifshitz force and the electrostatic force are not significantly affected by a temperature change up to several K).The Casimir-Lifshitz force can then be determined by comparing the total force (which includes electrostatics) acting on the gold flake above the uncoated glass surface (where the Casimir-Lifshitz force is weak) and the force acting when the flake is above a gold-coated surface.In fact, we observe that the flake suspended above an uncoated glass surface hovers at h ≈ 300 nm (Supplementary Fig. S4), while its equilibrium height reduces to h ≈ 100 nm, when the flake is floating above the gold-coated surface.This fact is largely independent of the gold functionalization and, therefore, of the adsorption properties of the surface (as can be seen from the values of h at low temperature, ∆T = −1 K, in Figs.3b and 3e).This reduction of the value of h is the result of the presence of an attractive Casimir-Lifshitz forces between the gold flake and the gold surface 38 .Further evidence of the nature of this force is provided by the quality of the fit of the experimental data with the theoretical model (Supplementary Fig. S5).In particular, we compare the inferred heights with the theoretical average height of the flake floating above the (i) gold-coated and (ii) uncoated silica surface.This fit allows us to infer the parameters of the electrostatic interaction in the two cases that are important for the theoretical interpretation of the experimental results provided in the following sections (Results II D and II E).The details of the fitting procedure are given in Methods IV A.

D. Interplay between critical Casimir and Casimir-Lifshitz forces
As we showed in Fig. 1c, repulsive critical Casimir forces are theoretically expected to be able to overcome Casimir-Lifshitz forces in magnitude as the solvent's temperature approaches T c .In this section, we provide experimental evidence of this fact.
In Figs.3a-c, we consider an hexagonal hydrophilic flake with a = 700 nm (Fig. 2b) above a hydrophilic surface, realizing symmetric (−, −) boundary conditions.As the temperature of the solution is increased towards T c , the flake's diffusion constant D decreases from ≈ 0.09 µm 2 s −1 to 0.07 µm 2 s −1 (blue squares in Fig. 3a), indicating that the flake's distance from the substrate decreases from 108 ± 7 nm to 68 ± 5 nm (blue squares in Fig. 3b).This decrease is primarily due to an increasingly stronger critical Casimir force (blue symbols in Fig. 3c), but also to an also increase of the Casimir-Lifshitz force (orange crosses in Fig. 3c) as the equilibrium distance h of the flake decreases.The experimental results 39 agree well with theoretical predictions for the Casimir-Lifshitz forces (orange solid line in Fig. 3c), the critical Casimir forces (blue solid line in Fig. 3c), the electrostatic force (green solid line in Fig. 3c), as well as the resulting height of the flake (blue solid line in Fig. 3b) (Methods IV A).
We emphasize that the magnitude of the critical Casimir forces acting on the flake becomes larger than that of the Casimir-Lifshitz forces as the temperature is sufficiently close to T c (i.e., ∆T > −0.3 K) as shown in Fig. 3c.
In Figs.3d-f, we consider the case of a hexagonal hydrophilic flake with a = 840 nm above a hydrophobic surface realizing antisymmetric (−, +) boundary conditions.Interestingly, while the sizes of the two flakes are different, their equilibrium heights h ≈ 100 nm far from T c are similar, confirming that the forces acting per unit area are similar and not affected by the critical Casimir contribution, which would have opposite signs for the two flakes.In this case however, as the temperature approaches T c , the flake's diffusion constant D increases (red circles in Fig. 3d) from ≈ 0.067 µm 2 s −1 to ≈ 0.15 µm 2 s −1 , indicating that its height h above the surface increases (red circles in Fig. 3e).In particular h changes from h ≈ 100 nm at ∆T ≈ −1 K to h ≈ 200 nm at ∆T ≈ −0.1 K.This increase is primarily due to the emergence of repulsive critical Casimir forces (red circles in Fig. 3f), combined with the decrease of the magnitude of the Casimir-Lifshitz forces (orange circles in Fig. 3f) as a consequence of the larger distance between the flake and the substrate.These experimental results fit well with the theoretical predictions (solid lines in Figs.3e-f) (Methods IV A).Also for this case of antisymmetric boundary conditions, the magnitude of the critical Casimir forces eventually exceeds that of the Casimir-Lifshitz force.Interestingly, at ∆T ≈ −0.1 K, the equilibrium height h is increased to a value at which the electrostatic repulsion becomes negligible, the weight of the flake is still much smaller then the Casimir-Lisfhitz attraction at that distance, and thus the attraction of the Casimir-Lifshitz force is essentially balanced by the repulsive critical Casimir force.The electrostatic repulsion in the two cases with different boundary conditions is found to be essentially the same by the fitting procedure (Methods IV A).Thus, this experiment demonstrates that the repulsive critical Casimir forces, as the only tunable repulsive force in the system, can effectively overcome the Casimir-Lifshitz attraction upon approaching the critical temperature T c .

E. Spatio-temporal control
In the following, we experimentally show how a particle confined to a metallic surface by Casimir-Lifshitz attraction can be lifted away from the substrate by the repulsive critical Casimir force and, therefore, start diffusing freely.For this simple proof-of-principle experiment we fabricated gold stripes (width 3 µm) separated by gaps of glass of the same width, as shown in Fig. 4a.We treat the glass stripes and the gold stripes with SAM of opposite wetting properties to make them hydrophilic and hydrophobic, respectively.A hydrophilic gold flake is floating above this configuration.The size of the flake is indicated in Fig. 4a and is comparable to the stripe width.Accordingly, symmetric boundary conditions (−, −) are realized when the flake is entirely above the glass stripes, while the boundary conditions are antisymmetric (+, −) when it is entirely above the gold stripes.In order to study the interplay between the Casimir-Lifshitz forces and the critical Casimir forces, the temperature of the mixture is modulated periodically in time as shown in the inset in Fig. 4a.At temperatures far below T c , i.e. with ∆T ≈ −1.5 K, the flake is essentially confined on the gold stripes by the Casimir-Lifshitz forces, as shown by its trajectory (white line in Fig. 4b).
In fact, one experimentally observes that the flake cannot escape from the gold stripe even at long times, up to tens of minutes.This behavior reveals the presence of an energy barrier that prevents the flake from moving to the neighboring glass stripes.In agreement with the results shown in section II D, we know that the flake hovers at an equilibrium height h ≈ 100 nm over the gold substrate for ∆T −0.5 K. Instead, when T is increased towards T c , repulsive critical Casimir forces emerge and lift the flake away from the gold stripe, similar to what we have experimentally observed in Fig. 3e.Thus, the flake freely diffuses away from the gold stripe and, eventually, reaches the glass stripe.Here, due to the symmetric boundary conditions it is attracted towards the glass by the presence of attractive critical Casimir forces (Fig. 4c).Only after decreasing T far below T c , does the critical Casimir force diminish sufficiently for the flake to get attracted and trapped onto a gold stripe again.This cycle can be repeated by adjusting the temperature of the system, resulting in continuous transitions between gold and glass stripes, as shown in Figs.4b-i and in Supplementary Video 2. The complete trajectory is shown in Fig. 4j, which is color-coded based on the measured temperature: It can be seen that the transitions between adjacent stripes only occur after T c (dark red) has been reached.This experimental behavior can be explained by a theoretical model explained in details in Section III of the Supplementary Information.In the theoretical model describing a flake suspended on a substrate coated with gold stripes, the flake is subject to a potential U (∆T ; x, h) (see Supplementary Fig. S6a-h), which is a periodic function of the coordinate x of the center of the flake along the direction perpendicular to the stripes.As discussed in details in Methods IV A, the dynamics of the suspended flake along the x direction for a fixed ∆T is ruled by an effective potential U eff (∆T ; x) (see Supplementary Fig. S6i-p).
For ∆T −1 K, the minimum of U eff is located in the middle of the gold stripe (Supplementary Fig. S6i), where the probability density distribution P eff (∆T ; x) has a sharp peak (Supplementary Fig. S6q).Upon decreasing ∆T the peak of P eff becomes less pronounced, though remaining localized at the center of the gold stripe.Eventually, for ∆T ≈ −0.1 K, the probability distribution develops two comparable peaks (Supplementary Fig. S6v), the second being localized at the center of the silica stripe.For ∆T −0.08 K, this second peak becomes predominant (Supplementary Fig. S6x), in agreement with previous results in the literature [40][41][42] .
The stiffness of the lateral Casimir-Lifshitz force trapping the flake on the gold stripe when T T c can be quantified by measuring the effective attractive potential to which the flake is subject.This is done by calculating the probability distribution P exp (x) of the x-component of the trajectories shown in Figs.4b, d, f, h from which the effective potential U exp (x) is determined by inverting the Boltzmann factor, i.e., U exp (x) = −k B T ln (P exp (x)).
The resulting experimental potentials are shown by the dashed lines in Fig. 4k, which are then fitted to a harmonic potential U (x) = k 2 x 2 (black solid line in Fig. 4k) with stiffness k ≈ 0.1 pN µm −1 .Comparing with the theoretical model (Supplementary Fig. S7), we see that we can obtain a value of the stiffness of the same order of magnitude for an appropriate range of the flake's size.

III. CONCLUSIONS
We provided here a direct experimental evidence of the fact that critical Casimir forces can be employed to counteract the attraction due to Casimir-Lifshitz forces.We demonstrated this by studying the average height in equilibrium of a gold flake above different surfaces (gold, glass) with various preferential adsorptions (hydrophilic, hydrophobic) for the two components of the water-2,6-lutidine mixture.We determined the height of the flake above the surface, with tens of nanometer precision, by measuring its diffusion constant.In a simple proof-of-principle configuration, we have demonstrated that we can control the trapping of a metallic flake due to the lateral Casimir-Lifshitz attraction and reversibly switch between trapping and release by tuning the temperature of the critical binary liquid mixture where the flake is dispersed, achieving a precise spatio-temporal control of its position in space.Our method provides a novel way of controlling the distances of metallic micro-and nanostructures using tunable critical Casimir forces to counteract forces such as the Casimir-Lifshitz force, thereby preventing stiction and device failure.Moreover, this path opens up new possibilities for the dynamic control of MEMS and NEMS where the temperature of the system could be controlled via light illumination, enabling faster transitions and higher selectivity for a new generation of micromembranes ubiquitously found in MEMS and NEMS devices.

A. Calculation of the Casimir-Lifshitz and critical Casimir forces
The theoretical model which relates the measured experimental temperatures to the equilibrium heights of the flake in the presence of two different boundary conditions of the order parameter, accounts for the following forces: weight and buoyancy of the flake, DLVO electrostatic interaction, Casimir-Lifshitz force, and critical Casimir force.
Weight and buoyancy.For the hexagonal flakes used in our experiments (Fig. 2a) the sum of the weight and the buoyancy is within the range of 5 to 30 fN, depending on the volume of the flake.In the case of a flake suspended above a gold-coated substrate, the sum of weight and buoyancy is negligible in comparison with the Casimir-Lifshitz attraction and the electrostatic forces, the magnitude of which is within the range ≈ 1 to 10 pN for distances of the order of ≈ 100 to 200 nm, such as those observed in our experiments.In the case of a flake suspended above an uncoated silica substrate, instead, the sum of weight and buoyancy is not negligible compared to the other relevant forces because the flake hovers at a higher h and the Casimir-Lifshitz attraction is ≈ 20 times smaller (for the same h).Hence, we have included weight and buoyancy in all theoretical modelling, even though omitting their contribution for the gold-coated substrate does not change the results for the explored experimental parameters.
Electrostatic force.The DLVO electrostatic force 32 F ES between the flake and the substrate, at a distance h, is modelled as where S is the area of the hexagonal flake, λ D is the Debye screening length of the critical mixture, and P 0 is a parameter with the dimension of a pressure.For each experimental condition we fitted the parameters independently, choosing the combinations of λ D and P 0 that minimises the χ 2 when comparing the experimental data for h with the model.We As expected, these three independent fits give very similar values of λ D , while the value of P 0 in the case of uncoated silica is significantly larger than in the case of gold-coated substrate, indicating a stronger electrostatic repulsion.
Casimir-Lifshitz force.The Casimir-Lifshitz force F CL in Eq. 1 has been calculated according to Ref. 31 for the layered planar bodies involved in the experimental setup in Fig. 1a.The corresponding free energy per unit area is given by where A 2/3 , A 1/3 , A 2/4 , and A 1/4 are the Hamaker's functions, a 1 is the thickness of the gold layer on the substrate, and d is the thickness of the gold flake.In the simpler case of a bottom slide of uncoated silica, instead, the dispersion forces can be derived from where A 5/3 and A 5/4 are the corresponding Hamaker's functions.See also Section I of Supplementary Information., where ξ 0 ≈ 0.22 nm for the water-2,6lutidine mixture while ν 0.63 is the critical exponent of the Ising universality class to which the mixture belongs 18 .
Total force and potential.The total force F tot acting on a flake is where the term F w+b due to weight and buoyancy can be neglected in the case of a flake suspended on a gold-coated substrate at the typical distances observed in our experiments, as explained above.The total potential U tot of the flake is therefore: Such potential is necessarily asymmetric, being defined only for h > 0. In the case of a gold flake floating on a gold-coated substrate, U tot (h, ∆T ) displays a very sharp minimum at a certain h(∆T ) for all ∆T , while for the flake suspended on an uncoated silica substrate the minimum of the potential becomes shallow for |∆T | 0.1 K.
In comparing with the experiments, one has to keep in mind that the experimentally accessible quantity is the average height of the potential h .
which is defined in terms of the equilibrium probability distribution function P (h, ∆T ) associated with the potential U (h, ∆T ): where dh.Hence, the comparison with the experimental data must consider the equilibrium height of the potential h, defined as: In a potential with a sharp dip, h and h are often very close, and therefore h can be estimated by h.In contrast, in a shallow, asymmetric potential, the equilibrium height h can differ significantly from the average height h .In the experimental conditions considered here, the difference between h and h for a gold flake suspended on an uncoated silica surface is | h − h eq | ≈ 50 − 100nm, while when the flake is suspended on a gold substrate this difference is < 5 nm.
In order to compare the predictions of the model discussed above with the experimental data, we focus on the average height h due to the total potential considering also the amplitude ∆h of its fluctuations.In our calculation and fitting procedure, ∆h is set to correspond to a confidence level of 68%.Only F crit (h) and U crit (h) depend significantly on the minute variations of ∆T (via the dependence on ξ(t) of the scaling function θ (h/ξ), Eq. ( 2)).The electrostatic and Casimir-Lifshitz interactions do not depend on ∆T , with the caveat that, when the correlation length ξ of the solvent becomes comparable with the Debye screening length λ D of the electrostatics, other effects might come into play.In fact, when λ D becomes comparable with ξ, the description of the electrostatics with Eq. ( 4) is not appropriate anymore.Given that the estimated value of the Debye screening length is λ D 16 − 17 nm, the value of the corresponding correlation length ξ 43 is smaller than λ D for the typical temperature differences in our system up to ∆T 0.1 K.
We first determined the parameters of the electrostatic interaction by fitting the value of the Debye screening length λ D and the prefactor P 0 such that they minimize where h j and ∆h j were calculated for each different combination of parameters for the experimental temperature ∆T j of the experimental data h j,exp .The fitted λ D is in the range of values obtained in similar experiments 20,37 .

B. Experimental details
We consider a dilute suspension of gold flakes (monocrystalline, polydisperse, and with average thickness d = 34 ± 10 nm determined via AFM measurements 12 ).The gold nanoflakes are wet-chemically synthesized using a rapid and seedless method in aqueous solution described in details in Ref. 34.Briefly, 100 µl of 100 mM HAuCl 4 is added to 3 ml of 20 mM CTAB aqueous solution in a glass vial, and the mixture is gently mixed and left undisturbed for several minutes.Then, 100 µl of 100 mM ascorbic acid is added to the mix- A schematic of the experimental setup is shown in Supplementary Fig. S2.The whole sample is temperature-stabilized by using a two-stage temperature controller consisting of a copper-plate heat exchanger coupled to a circulating water bath at T 0 = 32.5 • C (T100, Grant Instruments) and two Peltier elements (TEC3-6, Thorlabs) attached to the imaging objective and in feedback with a controller unit (TED4015, Thorlabs) reaching ±20 mK temperature stability 20,37 .The flake's translational motion is captured using digital video microscopy at a frame rate of 100 Hz.The particle images are thresholded to determine the particle's centroid.The reconstructed trajectory is then analyzed using standard methods 45,46 .

C. Diffusion of a flake
The determination of the equilibrium height h of a flake depends on three crucial factors: the measurement of the diffusion constant D, the hydrodynamic simulations for extracting h from D, and the presence of spurious concentrations of salt in solution, as discussed below.In principle, the diffusion constant D depends on the flake diffusion in three spatial dimensions.
However, as the flake has a mass density ρ Au ≈ 17 • 10 3 kg m −3 much larger than that of the surrounding fluid (ρ WL ≈ 0.98 • 10 3 kg m −3 ), it settles quickly from bulk into proximity of the substrate at an equilibrium distance h so that, in practice, we observe its motion along the horizontal xy-plane only, whereas any motion along the vertical direction z is negligible: a theoretical estimate based on the potential we obtain with our model (Methods IV A) gives that a typical amplitude of the the longitudinal fluctuation ∆h is within ∆h 5 nm.
The presence of salts in solution, which further screen the flake, might reduce the repulsive electrostatic forces and therefore its heights above surface, as it was previously studied 12 .
However, we can neglect any influence of salt in our system, as our gold flakes, originally prepared in CTAB buffer solution, have been diluted more than 2000 times with deionized water.This is confirmed by the fact that, even after the surface treatment with SAM or in control experiments in pure water, the average height h ≈ 100 nm of the flake does not change (Supplementary Fig. S4).

D. Hydrodynamic Simulations
In our hydrodynamics simulations, a flake is modelled as a rigid assembly of N spheres (typically, N ≈ 1000 to 3000) of radius r, with r = b/2 where b is the thickness of the flake, glued together and arranged on a regular hexagon.The assembled object is immersed in an incompressible Newtonian fluid bounded by a no-slip wall.At low Reynolds numbers, the fluid dynamics is governed by the Stokes equations in which viscous forces dominate inertial forces 47 .Under these conditions, the translational velocity V i of the sphere labelled by the index i = 1, . . ., N and composing the conglomerate is linearly related to the force F j exerted on either the same sphere (j = i) or on adjacent spheres via the hydrodynamic mobility tensor 48 .Specifically, where µ S denotes the self-mobility tensor of a single sphere sedimenting near a hard wall and µ P corresponds to the pair-mobility tensor quantifying the hydrodynamic interactions between the spheres and the wall 49 .Here, we employ the well-established Rotne-Prager approximation 50 combined with the Blake solution 51 to account for the corrections due to the presence of the wall.The diffusion coefficient is obtained from the drag coefficient, which, in turn, is obtained by following the usual procedure of evaluating the mean drag per sphere within the assembly 52 .The accuracy of our approach has been assessed by close comparison of the predicted bulk drag coefficients with the exact numerical simulations of a closely packed conglomerate of spheres which was obtained by using the freely available and open-source library HYDROLIB 53 (Supplementary Fig. S10).
These results allow us to simulate the diffusion of a regular hexagonal flake with side length a at height h above a wall as in the representative case of a flake with a = 840 nm in Fig. 2d (cases of particles with different sizes are shown in Supplementary Fig. S11).
Moreover, hydrodynamic simulations allow us to investigate the influence of a possible Brownian rotation on the diffusion of the flake in the presence of the confining interface, which we find to be negligible.As a last remark about the hydrodynamic simulation, its underlying assumption is that the viscosity of the solvent does not depend significantly on the temperature.This is actually the case in experiments: in fact, the viscosity of waterlutidine at critical concentration does not change appreciably in the temperature range of our experiments 54,55 .Moreover, we do not possess experimental evidence of the presence of a wetting layer.

E. Optical measurements and analysis
Reflection spectra at normal incidence (NA = 0.5) were collected by using an inverted microscope (Nikon Eclipse TE2000-E) equipped with an oil-immersion 100× objective (switchable NA = 0.5 to 1.3, Nikon), directed to a fiber-coupled spectrometer (Andor Shamrock SR-303i), equipped with a CCD detector Andor iDus 420 (see schematic in Ref. 12).Obtained reflection spectra were analyzed by the standard transfer-matrix method, described further in Ref. 12.

Figure 1 .
Figure 1.Casimir-Lifshitz and critical Casimir forces between parallel plates.a. Schematic (not to scale) of a hydrophilic (−) gold flake hovering at an equilibrium height h above a glass surface coated with a gold layer and treated with self-assembled monolayers (SAM) to control the preferential surface adsorption.b.Forces acting on a hydrophilic flake above a hydrophilic (blue layer, inset) surface as a function of its height h.Since the boundary conditions are symmetric (−, −), both the Casimir-Lifshitz forces (dashed orange line, Eq. (6)) and the critical Casimir forces (dashed blue line, Eq. (2) at ∆T = T − T c = −0.1 K, with T the solution temperature and T c the critical temperature for the critical binary mixture) are attractive.The total force (black line) including also a repulsive electrostatic component (dashed green line) vanishes at h ≈ 80 nm.c.Forces on a hydrophilic (−) flake above a hydrophobic (+) surface (red layer, top inset) as a function of h.Here, the antisymmetric (−, +) boundary conditions induce a repulsive critical Casimir force (dashed red line, Eq. (2) at ∆T = −0.1 K), while the Casimir-Lifshitz forces (dashed orange line, Eq. (6)) remains attractive.Accordingly, the total force vanishes at much larger h ≈ 210 nm (see bottom inset).The presence of repulsive critical Casimir forces raises the equilibrium height of the flake above the surface greatly.The forces shown in b and c are calcualted for a 34-nm-thick 1520-nm-wide gold flake suspended in water-2,6-lutidine above a 40-nm-thick gold layer.

Figure 2 .
Figure 2. Hydrodynamic measurement of flake height above the substrate.a Scanning electron microscope image of gold flakes with various sizes and shapes.The scale bar represents 5 µm.b Microscope image and trajectory recorded for 100 s of a diffusing flake shaped as equilateral hexagon with side a = 840 nm (inset) in a critical water-2,6-lutidine mixture at ∆T = −0.5 K (Supplementary Video 1).c Experimental data (blue circles) and theoretical fitting (orange line) of the mean square displacement (MSD) of the flake's trajectory in b, which provides an estimate of the diffusion constant D = 0.067 µm 2 s −1 compared to free diffusion with D ∼ 5.98 µm 2 s −1 (black line).d Theoretical diffusion D of a hexagonal flake with side a = 840 nm as a function of its height h above the surface (see Fig. 1a) obtained from hydrodynamic simulations.The experimentally measured D = 0.067 µm 2 s −1 corresponds to height h = 100 nm.

Critical
Casimir force.The expression of the critical Casimir force F crit in Eq. (2) depends on the correlation length ξ of the order parameter fluctuation of the binary liquid mixture, which is related to ∆T as ξ = ξ 0 ∆T Tc −ν ture, followed by rapid inversions of the vial for 10 s.The resulting solution is immediately placed in a water bath at 85 • C and kept undisturbed for about an hour.The products are washed by centrifugation at 4000 rpm for 10 min and finally dispersed in deionized water for further experiments.The flakes obtained as described above are then suspended in a near-critical binary liquid mixture of water and 2,6-lutidine at the critical composition of lutidine c c L = 0.286, having a lower critical point at T c ≈ 34 • C 44 (Supplementary Fig.8).The suspension is confined in a sample cell between a microscopy slide and a cover slip spaced by about 300 µm.On top of the cover slip, a 40-nm-thick gold layer is sputtered homogeneously across the sample.The cover slip is then left overnight in a 1-mM solution of thiols (1-Octanethiol for hydrophobic and 6-Mercapto-1-hexanol for hydrophilic treatment) and ethanol, creating a self-assembled monolayer (SAM) on top of the gold.To create a hydrophobic SAM on top of the glass, Trichloro(1H, 1H, 2H, 2H-perfluorooctyl)silane (PFOCTS) has been evaporated for 4 h under vacuum.The stark contrast in the resulting wetting angle between hydrophilic SAM (θ = 19 • , measured from the side) and hydrophobic SAM (θ = 102 • ) of a 10-µl water droplet can be seen in Supplementary Fig.S9.For the patterned substrate shown in Fig.4, an additional 3-nm-thick layer of titanium has been added to the glass substrate for better adhesion before sputtering gold.The patterned gold stripes are fabricated by direct laser-writing and lift-off.The substrates are spin coated with LOR3A (4000 rpm for 60 s, baking at 200 • C for 5 min) and S1805 (3000 rpm for 45 s, baking at 110 • C for 1 min).The samples are exposed using a Heidelberg DWL2000 direct laser writer and developed in MF CD26 for 50 s.Titanium and gold are deposited and lift-off is performed in hot remover 1165 at 70 • C overnight.
This work was partially supported by the ERC Starting Grant ComplexSwimmers (grant number 677511) and by Vetenskapsrådet (grant number 2016-03523).AG acknowledges support from MIUR PRIN project "Coarse-grained description for non-equilibrium systems and transport phenomena (CO-NEST)" n. 201798CZL.Fabrication in this work was partially done at Myfab Chalmers.ADMI gratefully acknowledges support from the DFG (Deutsche Forschungsgemeinschaft) through the project No. DA 2107/1-1.

Figure 3 .
Figure 3. Critical Casimir forces overcome Casimir-Lifshitz force.a The diffusion constant D of a hydrophilic hexagonal flake with a = 700 nm above a hydrophilic surface (symmetric (−, −) boundary conditions) decreases as the temperature T approaches the critical temperature T c (blue squares), while b its height h decreases (blue squares).The solid blue line is the best fit of the theoretical model (Eq.(9)), from which we extracted h in Eq.(10).c The flake is under the action of the Casimir-Lifshitz force (orange dots) and the critical Casimir force (blue dots), which are both attractive and whose strengths increase as the flake approaches the surface, while electrostatic forces (green dots) are repulsive.The orange and blue solid lines are the theoretical fitting of critical Casimir (Eq.2) and Casimir-Lifshitz (Eq. 1) forces, respectively.Note how the critical Casimir force becomes stronger than to the Casimir-Lifshitz force at ∆T ≈ −0.3 K. d The diffusion constant D (red circles) for a hydrophilic hexagonal flake with a = 840 nm above a hydrophobic surface (antisymmetric (−, +) boundary conditions) increases upon approaching T c , as e its height h (red circles) increases.The solid red line is the best fit of the theoretical model (Eq.(9)) of the average height h (Eq.(10)) under the action of f the Casimir-Lifshitz force (orange dots, attractive), the critical Casimir force (red dots, repulsive), and the electrostatic force (green dots, repulsive).The red, orange, and green solid lines are the theoretical values from the fit of critical Casimir, Casimir-Lifshitz, and electrostatic forces, respectively.The error bars on the experimental points in b,e are the standard deviation from three measurements.The error range for the theoretical lines in b, e are indicated as shaded areas for the confidence levels of 68%, 86%, and 95%.In c and f only the 68% confidence level error range are represented.

Figure 4 .
Figure 4. Trapping and release of a flake.a Hydrophobic gold stripes (thickness 30 nm, width 3 µm, separation 3 µm) nanofabricated on a hydrophilic glass substrate.Inset: periodic raising and lowering of the temperature T to and away from the critical temperature T c .b-i Trajectories of a hydrophilic gold flake b, d, f, h when T is appreciably below T c (white trajectories) so that the Casimir-Lifshitz force dominates and confines the flake over the gold stripes (dark stripes in background images), and c, e, g, i when T ≈ T c (black trajectories) so that the critical Casimir force emerges, repelling the flake from the gold stripes to the glass regions (light stripes in background images).j Full trajectory of the flake under periodic heating and cooling of the sample showing that transitions occur shortly after reaching T ≈ T c (Supplementary Video V2).Its starting point is marked by the particle image.The scale bars represent 6 µm.k Casimir-Lifshitz potential along the x-direction (see axes in j) in case of a trapped flake above gold stripes.The dotted lines represent the experimentally measured potential for the trajectories in b, d, f, and h, while the solid line represents the fitting to a harmonic potential with trap stiffness k x ≈ 0.1 pN µm −1 .