                                     In the

        United States Court of Appeals
                      For the Seventh Circuit
                          ____________________
No. 17-1279
MUHAMMAD SARFRAZ,
                                                      Petitioner-Appellant,
                                       v.

JUDY P. SMITH,
                                                      Respondent-Appellee.

                          ____________________

                Appeal from the United States District Court
                    for the Eastern District of Wisconsin.
            No. 15-CV-880 — William E. Duffin, Magistrate Judge.
                          ____________________

      ARGUED SEPTEMBER 6, 2017 — DECIDED MARCH 21, 2018
                   ____________________

   Before WOOD, Chief Judge, and ROVNER and SYKES, Circuit
Judges.
    SYKES, Circuit Judge. In December 2010 a Wisconsin jury
found Muhammad Sarfraz guilty of sexually assaulting I.N.,
a Pakistani immigrant who, along with her father, brieﬂy
lived with Sarfraz after arriving in this country in late 2009. 1


1   Like the lower court, we identify the victim by her initials.
2                                                 No. 17-1279

At trial I.N. described a violent assault in which Sarfraz
forced his way into her apartment, strangled her, threatened
her with a knife, and raped her. Abundant physical evidence
corroborated her account. Sarfraz claimed that I.N. consent-
ed to the sexual intercourse.
    To support this defense, Sarfraz sought to introduce evi-
dence that he and I.N. had previously engaged in consensual
sexual contact while she and her father were living with him.
The trial judge excluded this evidence under Wisconsin’s
rape-shield law. On appeal Sarfraz argued that the trial
judge misapplied the rape-shield law and deprived him of
his right to confront the witnesses against him and his right
to present a defense. The state court of appeals reversed the
conviction, State v. Sarfraz (“Sarfraz I”), 832 N.W.2d 346, 347
(Wis. Ct. App. 2013), but the Wisconsin Supreme Court
reinstated it, reasoning that the State’s interest in excluding
the evidence outweighed Sarfraz’s interest in admitting it,
State v. Sarfraz (“Sarfraz II”), 851 N.W.2d 235, 247–48 (Wis.
2014).
    Sarfraz sought federal review under 28 U.S.C. § 2254,
again claiming that the judge’s rape-shield ruling deprived
him of his confrontation right and his right to present a
defense. A magistrate judge denied relief but certiﬁed the
issue for appeal.
    We aﬃrm. The state supreme court speciﬁcally noted but
did not separately analyze Sarfraz’s federal constitutional
claims. That brings into play the Richter presumption, which
requires us to treat the decision as an adjudication on the
merits and review it deferentially under § 2254(d).
Harrington v. Richter, 562 U.S. 86, 99 (2011). Applying that
standard, we agree with the magistrate judge that habeas
No. 17-1279                                                  3

relief is unwarranted. The state court’s decision did not
involve an unreasonable application of federal law.
                       I. Background
   I.N. and her father moved from Pakistan to Milwaukee in
December 2009. A family member arranged for them to live
temporarily with Sarfraz, another Pakistani immigrant who
worked as a taxi driver. I.N. and her father stayed at the
apartment that Sarfraz shared with his wife and children for
about two and a half months before moving to their own
apartment.
    On May 15, 2010, Sarfraz unexpectedly showed up at
I.N.’s new apartment. At trial they gave dramatically differ-
ent accounts of what happened that day. I.N. testified that
she heard a knock on the door that morning. She asked who
it was, and the person outside the door answered “Jim,”
which was her landlord’s name. She opened the door and
saw a masked man standing in the hallway. He forced his
way into the apartment, pushed her into the bathroom, and
began choking her, saying, “I’ll kill you.” He then pulled a
knife from his pocket and held it to her neck. I.N. managed
to pull the mask from the man’s face and recognized Sarfraz.
At some point during the struggle in the bathroom, Sarfraz
set the knife on the floor. I.N. grabbed it, cutting her finger
in the process, and slashed him on the cheek. Blood covered
the bathroom floor.
   Sarfraz took the knife from I.N. and began to choke her
