/* =========================
   1. Variables & Theme
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Chivo:wght@600&display=swap');

:root {
    --bg-color: #c9d1e0;
    --bg-gradient: radial-gradient(circle,
            rgba(171, 148, 254, 0.116) 0%,
            hsla(240, 25%, 98%, 1) 100%);
    --font-color: #666;
    --font-faded: #a3a3a3;
    --font-bold: #171717;
    --card-bg: #FAFAFA;
    --card-border: 0px solid white;
    --card-box-shadow: 0 1px 5px -4px #131316a6, 0 0 0 1px #222a3507, 0 4px 8px #222a350d;
    --card-bg-filter: blur(15px);
    --btn-font-color: #171717;
    --btn-bg: #ffffff;
    --btn-bg-hover: #ffffff;
    --btn-font-color-hover: #FF474D;
    --btn-border: 1px solid rgba(0, 0, 0, .04);
    --btn-box-shadow: inset 0 -3px 4px -1px rgba(0, 0, 0, .04), 0 2px 5px rgba(221, 150, 150, .04), 0 4px 4px rgba(0, 0, 0, .02), 0 0 0 1px rgba(0, 0, 0, .09);
    --link-font-color-hover: #FF474D;
    --border-footer: 1px solid #e0e0e0;
    --transition-std: all 0.2s ease-in-out;
    --glow: 1px 1px 0 #1d875700, 0 0 20px 5px #c0ffe400, inset 2px 2px 0 #d3ffec00;
    --nav-link-color: #666;
}

[data-theme="dark"] {
    --bg-color: #020418;
    --bg-gradient: radial-gradient(circle,
            #020418 0%,
            rgb(18, 18, 56) 100%);
    --font-color: #dddddd;
    --font-faded: #a5a5a5;
    --font-bold: #eaeaea;
    --card-bg: rgba(43, 38, 144, 0.131);
    --card-border: 1px solid rgba(255, 255, 255, .25);
    --card-box-shadow:
        rgba(50, 50, 93, 0.05) 0px 50px 100px -20px,
        rgba(0, 0, 0, 0.05) 0px 30px 60px -30px,
        rgba(10, 37, 64, 0.12) 0px -2px 6px 0px inset,
        0 0 10px 1px rgba(0, 0, 0, 0.25);
    --card-bg-filter: blur(15px);
    --btn-font-color: #ffffff;
    --btn-bg: rgba(109, 115, 158, 0);
    --btn-bg-hover: #FF474D;
    --btn-font-color-hover: #ffffff;
    --btn-border: 1px solid #75709282;
    --btn-border-hover: 1px solid rgba(205, 59, 61, 0.564);
    --btn-box-shadow: rgba(15, 7, 38, 0.225) 0px 2px 0px 1px;
    --link-font-color-hover: #FF474D;
    --border-footer: 1px solid #92909022;
    --btn-i-hover: #fff;
    --glow: 1px 1px 0 #ff474d1f, 1px 1px 30px 5px rgba(179, 32, 66, 0.38), inset 0px 0px 14px #95292d;
    --nav-link-color: #ffffffd6;
}

/* =========================
   2. Base Styles
   ========================= */
html {
    transition: var(--transition-std);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300;
    font-size: 16px;
    padding: 0 1.4em;
    letter-spacing: 0.2px;
    color: var(--font-color);
    background: var(--bg-color);
    background: var(--bg-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

main {
    width: 100%;
    margin-bottom: 3em;
}

footer {
    display: flex;
    align-items: center;
    color: var(--font-faded);
    padding: 1.5em 0;
    border-top: var(--border-footer);
    font-size: 13px;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin: 0;
    padding: 0;
}

/* =========================
   3. Layout & Navigation
   ========================= */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 4em 0;
    width: 100%;
    padding: 1em 0 0;
}

#logo {
    background-image: url(images/logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    height: 25px;
    width: 25px;
}

nav a {
    display: flex;
    align-items: center;
    gap: 0.7em;
    color: var(--nav-link-color);
}

.header-nav {
    display: flex;
    justify-content: space-between;
}

nav ul {
    width: 100%;
    display: flex;
    gap: 3em;
}

nav input[type=checkbox] {
    height: 0;
    width: 0;
    display: none
}

/* =========================
   4. Theme Toggle
   ========================= */
#theme-toggle-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
}

