.light-theme {
   /* light theme colors */
--background-primary: hsl(0, 0%, 100%);
--background-secondary: hsl(0, 0%, 97%);

--action-primary: hsl(214, 32%, 91%);
--action-secondary: hsl(210, 38%, 95%);

--foreground-primary: hsl(218, 23%, 23%);
--foreground-secondary: hsl(216, 15%, 52%);
--foreground-tertiary: hsl(214, 20%, 69%);

--accent: hsl(229, 76%, 66%);

min-height: 100vh;

}

.dark-theme {

   /* dark theme colors */

    --background-primary: hsl(218, 23%, 23%);
    --background-secondary: hsl(220, 26%, 14%);

    --action-primary: hsl(216, 15%, 52%);
    --action-secondary: hsl(218, 23%, 23%);

    --foreground-primary: hsl(210, 38%, 95%);
    --foreground-secondary: hsl(211, 25%, 84%);
    --foreground-tertiary: hsl(214, 20%, 69%);

    --accent: hsl(229, 76%, 66%);

}

:root {

   /* color*/

    --white: hsl(0, 0%, 100%);

   /* typography */

    --fs-base: 0.85rem;
    --fs-1: 1.875rem;
    --fs-2: 1.5rem;
    --fs-3: 1.25rem;
    --fs-4: 0.875rem;
    --fs-5: 0.75rem;

   /* spacing */

    --py: 5rem;

}





/*-----------------------------------*\ 
  #RESET
\*-----------------------------------*/

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

a {
    outline: none;
    text-decoration: none;
    padding: 2px 1px 0;
}



li {
    list-style: none;
}

img,
button {
    display: block;
}

a,
span {
    display: inline-block;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

html {
    font-family: 'Fira Code', monospace;
    font-size: var(--fs-base);
    line-height: 1.8;
    
}

:focus {
    outline-offset: 4px;
}


/* scrollbar style*/

::-webkit-scrollbar {
    width: 16px;
}


::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 20px;
    border: 4px solid;
}

.light-theme::-webkit-scrollbar-thumb {
    border-color: hsl(0, 0%, 90%);
}

.dark-theme::-webkit-scrollbar-thumb {
    border-color: hsl(219, 27%, 20%);
}

.light-theme::-webkit-scrollbar-track {
    background: hsl(0, 0%, 90%);
}

.dark-theme::-webkit-scrollbar-track {
    background: hsl(219, 27%, 20%);
}





/*-----------------------------------*\ 
  #BASE STYLE
\*-----------------------------------*/

.h1,
.h2,
.h3,
.h4 {
    display: block;
    color: var(--foreground-primary);
}

.h1 {
    font-size: var(--fs-1);
    font-weight: 900;
}

.h2 {
    font-size: var(--fs-2);
    font-weight: 700;
}

.h3 {
    font-size: var(--fs-3);
    font-weight: 700;
}

.h4 {
    font-size: var(--fs-4);
    font-weight: 700;
}

.text-sm {
    font-size: var(--fs-4);
}

.text-tiny {
    font-size: var(--fs-5);
}





/*-----------------------------------*\ 
  #REUSED STYLE
\*-----------------------------------*/

.container {
    margin-inline: auto;
    margin: auto;/* fallback for margin-inline */
    padding: 0 15px;
    min-height: calc(100vh -70px);
}

.btn {
    min-width: 10rem;
    border-radius: 100px;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    padding: 0.6875rem 1.1875rem;
}

.btn-primary:hover {
    background: var(--foreground-secondary);
    color: var(--action-primary);
}

.btn-secondary {
    background: var(--action-secondary);
    color: var(--foreground-secondary);
    padding: 0.5rem 1rem;
    border: 3px solid var(--foreground-tertiary);
}

.btn-secondary:hover {
    border-color: var(--accent);
}





/*-----------------------------------*\ 
  #Extra style for dark theme
\*-----------------------------------*/

.dark-theme .btn-primary:hover {
    color: var(--background-primary);
}

.dark-theme .blog-topic {
    background: var(--action-primary);
    color: var(--foreground-secondary);
}