again. As she continued to struggle, Sarfraz tried to hit her,
pulled at her breasts, and eventually tied a handkerchief
around her mouth in an effort to quiet her. He tried to take
her into the bedroom, but she resisted and the two ended up
4                                                 No. 17-1279

in the living room. There Sarfraz produced a pornographic
DVD he brought with him and tried to make her watch it.
He then shoved her onto the floor, removed her pants, began
to fondle her genitals, and eventually had forcible vaginal
intercourse with her, all while she continued to resist. At
some point during this ordeal, I.N. scrawled the first few
letters of Sarfraz’s last name in blood on a newspaper be-
cause she feared that she would not survive. Immediately
after Sarfraz left, I.N. ran into the hallway and screamed for
help.
   A neighbor testified that his wife heard a commotion in
I.N.’s apartment, and when he went to investigate, he saw
I.N. standing in the hallway bloodied and naked from the
waist down, screaming that she had been raped. He called
911.
   The physical evidence introduced at trial supported
I.N.’s account. In a search of her apartment, the police found
a newspaper—and also a file cabinet—bearing the letters
“S-A-R” written in blood, as well as a pornographic DVD.
Officers recovered a bloody knife from Sarfraz’s taxicab;
forensic testing revealed the presence of DNA matching both
I.N. and Sarfraz. Immediately after the attack, I.N. was
examined by a sexual-assault nurse. The nurse noted that
she had cuts on her finger and ankle, injuries to her vaginal
area consistent with trauma, and tenderness at the front of
her throat consistent with strangulation. The nurse also
performed a vaginal swab, and forensic testing revealed the
presence of Sarfraz’s semen.
   Sarfraz was arrested and charged with second-degree
sexual assault by use of a dangerous weapon. See WIS. STAT.
§§ 940.225(2)(a), 939.63(1)(b). He claimed that I.N. consented
No. 17-1279                                                 5

to the sexual intercourse. Before trial he moved to admit
evidence of a prior intimate relationship with I.N. The State
opposed the motion based on Wisconsin’s rape-shield
statute. After an evidentiary hearing, the trial judge con-
cluded that the rape-shield law barred evidence of prior
sexual contact between Sarfraz and I.N. But the judge gave
Sarfraz substantial latitude to present evidence of a prior
romantic relationship with I.N.
   More specifically, the judge permitted Sarfraz to testify
that when I.N. and her father lived with his family, he and
I.N. hugged and kissed each other when his wife was not
home, and also had watched pornographic videos together a
few times. Sarfraz was allowed to testify that he and I.N. had
planned to marry and that he did not need to divorce his
wife to marry her because in his culture he could have
multiple wives. He told the jury that I.N. and her father
moved out when they did only because Sarfraz’s wife caught
him in bed with I.N. and became angry. Lastly, Sarfraz was
permitted to testify that he gave I.N. money, helped her find
a new apartment, and visited her regularly once she moved.
   In short, the judge excluded only the most graphic sexual
details of Sarfraz’s testimony about their prior relationship.
In particular, the judge precluded Sarfraz from testifying
that he and I.N. had engaged in fondling and mutual mas-
turbation but had agreed not to escalate to intercourse
because it was against their cultural norms to do so outside
of marriage.
    The judge also allowed Sarfraz to call other witnesses to
support his consent defense. To that end, he presented
testimony from his wife, Riffat Sarfraz, who told the jury
that she twice came home early and discovered Sarfraz and
6                                                 No. 17-1279

I.N. in compromising situations. The first time she found
Sarfraz and I.N. “lovingly” feeding each other. The second
time she discovered I.N. and Sarfraz in bed together. The
judge precluded her from testifying that neither was wear-
ing pants. The judge did, however, allow her to testify that
what she saw made her so emotional that she started throw-
ing I.N.’s belongings out of the apartment and told her
husband that I.N. had to move out. Indeed, I.N. and her
father moved out a few days later.
    Sarfraz also presented testimony from Azmath Uddin, a