#theme-toggle-switch ion-icon:first-of-type {
    position: relative;
    top: 0.5px;
    left: 35px;
}

#theme-toggle-switch ion-icon:last-of-type {
    position: relative;
    left: -35px;
    z-index: -1;
}

label {
    cursor: pointer;
    text-indent: -9999px;
    width: 70px;
    height: 31px;
    background: rgba(128, 128, 128, 0);
    display: block;
    border-radius: 100px;
    border: 1.5px solid rgba(151, 148, 148, 0.3);
    position: relative;
}

label:after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 26px;
    height: 26px;
    background: #ffffff31;
    border-radius: 90px;
    border: 1.5px solid rgba(151, 148, 148, 0.3);
    transition: 0.3s;
}

input:checked+label {
    background: rgba(255, 255, 255, 0);
}

input:checked+label:after {
    left: calc(100% - 1px);
    transform: translateX(-100%);
    border: 1.5px solid rgba(206, 196, 196, 0.3);
}

label:active:after {
    width: 30px;
}

.theme-switch {
    cursor: pointer;
    font-size: 1.2em;
}

#photo-stat {
    font-size: 20px;
    font-family: 'Chivo', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    color: var(--font-color)
}

/***************************/
/* START TOGGLE NAVIGATION */
/***************************/

.bring-forward {
    z-index: 99;
}

.bring-backward {
    z-index: -1;
}

.sidebar {
    position: fixed;
    top: 0;
    height: 0px;
    width: 100vw;
    background-color: var(--bg-color);
    font-size: 1.825em;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8em;
    opacity: 0;
    height: 80%;
}

.fade-in {
    opacity: 100;
    transition: 1s;
}

.sidebar ul {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.4em;
}

.iconFadeIn ul {
    opacity: 100;
    transition: 0.5s;
}

.nav-section ul {
    display: flex;
    flex-direction: row;
}

.navSlide {
    animation: slide 0.3s linear forwards;
    left: 0;
}

@keyframes slide {
    100% {
        height: 100vh;
    }
}

.nav-links a {
    text-decoration: none;
}

.menu-button {
    position: absolute;
    right: 2em;
    top: 1.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 100;
}

.bar1,
.bar2,
.bar3 {
    width: 30px;
    height: 2px;
    background-color: var(--font-faded);
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 5px;
}

.change .bar1 {
    transform: rotate(-45deg) translate(-10px, 8px);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: rotate(45deg) translate(-6px, -4px);
}

.nav-links {
    display: none;
}

.no-scroll {
    height: 100vh;
    overflow-y: hidden;
    padding-right: 15px;
}

.modal-open {
    margin-right: 25px;
}

/***************************/
/* END TOGGLE NAVIGATION */
/***************************/

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero div {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


.hero h1 {
    font-size: 4em;
    font-family: 'Chivo', Georgia, 'Times New Roman', Times, serif;
    margin: 0.5em 0;
}

.hero img {
    height: 140px;
    width: 140px;
    border-radius: 50%;
}

.social-links {
    padding: 0;
    margin: 1em 0 2em 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    font-size: 1.5em;
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 1.4em;
}

.project-cards {
    display: flex;
    flex-direction: column;
    gap: 1.4em;
    margin-bottom: 1.4em;
}

article {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 1em 2em 1em 2em;
    border: var(--card-border);
    box-shadow: var(--card-box-shadow);
    backdrop-filter: var(--card-bg-filter);
}


article a {
    padding: 1em 0;
    font-weight: 400;
}

a,
i {
    cursor: pointer;
    text-decoration: none;
    color: #959595;
    transition: var(--transition-std);
}

a:hover,
i:hover {
    color: var(--link-font-color-hover);
}

a>i {
    padding-left: 0.2em;
    font-size: 14px;
}

article h5 {
    color: var(--font-faded);
    margin: 1em 0.4em 0 0;
}

.tag-list {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    width: 100%;
    border-top: var(--border-footer);
    margin-top: 1.3em;
    padding: 1.2em 0 0 0;
}

.tag-list li {
    color: white;
    font-family: 'IBM Plex Mono';
    font-size: 13px;
    background-color: #54597e;
    padding: 0.4em 0.8em;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

/* =========================
   5. Button Component
   ========================= */
.btn {
    height: 40px;
    font-weight: 500;
    color: var(--btn-font-color);
    white-space: nowrap;
    cursor: pointer;
    background-color: var(--btn-bg);
    border: var(--btn-border);
    border-radius: 6px;
    justify-content: center;
    align-items: center;
    padding: 0 1em;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition-std);
    display: flex;
    gap: 0.5em;
    box-shadow: var(--btn-box-shadow);
}

.btn-lg {
    height: 48px;
    font-size: 0.9em;
}

.btn:hover {
    background-color: var(--btn-bg-hover);
    color: var(--btn-font-color-hover);
    box-shadow: inset 0 -3px 4px -1px rgba(0, 0, 0, .09), 0 2px 5px rgba(0, 0, 0, .13), 0 4px 4px rgba(0, 0, 0, .02), 0 0 0 1px rgba(0, 0, 0, .09),
        var(--glow)
}

.btn i:hover {
    color: var(--btn-i-hover)
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--font-bold);
    font-weight: 600;
}