.dark-theme .blog-topic:hover {
    background: var(--foreground-primary);
    color: var(--action-primary);
}

.dark-theme .social {
    background: var(--action-primary);
}
.dark-theme .header {
    background: var(--action-primary);
}
.dark-theme .social a:hover {
    color: black;
}

.dark-theme .aside .h2 {
    color: var(--foreground-primary);
}

.dark-theme .blog {
    background: var(--background-primary);
}



/*-----------------------------------*\ 
  #HEADER
\*-----------------------------------*/

header {
    background: var(--background-primary);
    
}

header .flex-wrapper {
    display: none;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
}

.logo-light,
.logo-dark {
    display: none;
}

.light-theme .logo-light,
.dark-theme .logo-dark {
    display: block;
}

header .btn-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-btn-mobile,
.nav-menu-btn,
.nav-close-btn {
    background: var(--action-secondary);
    color: var(--foreground-tertiary);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 25px;
}

:is(.theme-btn-mobile,
    .nav-menu-btn,
    .nav-close-btn):hover {
    background: var(--accent);
    color: var(--white);
}

.theme-btn-mobile ion-icon {
    display: none;
}

.theme-btn-mobile.light .sun,
.theme-btn-mobile.dark .moon {
    display: block;
}

.mobile-nav {
    position: fixed;
    inset: 0;
    background: var(--background-primary);
    padding: 70px 20px;
    overflow: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: 0.5s cubic-bezier(1, 0, 0.30, 0.70);
    z-index: 10;
}

.mobile-nav.active {
    transform: translateX(0);
    visibility: visible;
}

.nav-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

.mobile-nav .wrapper {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--action-primary);
}

.mobile-nav .nav-title {
    margin-bottom: 1rem;
}

.mobile-nav .nav-item {
    margin-bottom: 0.5rem;
}

.mobile-nav .nav-link {
    font-size: var(--fs-3);
    color: var(--foreground-secondary);
}

.mobile-nav .nav-link:hover {
    color: var(--accent);
}





/*-----------------------------------*\ 
  #HERO SECTION
\*-----------------------------------*/

.hero {
    background: var(--background-primary);
    padding-top: 2rem;
    padding-bottom: var(--py);
    text-align: center;
}

.hero .h1 {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hero b {
    color: var(--accent);
    font-weight: inherit;
}

.hero .h3 {
    color: var(--foreground-secondary);
    margin-bottom: 2rem;
    
}
.hero .h3 a {
    color: var(--accent);
}
.hero .h3 a:hover {
    color: var(--action-primary);
}

.hero .btn-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    text-align: center;
}

.hero .right {
    display: none;
}

/* article */
.article {
    margin: auto;
    padding: 0 15px;
    width: 80%;
}
.article h1 {
     font-size: var(--fs-1);
     font-weight: 900;
     text-align: center;
}
.article p {
    line-height: 1.8rem;
    margin-bottom: 15px;
}

.article .responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}


/*-----------------------------------*\ 
  #BLOG SECTION
\*-----------------------------------*/

.main {
    /* background: var(--background-secondary); */
    padding: var(--py) 0;
}

.blog .h2 {
    line-height: 1.3;
    margin-bottom: 3rem;
    text-align: center;
}

.blog-card-group {
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--background-primary);
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 10px hsla(0, 0%, 0%, 0.05);
    transition: 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 10px hsla(0, 0%, 0%, 0.1);
}

.blog-card-banner {
    display: none;
}

.blog-content-wrapper {
    padding: 10px 5px;
}

.blog-topic {
    background: var(--action-secondary);
    color: var(--foreground-secondary);
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.blog-topic:hover {
    background: var(--foreground-secondary);
    color: var(--action-secondary);
}

.blog-card .h3 {
    line-height: 1.4;
    margin-bottom: 1rem;
}

.blog-card .h3:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.blog-text,
.profile-wrapper {
    display: none;
}

.blog .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.blog .h4 {
    color: var(--foreground-secondary);
}

.blog .h4:hover {
    color: var(--accent);
}

.blog .text-sm {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--foreground-tertiary);
}