friend and fellow cab driver who told the jury that on two
occasions he caught Sarfraz and I.N. together when he
dropped by the apartment unannounced. On the first occa-
sion, he saw I.N. sitting on Sarfraz’s lap with her legs on
either side of him and Sarfraz had his hands around her
waist. On the second occasion, Uddin saw I.N. hugging
Sarfraz from behind.
    The judge also permitted Sarfraz’s attorney to cross-
examine I.N. about a romantic relationship between them.
She denied it. The judge allowed limited follow-up cross-
examination on this subject—for example, defense counsel
was permitted to ask if she and Sarfraz had ever hugged or
kissed. She denied this too.
    Sarfraz’s version of the events of May 15 was starkly dif-
ferent from I.N.’s testimony. He testified that I.N. was the
initial aggressor and also initiated the sex. He told the jury
that he went over to I.N.’s apartment without a mask, knife,
or pornographic DVD. They visited inside the apartment,
and the conversation turned to marriage. I.N. told Sarfraz
that she did not want to marry him unless he left his wife
and children. When he told her that was impossible, she
No. 17-1279                                                   7

became “furiously mad.” She began crying and yelling,
grabbed Sarfraz’s collar, and started hitting him with her
fists. Sarfraz had a sudden urge to urinate (owing to a health
condition), and he hurriedly pushed I.N. out of the way to
get to the bathroom. She then barged into the bathroom
wielding a knife and slashed him on the face while he was
sitting on the toilet. A struggle ensued. Sarfraz tried to get
the knife away from her, and she cut her finger as they
tussled over it. Sarfraz pushed her out of the bathroom with
his hands on her throat. At some point he succeeded in
taking the knife away from I.N. and put it in his pocket.
    Sarfraz testified that he then returned to the living room
and collapsed on the floor, exhausted and in pain. He told
I.N. that if he called the police on her, she could face immi-
gration problems, and she started crying and apologizing.
Sarfraz’s pants were still down from using the toilet, and
I.N. sat on top of him and started “love talk.” She told him
that she wanted to have sex. Initially he resisted, but she put
on a pornographic video, took off her shirt and pants, and
started groping him. He said he was “not sure” if his penis
ever entered her vagina, but he did ejaculate “close to her
vagina.” After he ejaculated, he wiped up the blood on the
floor with a cloth, and I.N. got dressed. He then hugged her
and left the apartment. To explain his injuries to his wife, his
friend Uddin, and later a detective, he made up a story that
he had been robbed.
   The jury found Sarfraz guilty. A divided state appellate
court reversed, holding that Wisconsin’s rape-shield statute
did not bar the evidence of prior sexual contact between
Sarfraz and I.N. Sarfraz I, 832 N.W.2d at 347. The Wisconsin
8                                                 No. 17-1279

Supreme Court granted review and reversed the appellate
court. Sarfraz II, 851 N.W.2d at 238.
    The state high court began its analysis by explaining that
Sarfraz’s appeal presented two interrelated questions:
(1) whether the trial court erred in excluding the proffered
evidence under the Wisconsin rape-shield law; and
(2) whether the exclusion of this evidence violated Sarfraz’s
right to present a defense or his right to confront adverse
witnesses, both of which are guaranteed to him under the
U.S. and Wisconsin Constitutions. Id. at 242–43 (citing the
Sixth Amendment and Article I, Section 7 of the Wisconsin
Constitution). The court then turned its attention to the
terms of the rape-shield statute and the court’s precedents
applying it.
    The rape-shield law applies in specified sex-crime prose-
cutions and generally bars evidence about the complaining
witness’s prior sexual history, subject to certain exceptions.
WIS. STAT. § 972.11(2)(b). One exception permits evidence of
a complainant’s past sexual conduct with the defendant. Id.
§ 972.11(2)(b)1. The court explained that to introduce evi-
dence under this exception, the defendant must show that:
“(i) the proffered evidence relates to sexual activities be-
tween the complainant and the defendant; (ii) the evidence is
material to a fact at issue; and (iii) the evidence of sexual
contact with the complainant is of ‘sufficient probative value
to outweigh its inflammatory and prejudicial nature.’”
Sarfraz II, 851 N.W.2d at 244 (quoting State v. Jackson,
575 N.W.2d 475, 481 (Wis. 1998)).
   The court concluded that Sarfraz had carried his burden