p {
    line-height: 145%;
}

/******* 
START ABOUT SECTION 
*********/

.about-main {
    display: grid;
    grid-template-columns: 1fr;
}

.about-main img {
    max-width: 100%;
    border-radius: 15px;
    margin-top: 1em;
}

.about-main blockquote {
    line-height: 162.5%;
    border-left: var(--border-footer);
    margin: 2em 0 0 0;
    padding: 0 2em;
    font-style: italic;
    font-weight: 100;
    font-family: 'IBM Plex Mono';
    font-size: 0.8em;
}

.about-main div:last-of-type {
    display: grid;
}

.about-main div:last-of-type div {
    grid-area: 1;
}

.about-main ul {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 1.2em;
    font-size: 0.8em;
    font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
}

.find-me-socials {
    display: grid;
    grid-gap: 1em;
    margin: 1em 0 2em 0;
}

/******
START DEV PROJECT PAGE
*******/

.projects-main {
    display: grid;
}

/******* 
START FRONTEND MENTOR FE PROJECTS SECTION 
*********/

.frontend-main section {
    margin: 0 0 3em 0;
}

.grid-switcher {
    display: flex;
    justify-content: end;
    gap: 0.5em;
    margin: 2em 0 0 0;
}

.grid-switcher ion-icon {
    padding: 0.2em;
    border-radius: 4px;
    cursor: pointer;
}

.icon-selected {
    background-color: #0204181c;
}

.proj-li-card {
    /* override styles to make it look like cards */
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 1em 2em 1em 2em;
    border: var(--card-border);
    box-shadow: var(--card-box-shadow);
    backdrop-filter: var(--card-bg-filter);
}

.fe-project-list {
    display: grid;
    gap: 0em;
    width: 100%;
    padding: 0em 0em;
}

.fe-project-list li:first-of-type {
    font-weight: 600;
    color: var(--btn-font-color);
}

.fe-project-list li {
    list-style: none;
    padding: 1em 0 1em 1em;
    border-bottom: var(--border-footer);
    display: inline-grid;
    grid-template-columns: 2fr 1fr 1fr;
    font-size: 14px;
    align-items: center;
    transition: all 0.15s ease;
}


.fe-project-list li:not(:first-of-type):hover {
    background-color: #54597e0e;
}

.fe-link {
    width: max-content;
    padding: 0.3em 0;
    border-radius: 5px;
}

/******
START DESKTOP MEDIA QUERIES 
*******/