.blog .separator {
    background: var(--foreground-tertiary);
    margin-inline: 3px;
    margin: 0 3px;
    /* fallback for margin-inline */
    width: 3px;
    height: 3px;
    border-radius: 3px;
}

.blog ion-icon {
    --ionicon-stroke-width: 50px;
}



/* About Me Page  */
.main-about {
    background: var(--background-secondary);
    padding: 50px 0;
    display: grid;
    place-items: center;
    margin-top: 0;

}
.main-about .about-preamble {
    margin-bottom: 50px;
    width: 75%;
}

.main-about .about-heading  {
    color: var(--foreground-primary);
    font-size: var(--fs-2);
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    margin-bottom: 40px;
    text-align: center;
}

.about-container {
    height: auto;
    width: 70%;
    position: relative;
}

.about-container ul::after {
    position: absolute;
    content: '';
    width: 2px;
    height: 100%;
    background: var(--accent);
}

.about-container ul {
    list-style: none;
}

.about-container ul li {
    width: 50%;
    height: auto;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 1px 1px 25px rgba(0, 0, 0, 0.385);
    border-radius: 10px;
    margin-bottom: 30px;
    z-index: 99;
    position: relative;
}

.about-container ul li:nth-child(odd) {
    float: left;
    clear: right;
    transform: translateX(-30px);
    text-align: right;
}
.about-container ul li:nth-child(odd) .date {
    right: 20px;
}

.about-container ul li:nth-child(even) {
    float: right;
    clear: left;
    transform: translateX(30px);
}

/* remember to change this to last child  */
.about-container ul li:nth-child(5) {
    margin-bottom: 0;
}
.about-container ul li a {
    font-size:  15px;
    color: var(--accent);
    text-decoration: none;
}

.about-container ul li .date {
    position: absolute;
    top: -40px;
    /* left: 20px; */
    width: 135px;
    height: 35px;
    border-radius: 20px;
    background-image: linear-gradient(to right, var(--action-primary), var(--action-secondary));
    display: grid;
    place-items: center;
    font-size: 15px;
}