under the first part of the test because a reasonable person
could find that it was more likely than not that a sexual
No. 17-1279                                                   9

relationship existed between I.N. and Sarfraz. Id. He also
satisfied the second part of the test because his evidence of
prior sexual contact with I.N. had some probative value on
the issue of I.N.’s credibility and Sarfraz’s consent defense.
Id. at 244–47. But Sarfraz did not carry his burden at the
third step in the analysis.
    The court explained that the final step in the tripartite
framework asks whether the evidence of prior sexual contact
between the complainant and the defendant “has sufficient
probative value to outweigh its inflammatory and prejudi-
cial nature.” Id. at 247. The court described this inquiry as an
“inverted balancing test” that assumes, “absent an eviden-
tiary showing to the contrary, [that] the proffered evidence is
more prejudicial than probative.” Id. at 247–48 (quoting
Jackson, 575 N.W.2d at 481) (alteration in original). The
inverted balancing test, the court said, serves the statute’s
purpose by “protect[ing] complainants from the embarrass-
ment and humiliation that discourage[] victims from report-
ing crimes of sexual assault.” Id.
    Applying the inverted balancing test, the court reasoned
that the proffered evidence of prior sexual contact between
Sarfraz and I.N. had very little probative value on the issues
of I.N.’s credibility in general and the consent defense in
particular. The prior conduct (assuming it occurred) consist-
ed only of fondling and mutual masturbation, which was
vastly different from vaginal intercourse after a knife fight.
Id. at 247. In the court’s view, Sarfraz’s evidence of a prior
relationship limited to sexual contact short of intercourse
might even have a tendency to undermine his argument that
I.N. consented to have intercourse on the date in question.
Id. at 248. The court concluded that the minimal probative
10                                                No. 17-1279

value of the proffered evidence was not enough to overcome
the strong starting presumption that the evidence was more
prejudicial than probative. After holding that the evidence
was properly excluded, the court reversed and remanded for
consideration of Sarfraz’s previously unaddressed claims of
sentencing error and ineffective assistance of counsel. Id. at
248. The court did not separately analyze the constitutional
claims.
    Sarfraz then moved his case to federal court on a § 2254
petition for habeas corpus. He again asserted that the trial
judge’s rape-shield ruling deprived him of his right to
confront witnesses and his right to present a defense. A
magistrate judge, presiding by consent, denied relief but
issued a certificate of appealability authorizing this appeal.
                       II. Discussion
    We review the magistrate judge’s denial of § 2254 relief
de novo. Peterson v. Douma, 751 F.3d 524, 529 (7th Cir. 2014).
On habeas review of a state-court judgment, a federal court
may not grant relief unless the state court’s decision was
“contrary to, or involved an unreasonable application of,
clearly established Federal law, as determined by the
Supreme Court of the United States,” or was “based on an
unreasonable determination of the facts in light of the evi-
dence presented in the [s]tate court proceeding.” 28 U.S.C.
§ 2254(d)(1), (2). To prevail under this standard, “a state
prisoner must show that the state court’s ruling on the claim
being presented in federal court was so lacking in justifica-
tion that there was an error well understood and compre-
hended in existing law beyond any possibility for
fairminded disagreement.” Ward v. Neal, 835 F.3d 698, 703
(7th Cir. 2016) (quoting Richter, 562 U.S. at 103).
No. 17-1279                                                 11

    Sarfraz argues that § 2254(d)’s deferential standard does
not apply because the state supreme court’s decision ad-
dressed Wisconsin’s rape-shield law but never expressly
circled back to consider his constitutional claims. That
argument is foreclosed by the Supreme Court’s decisions in
Richter and Johnson v. Williams, 568 U.S. 289 (2013).
    To begin, § 2254(d)’s deferential standard of review ap-