@media (min-width: 768px) {
    main {
        max-width: 1024px;
        margin: 0 auto;
        padding-bottom: 3em;
    }

    nav {
        max-width: 1024px;
        margin: 0 auto;
        margin-bottom: 4em;
        justify-content: space-between;
    }

    nav>ul {
        width: 500px;
        display: flex;
        justify-content: space-around;
    }

    footer {
        max-width: 1024px;
        margin: 0 auto;
    }


    .hero {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 3em;
        margin: 0 0 2em 0;
    }

    .hero div {
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .hero div:first-of-type {
        grid-area: 1 / 2;
        display: grid;
        /* diameter of the circle */
        --d: 1px;

        background: radial-gradient(circle at var(--d) var(--d),
                #000 calc(var(--d) - 1px),
                #0000 var(--d)) 0 0 / 16px 16px;
    }

    .hero img {
        height: 335px;
        width: 335px;
        border-radius: 50%;
        max-width: 100%;
        height: auto;
    }

    .hero h1,
    p,
    ul {
        width: 100%;
    }

    .hero h1 {
        margin-top: 0;
        margin-bottom: 0;
    }

    .social-links {
        padding: 0;
        margin: 1em 0 0 0;
        font-size: 1.8em;
        grid-template-columns: repeat(5, 30px);
        gap: 2em;
    }

    .social-links i {
        font-size: 1.5em;
    }

    .projects {
        display: flex;
        gap: 1.4em;
    }

    .project-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 1.4em;
        margin-bottom: 1.6em;
    }

    article {
        display: grid;
    }

    article p {
        font-size: 0.9em;
        margin: 0 0 1em 0;
    }

    article h3 {
        margin: 1em 0 1em 0;
    }

    article a {
        align-self: end;
    }

    .btn {
        max-width: 14em;
    }

    /******* 
    START DESKTOP ABOUT SECTION 
    *********/

    .about-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 6em;
    }

    .about-main img {
        max-width: 100%;
        border-radius: 15px;
        margin-top: 1em;
    }

    .about-main blockquote {
        line-height: 162.5%;
        border-left: var(--border-footer);
        padding: 0 2em;
        font-style: italic;
        font-weight: 100;
        font-family: 'IBM Plex Mono';
        font-size: 0.8em;
    }

    .about-main ul {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 1.2em;
        font-size: 0.8em;
        font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    }

    .about-main div:last-of-type div {
        grid-area: 3;
    }

    .find-me-socials {
        display: grid;
        grid-gap: 1em;
        margin: 1em 0 2em 0;
    }

    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    #logo {
        background-image: url(images/logo.png);
        background-size: contain;
        background-repeat: no-repeat;
        height: 25px;
        width: 25px;
    }

    nav a {
        display: flex;
        gap: 0.7em;
        color: var(--nav-link-color);
    }

    .header-nav {
        display: flex;
        justify-content: space-between;
        justify-self: end;
    }

    nav ul {
        width: 100%;
        display: flex;
        gap: 3em;
    }

    nav input[type=checkbox] {
        height: 0;
        width: 0;
        display: none
    }

    #theme-toggle-icon {
        font-size: 1.4em;
    }

    #theme-toggle-switch ion-icon:first-of-type {
        position: relative;
        top: 0.5px;
        left: 35px;
    }

    #theme-toggle-switch ion-icon:last-of-type {
        position: relative;
        left: -35px;
        z-index: -1;
    }


    label {
        cursor: pointer;
        text-indent: -9999px;
        width: 70px;
        height: 31px;
        background: rgba(128, 128, 128, 0);
        display: block;
        border-radius: 100px;
        border: 1.5px solid rgba(151, 148, 148, 0.3);
        position: relative;
    }

    label:after {
        content: '';
        position: absolute;
        top: 1px;
        left: 1px;
        width: 26px;
        height: 26px;
        background: #ffffff31;
        border-radius: 90px;
        border: 1.5px solid rgba(151, 148, 148, 0.3);
        transition: 0.3s;
    }

    input:checked+label {
        background: rgba(255, 255, 255, 0);
    }

    input:checked+label:after {
        left: calc(100% - 1px);
        transform: translateX(-100%);
        border: 1.5px solid rgba(206, 196, 196, 0.3);
    }

    label:active:after {
        width: 30px;
    }

    .theme-switch {
        cursor: pointer;
        font-size: 1.2em;
    }

    ul {
        list-style-type: none;
        padding: 0;
    }

    li {
        margin: 0;
        padding: 0;
    }

    .nav-links {
        display: flex;
    }

    .menu-button,
    .sidebar {
        display: none;
    }
}

@media only screen and (max-width: 768px) {
    .modal-open {
        margin-right: 8px;
    }
}

.grid {
    margin: 2em 0;
}

.grid-item {
    width: 20%;
    min-width: 150px;
}

.grid-item--width2 {
    width: 40%;
    min-width: 150px;
}

.grid-item img {
    width: 100%;

    height: auto;
}