.about-container ul li .circle {
    width: 30px;
    height: 30px;
    background-color: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 0;
    /* left: 0; */
}
.about-container ul li .circle::after {
    content: '';
    width: 15px;
    height: 15px;
    background-color: hsl(229, 75%, 54%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.about-container ul li:nth-child(odd) .circle {
    right: -30px;
    transform: translate(50%, -50%);
}
.about-container ul li:nth-child(even) .circle {
    left: -30px;
    transform: translate(-50%, -50%);
}

.about-other {
    display: flex;
    justify-content: center;
    align-items: left;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 35px;
}




/* Footer  */
.social {
    padding: 10px 0;
    font-size: var(--fs-2);
    text-align: center;
    border-top: 1px solid var(--foreground-tertiary);
    height: 50px;
    position: sticky;
    top: 100%
}
.social a {
    color: var(--foreground-primary);
    text-decoration: none;

}
.social a:hover {
    color: var(--accent);
}

@media screen and (max-width:768px) {
    .about-container {
        width: 80%;
        transform: translateX(15px);
    }
    .about-container ul::after {
        left: -30px;
    }
    .about-container ul li {
        width: 100%;
        float: none;
        clear: none;
        margin-bottom: 80px;
    }
    .about-container ul li:nth-child(odd) {
        transform: translateX(0);
        text-align: left;
    }
    .about-container ul li:nth-child(odd) .date {
        left: 20px;
    }
    .about-container ul li:nth-child(odd) .circle {
        left: -30px;
        transform: translate(-50%, -50%);
    }
    .about-container ul li:nth-child(even) {
        transform: translateX(0);
    } 

    
}


/* responsive for larger than 550px screen*/
@media (min-width: 550px) {

    :root {
        /* typography */
        --fs-base: 0.90rem;
    }
    /* Blog  */
    .blog-card {
        display: grid;
        grid-template-columns: 3fr 4fr;
        gap: 20px;
    }

    .blog-card-banner {
        display: block;
        overflow: hidden;
        border-radius: 5px;
    }
/* 
    .blog-banner-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    } */

}


/* responsive for larger than 650px screen*/

@media (min-width: 650px) {

    :root {
        --fs-1: 2.25rem;

    }

    .container {
        padding: 0 30px;
    }

    .navbar {
        padding: 30px 0;
    }


    .blog .h2 {
        position: relative;
        text-align: left;
        padding-left: 2rem;
    }

    .blog .h2::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        background: var(--action-primary);
        width: 5px;
        height: 100%;
        border-radius: 5px;
    }

    .blog-text,
    .profile-wrapper {
        display: block;
    }

    .blog-text {
        color: var(--foreground-secondary);
        font-size: var(--fs-4);
        display: -webkit-box;
        line-clamp: 3;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 1rem;
    }

    .blog .wrapper-flex {
        display: flex;
        justify-content: start;
        align-items: center;
        gap: 10px;
    }

    .profile-wrapper {
        width: 56px;
        height: 56px;
        background: var(--action-primary);
        padding: 3px;
        border-radius: 50%;
    }

    .profile-wrapper img {
        border-radius: 50%;
    }

    .blog .wrapper {
        flex-direction: column;
        align-items: start;
        gap: 0;
    }

    footer .container {
        padding: var(--py) 30px;
        grid-template-columns: 2fr 1fr 1fr;
    }

    footer .wrapper {
        text-align: left;
    }

    .footer-text {
        margin: 0;
    }

}





 /* responsive for larger than 768px screen*/

@media (min-width: 768px) {

    .container {
        max-width: 800px;
    }

}


/* responsive for larger than 1024px screen*/

@media (min-width: 1024px) {

    :root {
        --fs-base: 1rem;
        --fs-1: 3rem;
    }

    .container {
        max-width: 1150px;
    }

    header .btn-group {
        display: none;
    }

    header .flex-wrapper {
        display: flex;
        gap: 30px;
    }

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 30px;
    }

    .desktop-nav .nav-link {
        color: var(--foreground-secondary);
        font-weight: 700;
    }

    .desktop-nav .nav-link:hover {
        color: var(--accent);
    }

    .theme-btn-desktop {
        position: relative;
        background: var(--background-secondary);
        color: var(--white);
        width: 52px;
        height: 26px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        border-radius: 100px;
    }

    .theme-btn-desktop.light {
        background: linear-gradient(45deg, hsl(7, 100%, 71%), hsl(46, 100%, 65%));
    }

    .theme-btn-desktop.dark {
        background: linear-gradient(45deg, hsl(225, 100%, 60%), hsl(296, 80%, 40%));
    }

    .theme-btn-desktop::before {
        content: '';
        position: absolute;
        background: var(--white);
        width: 21px;
        height: 21px;
        border-radius: 30px;
        top: 50%;
        left: 3px;
        transform: translateY(-50%);
        box-shadow: 0 2px 10px -2px hsla(0, 0%, 0%, 0.05);
        z-index: 2;
    }

    .theme-btn-desktop.dark::before {
        left: calc(100% - 24px);
    }

    /* HERO  */
    .hero {
        text-align: left;
    }

    .hero .container {
        display: grid;
        grid-template-columns: none;
        align-items: center;
        gap: 50px;
    }

    .hero .btn-group {
        justify-content: start;
        gap: 30px;
    }

    .hero .right {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }


    .hero .img-box {
        position: relative;
        z-index: 2;
    }

    .hero-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 0 0 280px 230px;
        transform: translate(10px, -10px);
    }

    .hero .shape {
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        transform: translate(-50%, -42%) rotate(-20deg);
    }

    .hero .shape-1 {
        background: var(--accent);
        width: 90%;
        height: 90%;
        z-index: -1;
    }

    .hero .shape-2 {
        width: 92%;
        height: 92%;
        box-shadow: inset 0 -30px 0 var(--action-primary);
        z-index: 2;
    }

   /* MAIN */

    .main .container {
        display: grid;
        grid-template-columns: 5fr 2fr;
        gap: 60px;
    }

}