plies only to claims that a state court has “adjudicated on the
merits.” In Richter the Court considered whether § 2254(d)
applies when a state court denies relief in a one-sentence
summary order without any explanation. 562 U.S. at 98. The
Court held that when a defendant presents a federal claim to
a state court and the state court denies relief, the federal
habeas court should presume that the state court adjudicated
the claim on the merits. Id. at 99. The presumption can be
overcome, but only “when there is reason to think some
other explanation for the state court’s decision is more
likely.” Id. at 99–100. The state prisoner has the burden to
rebut the presumption, and because he could not make the
required showing, the Court applied § 2254(d)’s deferential
standard. Id. at 100.
    In Williams the Court applied the Richter presumption in
a situation closely analogous to Sarfraz’s. 568 U.S. at 295–96.
There, as here, the habeas petitioner had presented a federal
claim in her state-court appeal. Id. at 295. The state court
denied relief in an opinion addressing some of her claims
but without expressly analyzing the federal claim that she
later raised in her § 2254 petition. Id. at 295–96. The Court
invoked the Richter presumption but explained that it can be
overcome “[w]hen the evidence leads very clearly to the
conclusion that a federal claim was inadvertently overlooked
12                                                 No. 17-1279

in state court.” Id. at 303. In the case before the Court, the
state appellate court had expressly relied on a decision of the
state supreme court, which in turn had relied on three
federal cases. Id. at 304. In addition, the state-law claim that
the state court did address was quite similar to the federal
claim that went unmentioned; the overlap was so signiﬁcant
that it was “diﬃcult to imagine any panel of appellate
judges” failing to recognize the federal dimension of the
issue. Id. at 305–06. Under these circumstances, the Court
found it “exceedingly unlikely” that the state appellate court
had inadvertently overlooked the federal claim. Id. at 306.
    It follows from Richter and Williams that we should treat
the Wisconsin Supreme Court’s decision as a merits adjudi-
cation of Sarfraz’s federal claims. Indeed, the state supreme
court specifically described the federal claims, explicitly
recognizing that Sarfraz’s evidentiary argument had federal
constitutional dimensions. 851 N.W.2d at 242–43. The court
went on to explain that in certain circumstances, the Sixth
Amendment requires the admission of evidence that would
otherwise be excluded under the rape-shield law. To support
this proposition, the court invoked State v. Pulizzano,
456 N.W.2d 325, 330–31 (Wis. 1990), which in turn relied on
Chambers v. Mississippi, 410 U.S. 284, 294–95, 302 (1973), and
Davis v. Alaska, 415 U.S. 308, 318 (1974). So here, as in
Williams, the evidence does not “very clearly” show that the
Wisconsin Supreme Court inadvertently overlooked
Sarfraz’s federal claims. To the contrary, the evidence points
in the opposite direction: the court was plainly aware of the
significant overlap between the statutory and constitutional
claims. The Richter presumption applies, and our review is
governed by § 2254(d)’s deferential standard.
No. 17-1279                                                13

   Applying Richter requires us to “give the state-court
judgment the benefit of any arguments or theories that could
have supported the state court’s judgment.” Adorno v. Melvin,
876 F.3d 917, 919 (7th Cir. 2017) (citing Richter, 562 U.S. at
102). Sarfraz argues that the excluded evidence was so
crucial to his defense that the state court’s ruling was an
unreasonable application of Supreme Court precedent on the
confrontation right and the right to present a defense. We
are not persuaded.
   The Sixth Amendment guarantees the right of an accused
to be confronted with the witnesses against him; this in-
cludes the right to cross-examine adverse witnesses. Davis,
415 U.S. at 315. The Fourteenth Amendment’s Due Process
Clause and the Compulsory Process Clause of the Sixth
Amendment protect a defendant’s right to testify in his
defense. Rock v. Arkansas, 483 U.S. 44, 51–52 (1987). “Whether
rooted directly in the Due Process Clause of the Fourteenth
Amendment or in the Compulsory Process or Confrontation
Clauses of the Sixth Amendment, the Constitution guaran-
tees criminal defendants ‘a meaningful opportunity to
present a complete defense.’” Holmes v. South Carolina,
547 U.S. 319, 319 (2006) (quoting Crane v. Kentucky, 476 U.S.
683, 690 (1986)).
    It’s well established, however, that the constitutional
