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

/* Custom Properties, update these for your own design */

:root {
    --ff-primary: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --ff-secondary: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    
    --fw-reg: 400;
    --fw-bold: 700;
    
    --clr-light: #ffffff;
    --clr-dark: #0f172a; /* slate-900 */
    --clr-muted: #64748b; /* slate-500 */
    --clr-accent: #6366f1; /* indigo-500 */
    
    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.1rem;
    --fs-body: 1rem;
    
    --radius: 12px;
    --bs: 0 10px 30px rgba(2, 6, 23, 0.08), 0 2px 6px rgba(2, 6, 23, 0.06);
}

@media (min-width: 800px) {
    :root {
        --fs-h1: 4.5rem;
        --fs-h2: 3rem;
        --fs-h3: 1.25rem;
        --fs-body: 1.125rem;
    }
}

.btn--outline {
    background: transparent;
    color: var(--clr-accent);
    border: 2px solid var(--clr-accent);
}

.btn--outline:hover {
    background: var(--clr-accent);
    color: #fff;
}

/* Typography */

h1,
h2,
h3 {
    line-height: 1;
    margin: 0;
}

h1 { font-size: var(--fs-h1) }
h2 { font-size: var(--fs-h2) }
h3 { font-size: var(--fs-h3) }


.section__title {
    margin-bottom: .25em;
}

.section__title--intro {
    font-weight: var(--fw-reg);
}

.section__title--intro strong {
    display: block;
}

.section__subtitle {
    margin: 0;
    font-size: var(--fs-h3);
}

.section__subtitle--intro,
.section__subtitle--about {
    background: rgba(99, 102, 241, 0.1);
    color: var(--clr-accent);
    padding: .5em 1em;
    font-family: var(--ff-secondary);
    border-radius: 999px;
    margin-bottom: 1.25em;
}

.section__subtitle--work {
    color: var(--clr-muted);
    font-weight: var(--fw-reg);
    margin-bottom: 2em;
}

/* header (sticky topbar) */

header.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75em 1em;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
}

header.site-header.site-header--scrolled {
    box-shadow: 0 6px 20px rgba(2,6,23,0.06);
}

.logo {
    max-width: 80px;
    display: flex;
}

.nav {
    position: absolute;
    right: 1em;
    top: calc(100% + .5rem);
    background: #fff;
    color: var(--clr-dark);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .5rem;
    display: none;
    min-width: 220px;
    box-shadow: var(--bs);
}

.nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: inherit;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    padding: .5rem .75rem;
    border-radius: 6px;
}

.nav__link:hover {
    background: #f1f5f9;
    color: var(--clr-dark);
}

.nav__link.active {
    color: var(--clr-accent);
}

