
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Maven+Pro:wght@400..900&display=swap');

:root {
    --bg-color: #dfe1e0;
    --text-color: #2d2e2a;
    --heading-color: #1f1f1f;
    --accent-color: #dfeae1;
    --accent-text: #1a1e1e;

    --main-heading-txt-color: #2D333B;
    
    --code-block-bg-color: #B8B9B8;
    --footer-bg-color: #bfc7c2;
    
    --btn-bg1-color: #dfe1e000;
    --btn-bg2-color: #dfe1e000;
    --btn-border1-color: #69786F;
    --btn-border2-color: #000000;

    --link-color: #3454f7;
    
    --body-padding: 10vw;
    
    
    /* Font sizes (mobile-first) */
    --fs-600: 3.5rem;
    --fs-500: 3rem;        /* 48px */
    --fs-400: 2rem;        /* 32px */
    --fs-300: 1.5rem;      /* 24px */
    --fs-250: 1.25rem;     /* 20px */
    --fs-200: 1rem;        /* 16px */
    --fs-100: 0.5rem;      /* 8px  */
}

@media(max-height: 36em), (max-width: 55em){
    :root{
        --fs-700: 3rem;       
        --fs-600: 2.5rem;     
        --fs-500: 2rem;       
        --fs-400: 1.5rem;     
        --fs-300: 1.0rem;  
        --fs-250: 0.95rem;   
        --fs-200: 0.751rem;   
        --fs-100: 0.5rem;   
        
        --body-padding: 5vw;
    }
}

.dark-mode {
    --bg-color: #1a1d22;
    --text-color: #d3d6ce;
    --heading-color: #cfd2cc;
    --accent-color: #99f6c2;
    --accent-text: #1a1e1e;
    
    --main-heading-txt-color: #DAEAB7;
    
    --code-block-bg-color: #33373C;
    --footer-bg-color: #000000;
    
    --btn-bg1-color: #9CF8BF;
    --btn-bg2-color: #BEFA83;
    --btn-border1-color: #84DCA6;
    --btn-border2-color: #A2E869;

    --link-color: #6CC4FF;
}

strong {
    font-weight: bold;
}

.dark-mode .icon {
    filter: invert(100%);
}

body {
    font-family: "DM Sans", sans-serif;
    font-optical-sizing: auto;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: var(--fs-250);
    font-weight: normal;
}

body p {
    text-align: justify;
    text-justify: inter-word;   
}

.dark-mode {
    font-weight: 200;
}

/* Generic Style classes */

.flex-container {
    display: flex;
    align-items: center;
}

.button {
    width: fit-content;
    display: flex;
    padding: 0.3rem 1.2rem;
    justify-content: center;
    align-items: center;
    background-color: var(--btn-bg1-color);
    color: var(--accent-text);
    font-weight: bold;
    font-size: var(--fs-300);
    border-radius: 20px;
    border: 3px solid var(--btn-border1-color);
}

.link {
    color: var(--link-color);
    font-size: var(--fs-300);
    font-weight: bold;
    text-decoration: underline;
}

.hero {
    padding: 0 var(--body-padding);
}

.main-heading {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: var(--fs-600);
    text-align: center;
    color: var(--main-heading-txt-color);
    font-weight: bold;
    margin-top: 1.2em;
    margin-bottom: 0.7em;
}

main {
    padding: 0 var(--body-padding);
    margin-bottom: 12vh;
}

section {
    margin: 5vh 0;
}

section h2 {
    font-size: var(--fs-400);
    font-weight: bold;
    margin-bottom: 0.6em;
}

.list ul {
    padding-left: 1.2em;
}

.numbered-list ul {
    padding-left: 1.2em;
    list-style: decimal;
}

ul > li::marker {
  font-weight: bold;
}

.section-content, .hero-content {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.code-block {
    width: 100%;
    background-color: var(--code-block-bg-color);
    padding: 0 1em;
    border-radius: 10px;
    word-spacing: 0.3em;
}

/* Navigation Bar */

header .button {
    width: 155px;
    height: 41px;
    font-size: var(--fs-250);
}

nav {
    justify-content: space-between;
    padding: 3vh var(--body-padding);
}

.btn-github {
    background-color: var(--btn-bg2-color);
    border-color: var(--btn-border2-color);
} 

nav ul {
    justify-content: space-between;
    gap: 2em;
}

@media(max-width: 30.375em){
    .button p {
        display: none;
    }

    .btn-home {
        display: none;
    }

    .btn-github {
        max-width: 60px;
        max-height: 60px;
        border: none;
        padding: 0px;
        background: url('./res/Github.png') center no-repeat;
        background-size: 40px;
    }
    
    .dark-mode .btn-github {
        filter: invert(100%);
    }
}

.color-mode-toggle {
    width: 40px;
    height: 40px;
    background: url('./res/dark-mode.png') center;
    background-size: cover;
    border-radius: 50%;
}

.color-mode-toggle:hover {
    cursor: pointer;
}

.dark-mode .color-mode-toggle {
    background: url('./res/light-mode.png') center;
}


/* Footer */

footer {
    font-family: "Maven Pro", sans-serif;
    font-size: 16px;
    font-weight: 600;
    position: absolute;
    width: 100vw;
    padding: 0 var(--body-padding) 5vh;
    background-color: var(--footer-bg-color);
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--footer-bg-color));
    pointer-events: none;
    z-index: -1;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section:nth-child(1) {
    display: flex;
    flex-direction: column;
}

.footer-section:nth-child(1) p {
    display: flex;
    flex-direction: column;
}

.footer-section:nth-child(2) {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media(max-width: 46.1em){
    .footer-section:nth-child(2) {
        align-items: end;
    }

    .footer-section:nth-child(2) .links {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
}

@media(max-width: 30.375em){
    .footer-section:nth-child(2) {
        align-items: start;
    }

    .footer-section:nth-child(2) .links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

.footer-section:nth-child(3) {
    display: flex;
    flex-direction: column;
    align-items: end;
}

@media(max-width: 46.1em){
    .footer-section:nth-child(3) {
        align-items: start;
    }
}

.footer-section h3 {
    font-size: var(--fs-400);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    text-decoration: none;
    margin-bottom: 0.3rem;
}

.footer-section a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.social-icons .icon {
    width: min(10vh, 3vw);
    height: min(10vh, 3vw);
    min-width: 30px;
    min-height: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}
