For the longest time, I full-on hated my body because it wasn’t what I thought it should be. And I wasn’t just judging myself—I obsessed over my own body, but I’d pass judgment on yours too. In my dysmorphic mind, your weight had an inverse relationship to your worth: The thinner you were, the more attractive, enviable, and confident I assumed you were. I struggled with losing weight for years—primarily because I really love pizza—but also because I mostly just tried counting calories, and I could never stick to that strategy for long.

Finally, in the winter of 2014, I set a goal for myself: I was going to run a half-marathon. Of course, this wasn’t coming from some great place of self-love: I started a disciplined workout regimen because I was infatuated with a guy who wouldn’t give me the time of day. In a last-ditch effort to get him to notice me, I figured I would lose weight and get the body I’d always dreamed of. I’ll be committed this time, I thought.

And I was. As I logged miles on the treadmill and alternated with some strength training, I saw my body transform—but my crush’s view of me didn’t transform along with it. Eventually, I found out that he was distant because he was going through a divorce. So, yeah, that was a huge relief: I wasn’t a ginormous troll; this guy was just a tiny bit preoccupied with, you know, the reality of a failed marriage.

Since my primary incentive was gone, I could have stopped training and thrown in the towel. But by that point, I’d become fiercely motivated to complete the half-marathon, so I decided to stick it out and finish my training program—and I’m proud of that.

A couple months and 20 pounds later, I felt confident in my body for the first time I could remember. I felt like I looked good in everything, and I even enjoyed shopping. As a teenager, I’d had breakdowns in dressing rooms when garments didn’t fit or were unflattering. After I’d gotten in shape, however, I gladly walked into any store.

But as the months went by, my worsening anxiety disorder transformed me from healthy and fit to downright heroin chic. I wasn’t eating regularly, so I became more waifish and smaller than I’d ever been.

About a year after that half-marathon, I was out shopping when one dress in particular caught my eye: It was a floral bodycon number, and I was in love with it the moment I saw it on a hanger. Prior to my half-marathon training, I would have never dared to try on a dress that figure-hugging and cleavage-showing, but despite the fact that I wasn’t treating myself right—and I wasn’t eating nearly enough—I was proud of my body, and I was determined to embrace the aesthetic I’d finally achieved. Was I doing this the healthy way? Nope. But right around then, I started to.

I let loose a little. Instead of being uptight and regimented, I started traveling more. I started eating my favorite foods again. I started, almost without realizing it, reverting back to my former self. As time passed, I realized that I still had a long way to go before I could consider myself symptom-free. However, my body dysmorphia seems to have made a very quiet exit and has largely stayed away for over a year now. While I was relearning how to enjoy life again, I was also picking up the weight that my former self often carried. But this time, it was different. Gaining weight was no longer the end of the world. This was a positive—and huge—adjustment for me.

I wish I could pinpoint the exact moment when my outlook changed, but that’s not how it happened: Instead of a dramatic awakening, it was a subtle shift. I’d ditched having a full-length mirror in my home a long time ago, so noticing the changing shape of my body took longer than if I stared at my reflection each day. It wasn’t until the buttons on my pants took a little extra effort to close that I realized just how much my body had changed, but I was relatively unbothered. Finally, I saw myself as more than a number. I saw myself for my style, the way I carried myself, and the way that those aspects made me feel.

A couple of the traits I gained when I lost weight were confidence and style, and I’m so happy that confidence and style aren’t things that I’ve now lost since I’ve gained it again. Yes, that awesome new wardrobe I purchased has been shifted to the back of my closet for now, but I’ve been having fun figuring out my new style. I haven’t been afraid to keep rocking my crop tops and the high-waisted denim that I constantly wore during my stint of being thin, even though I don’t look quite the way I used to.

I still have days when I look down at my tummy and miss my baby abs or the hip bones gently peeking out at me. But the difference now is that I don’t have disdain for my body. I find comfort in walking into my closet and styling an outfit for the day. Going out to dinner or spending an evening out on the town is especially fun now that I’m putting the focus on feeling pretty. This shift in my thinking has led me to pay attention to the hangers in my closet, not the numbers on the scale.

I’ve learned to love my body for what it is: It’s strong, it’s beautiful, and it still really loves pizza. I’ve realized, after a decade of body consciousness, that life is way more fun when you focus on enjoying and adorning the body you have—not tearing apart your perceived imperfections.

Falling in love with fashion helped me fall in love with my body, despite its constant evolutions. It allowed me to see myself in an infinitely more body-positive, inclusive, and healthy way. Regardless of the shape my body takes now or in the future, I no longer need to look for validation in the form of strangers, friends, or guys who I want to compliment me. My own pride and validation are enough. And given my past, that’s quite a miracle.

Alexis Dent is a poet, essayist, entrepreneur, and author. Her first book, Everything I Left Behind, came out this fall. In addition to freelancing, Dent writes a weekly newsletter called White Collar Dropout for self-employed millennials and ambitious side hustlers. Dent also designs quirky leggings for her apparel company, Eraminta, because she really hates wearing pants. Keep up with her on her website and follow her on Twitter @alexisdent.