.nav-toggle {
    padding: .5em;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.nav-toggle:focus { outline: none; }

body.nav-open .nav { display: block; }

@media (min-width: 800px) {
    .nav { 
        position: static; 
        display: block; 
        background: transparent; 
        border: 0; 
        padding: 0; 
        box-shadow: none;
        min-width: auto;
    }
    .nav__list { 
        flex-direction: row; 
        height: auto; 
        align-items: center; 
        gap: 1rem;
    }
    .nav__link { font-size: .95rem; padding: .25rem .5rem; }
    .nav-toggle { display: none; }
}






.hamburger {
    display: block;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    background: var(--clr-accent);
    width: 2em;
    height: 3px;
    border-radius: 1em;
    transition: transform 250ms ease-in-out;
}


.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.hamburger::before { top: 6px; }
.hamburger::after { bottom: 6px; }

body.nav-open .hamburger { transform: rotate(.625turn); }
body.nav-open .hamburger::before { transform: rotate(90deg) translateX(-6px); }
body.nav-open .hamburger::after { opacity: 0; }


/*  Intro section  */

.intro {
    position: relative;
}

.intro__img {
    box-shadow: var(--bs);
}

.section__subtitle--intro {
    display: inline-block;
}

@media (min-width: 600px) {
    .intro {
        display: grid;
        width: min-content;
        margin: 0 auto;
        grid-column-gap: 1em;
        grid-template-areas: 
            "img title"
            "img subtitle";
        grid-template-columns: min-content max-content;
    }
    
    .intro__img {
        grid-area: img;
        min-width: 250px;
        position: relative;
        z-index: 2;
    border-radius: var(--radius);
    }    
    
    .section__subtitle--intro {
        align-self: start;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: right;
        position: relative;
        left: -1.5em;
        width: calc(100% + 1.5em);
    }
}



/*  My services section  */

.my-services {
    background: radial-gradient(1200px 400px at 20% -5%, rgba(99,102,241,0.18), transparent),
                radial-gradient(900px 300px at 90% 5%, rgba(14,165,233,0.15), transparent),
                #0b1020;
    color: var(--clr-light);
    text-align: center;
}

.section__title--services {
    color: #fff;
    position: relative;
}

.section__title--services::after {
    content: '';
    display: block;
    width: 2em;
    height: 2px;
    margin: 0.75em auto 1.25em;
    background: var(--clr-accent);
    opacity: 0.8;
    border-radius: 2px;
}

.services {
    margin-bottom: 3.5em;
}

.service {
    max-width: 420px;
    margin: 0 auto;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 1.25em 1.25em 1.5em;
    text-align: left;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}

@media (min-width: 800px) {
    .services {
        display: flex;
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .service + .service {
        margin-left: 2em;
    }
}


.about-me {
    max-width: 1000px;
    margin: 0 auto;
}

.about-me__img {
    box-shadow: var(--bs);
    border-radius: var(--radius);
}

@media (min-width: 600px) {
    .about-me {
        display: grid;
        grid-template-columns: 1fr 200px;
        grid-template-areas: 
            "title img"
            "subtitle img"
            "text img";
        grid-column-gap: 2em;
    }
    
    .section__title--about {
        grid-area: title;
    }
    
    .section__subtitle--about {
        grid-column: 1 / -1;
        grid-row: 2;
        position: relative;
        left: -1em;
        width: calc(100% + 2em);
        padding-left: 1em;
        padding-right: calc(200px + 4em);
    }
    
    .about-me__img {
        grid-area: img;
        position: relative;
        z-index: 2;
    border-radius: var(--radius);
    }
}

/* My Work */

.my-work {
    background: #0c1224;
    color: var(--clr-light);
    text-align: center;    
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.portfolio__item {
    background: rgba(255,255,255,0.04);
    overflow: hidden;
}

.portfolio__img {
    transition: 
        transform 750ms cubic-bezier(.5, 0, .5, 1),
        opacity 250ms linear;
    border-radius: 6px;
}

.portfolio__item:focus {
    position: relative;
    z-index: 2;
}

.portfolio__img:hover,
.portfolio__item:focus .portfolio__img {
    transform: scale(1.05);
    opacity: .9;
}


/* footer */

.footer {
    background: #111;
    color: var(--clr-muted);
    text-align: center;
    padding: 2.5em 0;
    font-size: var(--fs-h3);

}

.footer a { 
    color: var(--clr-accent);
    text-decoration: none;
}

.footer__link {
    font-weight: var(--fw-bold);
}

.footer__link:hover,
.social-list__link:hover {
    opacity: .7;
}

.footer__link:hover {
    text-decoration: underline;
}

.social-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 2em 0 0;
    padding: 0;
}

.social-list__item {
    margin: 0 .5em;
}

.social-list__link {
    padding: .5em;
}

/* Badges */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(99,102,241,0.35);
    color: var(--clr-accent);
    font-family: var(--ff-secondary);
    font-size: .8rem;
}

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.reveal--visible { opacity: 1; transform: none; transition: opacity 600ms ease, transform 600ms ease; }

/* Contact */
.contact {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.contact .card {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    box-shadow: var(--bs);
}


/* Individual portfolio item styles */

.portfolio-item-individual {
    padding: 0 2em 2em;
    max-width: 1000px;
    margin: 0 auto;
}

.portfolio-item-individual p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}