rights to cross-examine witnesses and present relevant
testimony are not absolute; these rights “may, in appropriate
cases, bow to accommodate other legitimate interests in the
criminal trial process.” Rock, 483 U.S. at 56 (quoting Cham-
bers, 410 U.S. at 295). But restrictions on a criminal defend-
ant’s right to cross-examine adverse witnesses and present
evidence in his own defense “may not be arbitrary or dis-
14                                                No. 17-1279

proportionate to the purposes they are designed to serve.”
Michigan v. Lucas, 500 U.S. 145, 151 (1991) (quoting Rock,
483 U.S. at 56). These principles do not call into question the
constitutionality of “well-established rules of evidence [that]
permit trial judges to exclude evidence if its probative value
is outweighed by certain other factors such as unfair preju-
dice, confusion of the issues, or potential to mislead the
jury.” Holmes, 547 U.S. at 326; see also Montana v. Egelhoff,
518 U.S. 37, 42 (1996).
   These are generally applicable constitutional principles.
More directly on point here, we have twice upheld state-
court rulings rejecting similar constitutional claims based on
the exclusion of evidence under rape-shield laws. See Dunlap
v. Hepp, 436 F.3d 739 (7th Cir. 2006); Hammer v. Karlen,
342 F.3d 807 (7th Cir. 2003). In each case the state court’s
decision gave substantial weight to the public interest in
protecting sexual-assault complainants when weighing
whether the exclusion of otherwise relevant evidence violat-
ed a defendant’s rights under the Sixth Amendment. Dunlap,
436 F.3d at 745; Hammer, 342 F.3d at 812.
    So too here. The Wisconsin Supreme Court applied its
“inverted balancing test” to determine whether Sarfraz’s
proffered evidence fell within an exception to the rape-shield
law. As we’ve explained, the test starts from a strong pre-
sumption that evidence of a complainant’s sexual history is
more prejudicial than probative, giving significant weight to
the public interest underlying any rape-shield law: “to
protect complainants from the embarrassment and humilia-
tion that discourage[] victims from reporting crimes of
sexual assault.” Sarfraz II, 851 N.W.2d at 248. The court then
evaluated the strength of Sarfraz’s interest in presenting the
No. 17-1279                                               15

proffered evidence, ultimately concluding that it was quite
low. The excluded evidence, the court said, had only mar-
ginal probative value because it was so strikingly dissimilar
from the charged crime. Id. at 247. Even assuming that
Sarfraz’s claims about fondling and mutual masturbation
were true, it would not be appreciably more plausible that
I.N. consented to vaginal intercourse on the living-room
floor after a violent struggle and a bloody knife fight. Id.
   In sum, the court concluded that the State’s interest in
excluding the evidence outweighed Sarfraz’s interest in
admitting it. As we’ve explained, the Supreme Court has
held that the application of evidentiary rules limiting a
defendant’s right to cross-examine witnesses and present
evidence may not be disproportionate to the purposes they
are designed to serve. The Wisconsin Supreme Court’s
balancing of interests was not an unreasonable application of
that standard.
   This conclusion is particularly clear in light of the slim
marginal value of the excluded evidence. The trial judge
gave Sarfraz substantial leeway to present evidence of a
romantic relationship with I.N. The jury heard his testimony
that he and I.N. hugged and kissed, watched pornographic
videos together, and planned to get married. His friend
Azmath Uddin testified that he saw I.N. sitting on Sarfraz’s
lap and embracing him. Sarfraz’s wife testified that she saw
the two feeding each other and caught them in bed together.
Only the carnal details were excluded.
   Given the extensive evidence Sarfraz was allowed to in-
troduce, the incremental impact of the excluded evidence
would have been slight. Accordingly, the state supreme
court’s decision cannot be characterized as an unreasonable
16                                                No. 17-1279

application of federal law. The carefully calibrated limitation
on Sarfraz’s defense was not obviously disproportionate to
the purpose the rape-shield law is designed to serve. Habeas
relief is unwarranted.
                                                    AFFIRMED.
