* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    scroll-behavior: smooth;
    font-family: "Roboto", sans-serif;
}

:root {
    --clr-primary: #000000;
    --clr-secondary: #222222;
    --clr-accent: #8A8A8A;
    --clr-bg-page: #f5f5f5;
    --clr-sidebar: #ffffff;
    --clr-header-footer: #222222;
    --clr-switch: #222222;
    --clr-card: #ffffff;
    --clr-border: #cccccc;
    --clr-project-label: #222222;
    --clr-text-project-label: #ffffff;
    --clr-tab-content: #ffffff;
    --clr-text-primary: #000000;
    --clr-text-secondary: #333333;
    --clr-text-inverted: #ffffff;
}

#theme-switch:checked ~ .wrapper {
    --clr-primary: #ffffff;
    --clr-secondary: #f5f5f5;
    --clr-accent: #444444;
    --clr-bg-page: #000000;
    --clr-sidebar: #121212;
    --clr-header-footer: #121212;
    --clr-switch: #f2f2f2;
    --clr-card: #121212;
    --clr-border: #000000;
    --clr-project-label: #202020;
    --clr-tab-content: #8a8a8a;
    --clr-text-primary: #ffffff;
    --clr-text-secondary: #f5f5f5;
    --clr-text-inverted: #000000;
}

html, body {
    height: 100%;
    background: var(--clr-bg-page);
}

.wrapper {
    background: var(--clr-bg-page);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    background-color: var(--clr-header-footer);
    color: var(--color-surface);
    z-index: 1000;
    padding: 3px 10px 6px 10px;
}

.logo {
    flex: 2;
    text-align: center;
    color: #ffffff;
    font-size: clamp(7px, 2.3vw, 14px);
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo a {
    display: inline-block;
    color: #ffffff;
    font-weight: bold;
}

.logo a:hover {
    transform: scale(1.02);
}

.header-space {
    flex: 1;
}

#menu-toggle {
    display: none;
}

.hamburger {
    display: block;
    flex: 1;
    font-size: clamp(24px, 7.5vw, 44px);
    cursor: pointer;
    color: #ffffff;
}

.close-btn {
    display: block;
    width: 100%;
    font-size: clamp(2rem, 10vw, 4.5rem);
    cursor: pointer;
    color: var(--clr-text-primary);
    text-align: right;
    padding-right: 1rem;
}

nav {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 50%;
    background-color: var(--clr-sidebar);
    z-index: 2000;
}

nav ul {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    list-style-type: none;
    width: max-content;
    height: max-content;
    gap: 10vw;
}

nav a {
    display: inline-block;
    color: var(--clr-text-primary);
    font-size: clamp(16px, 5vw, 32px);
    font-weight: 600;
    transition: 0.3s ease;
}

nav a:hover {
    transform: scale(1.1);
}

.theme-toggle {
    display: flex;
    justify-content: space-around;
    align-items: center;
    transition: 0.5s;
    width: 90%;
    margin-bottom: 2.5vw;
    padding: 0.6rem 0;
    border-radius: 15px;
    background-color: var(--clr-switch);
}

.toggle-text {
    font-size: clamp(12px, 3vw, 28px);
    color: var(--clr-text-inverted);
}

.toggle-label {
    --toggle-width: clamp(50px, 10vw, 100px);
    --toggle-height: calc(var(--toggle-width) * 0.5);
    --circle-size: calc(var(--toggle-height) * 0.8);

    width: var(--toggle-width);
    height: var(--toggle-height);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    background: #ebebeb;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1) inset;
    transition: 0.5s;
}

.circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--circle-size);
    height: var(--circle-size);
    border-radius: 99px;
    background-color: white;
    box-shadow: 
        5px 5px 10px rgba(0, 0, 0, 0.05),
        -5px -5px 15px rgba(0, 0, 0, 0.05) inset;
    position: absolute;
    top: 50%;
    left: 0;
    overflow: hidden;
    transform: translate(10%, -50%);
    transition: 0.5s;
}

.toggle-label svg {
    position: absolute;
    width: calc(var(--circle-size) * 0.7);
}

.sun {
    opacity: 1;
    margin-top: 0;
    color: black;
    transition: 0.5s;
}

.moon {
    opacity: 0;
    margin-top: -150%;
    color: white;
    transition: 0.5s;
}

#theme-switch:checked ~ .wrapper header .theme-toggle {
    background-color: var(--clr-switch);
}

#theme-switch:checked ~ .wrapper header .toggle-label {
    background: #111111;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5) inset;
}


#theme-switch:checked ~ .wrapper header .toggle-label .circle {
    left: 100%;
    transform: translate(-110%, -50%);
    background-color: #444444;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5),
    -10px -10px 30px rgba(0, 0, 0, 0.5) inset;
}

#theme-switch:checked ~ .wrapper header .toggle-label .circle .sun {
    margin-top: 150%;
    opacity: 0;
    transition: 0.5s;
}
#theme-switch:checked ~ .wrapper header .toggle-label .circle .moon {
    margin-top: 0%;
    opacity: 1;
    transition: 0.5s;
}
.toggle-label:active .circle {
    width: 40px;
}

#menu-toggle:checked ~ nav {
    display: flex;
}

#home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100dvh;
}

.hero {
    width: 85%;
    margin: 0 auto;
}

.profile-picture {
    width: 60vw;
    border-radius: 50%;
    margin: 1vh auto 5vh auto;
    transition: 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.05);

}

.name {
    font-size: clamp(20px, 6.7vw, 32px);
    line-height: 1.1;
    color: var(--clr-text-primary);
    width: 95%;
    margin: auto;
}

.role {
    font-size: clamp(20px, 7.8vw, 37px);
    color: var(--clr-text-primary);
    width: 95%;
    margin: 0 auto;
}

.desc {
    font-size: clamp(12px, 4vw, 24px);
    color: var(--clr-text-secondary);
    width: 95%;
    margin: 0.5rem auto 2rem auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    margin-bottom: 1rem;
    gap: 1rem
}

.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.5rem;
    background-color: transparent;
    border: 0.1rem solid var(--clr-primary);
    font-size: 1rem;
    border-radius: 50%;
    transition: 0.3s ease;
    color: var(--clr-primary);
}

.social-icons a:hover{
    color: var(--clr-text-inverted);
    transform: scale(1.1) translateY(-5px);
    background-color: var(--clr-secondary);
}

.download-cv-btn {
    display: block;
    width: max-content;
    margin: 0 auto 0 auto;
    padding: 0.6rem 1.4rem;
    border-radius: 15px;
    background-color: var(--clr-secondary);
    color: var(--clr-text-inverted);
    font-size: clamp(12px, 4vw, 28px);
    font-weight: 500;
    transition: 0.3s ease;
}

.download-cv-btn:hover {
    background-color: var(--clr-primary);
    transform: scale(1.05);
}

#projects {
    width: 85%;
    margin: auto;
    margin-bottom: 3rem;
    padding: 10px 5px 20px 5px;
    scroll-margin: 15vw;
    background-color: var(--clr-card);
    box-shadow: 0 0 15px rgba(0,0,0, 0.2);
    border-radius: 15px;
}

#projects h2,
#articles h2,
.contact-info h2,
.reviews-section h2 {
    padding: 1rem;
    text-align: center;
    color: var(--clr-text-primary);
    font-size: clamp(22px, 5.5vw, 34px);
}

.projects-tabs {
    display: flex;
    flex-direction: column;
    width: 90%;
    margin: auto;
}

.projects-tabs input {
    display: none;
}

.projects-tabs label {
    padding: 10px;
    background: var(--clr-accent);
    cursor: pointer;
    border: 1px solid var(--clr-border);
    color: var(--clr-primary);
    font-size: clamp(14px, 4vw, 28px);
    transition: background-color .3s ease;
    text-align: center;
}

.projects-tabs label:hover {
    background-color: var(--clr-secondary);
    color: var(--clr-text-inverted);
}

.tab-content {
    display: none;
    border: 1px solid var(--clr-border);
    padding: 10px;
    background-color: var(--clr-tab-content);
    font-size: clamp(14px, 3.6vw, 28px);
}

.content-btn {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 10px auto;
}

.content-btn a {
    font-size: clamp(12px, 3.6vw, 28px);
    color: var(--clr-text-inverted);
    background: var(--clr-secondary);
    padding: 5px 15px;
    border-radius: 15px;
    transition: 0.3s ease;
}

.content-btn a:hover {
    background: var(--clr-primary);
    transform: scale(1.05);
}

#tab1:checked + label,
#tab2:checked + label,
#tab3:checked + label,
#tab4:checked + label,
#tab5:checked + label {
    background: var(--clr-project-label);
    color: var(--clr-text-project-label);
}

#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3,
#tab4:checked ~ #content4,
#tab5:checked ~ #content5 {
    display: block;
}

#articles {
    scroll-margin: 15vw;
}

article {
    font-size: clamp(14px, 3.6vw, 28px);
    color: var(--clr-text-primary);
}

article ul {
    list-style: none;
}

.work-experience,
.education {
    width: 85%;
    margin: 2rem auto 20px auto;
    border-radius: 15px;
    padding: 10px 0;
    background: var(--clr-card);
    text-align: center;
    box-shadow: 0 0 15px rgba(0,0,0, 0.2);
}

.work-experience h3,
.work-experience p,
.education h3,
.education ul {
    margin: 5px auto;
    text-align: left;
}

.work-experience article,
.education article {
    width: 80%;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.work-experience a {
    display: inline-block;
    margin: 10px auto 1rem auto;
    background: var(--clr-secondary);
    color: var(--clr-text-inverted);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: clamp(12px, 3.6vw, 28px);
    transition: .3s ease;
}

.work-experience a:hover {
    background: var(--clr-primary);
    transform: scale(1.05);
}

.spaced-list li{
    margin-bottom: 20px;
}

.li-detail {
    display: block;
    margin-top: 5px;
}

.reviews-section {
    width: 85%;
    margin:  0 auto;
    margin-bottom: 2rem;
}

.reviews-section h2 {
    text-align: center;
    margin: 2rem 0 10px 0;
}

.reviews1,
.reviews2,
.reviews3 {
    background: var(--clr-card);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 0 15px rgba(0,0,0, 0.2);
    margin-bottom: 1rem;
}

.reviews blockquote {
    margin-bottom: 1.2rem;
}

#contact {
    display: flex;
    flex-direction: column;
    scroll-margin: 14vw;
}

.contact-info {
    display: contents;
}

.contact-info { order: 1; }
.email-link { order: 2; }
form { order: 3; }
.social-link { order: 4; }

.contact-info p {
    width: 80%;
    margin: 1vh auto 0 auto;
    color:var(--clr-text-primary);
}

.contact-info p:first-of-type {
    font-size: clamp(16px, 4vw, 24px);
    margin-bottom: 1vh;
}

.contact-info p:last-of-type {
    font-size: clamp(14px, 4vw, 22px);
    margin-bottom: 2vh;
}

.email-link {
    display: inline-flex;
    align-items: center;
    color: var(--clr-text-secondary);
    width: 80%;
    margin: 0 auto;
    margin-bottom: 2rem;
    font-size: clamp(14px, 4vw, 22px);
    gap: 1rem;
}

.email-link span,
.social-link a span {
    transition: 0.3s ease;
}

.email-link:hover span {
    transform: scale(1.02);
    color: var(--clr-text-primary);
}

.email-link i {
    position: relative;
    top: 2px;
}

fieldset {
    width: 85%;
    margin: auto;
    padding: 2rem;
    background: var(--clr-card);
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0,0,0, 0.2);
    border: none;
}

fieldset label {
    font-weight: 500;
    font-size: clamp(16px, 4vw, 28px);
    color: var(--clr-text-primary);
}

fieldset input,
fieldset textarea,
fieldset button {
    font-size: clamp(14px, 3.6vw, 26px);
}

fieldset input,
fieldset textarea {
    width: 100%;
    padding: 5px 10px;
    border: 1px solid gray;
    border-radius: 4px;
    margin-top: 5px;
    margin-bottom: 1rem;
    transition: 0.3s ease;
}

.note-error {
    display: none;
}

fieldset input:not(:placeholder-shown):invalid + .note-error,
fieldset textarea:not(:placeholder-shown):invalid + .note-error {
    display: block;
    font-size: clamp(12px, 3.2vw, 16px);
    color: crimson;
    position: relative;
    bottom: 10px;
}

fieldset input:focus,
textarea:focus {
    box-shadow: 0px 0px 5px black;
    border-color: var(--color-primary);
    outline: none;
}

fieldset button {
    display: block;
    margin: 0 auto;
    background: var(--clr-secondary);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: clamp(12px, 3.6vw, 28px);
    color: var(--clr-text-inverted);
    transition: 0.3s ease;
}

fieldset button:hover {
    background: var(--clr-primary);
    transform: scale(1.02);
}

fieldset input:not(:placeholder-shown):invalid,
fieldset textarea:not(:placeholder-shown):invalid {
    border-color: crimson;
}

fieldset input:not(:placeholder-shown):valid,
fieldset textarea:not(:placeholder-shown):valid {
    border-color: green;
}

.social-link ul{
    display: flex;
    justify-content: center;
    align-items: center;
    width: max-content;
    gap: 4vw;
    margin: 2rem auto;
    list-style: none;
}

.social-link a {
    display: inline-flex;
    align-items: center;
    font-size: clamp(14px, 3.8vw, 24px);
    color: var(--clr-text-secondary);
    transition: 0.3s ease;
}

.social-link a:hover span {
    color: var(--clr-text-primary);
    transform: scale(1.1);
}

.social-link i {
    display: none;
}

#footer {
    display: flex;
    justify-content: center;
    padding: 0.8rem;
    background: var(--clr-header-footer);
}

#footer p {
    text-align: center;
    color: #ffffff;
    font-size: clamp(12px, 3.5vw, 24px);
}

footer hr {
    display: none;
}

@media (min-width: 600px)  {

    .hero {
        width: 70%;
    }

    .hamburger { font-size: 4.5vw; }

    .logo { font-size: 1.5vw; }

    nav a { font-size: 4vw; }

    .toggle-text { font-size: 2.8vw;}

    .profile-picture { width: 45vw; }

    .name { font-size: 5.5vw; }
    .role { font-size: 6.4vw; }
    .desc { 
        font-size: 2.6vw; 
        margin-bottom: 3rem;
    }

    .social-icons a {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.8rem;
    }

    .download-cv-btn {
        font-size: 3vw;
        margin-top: 0rem;
        padding: 0.8rem 1.6rem;
    }

    .reviews-section { margin-top: 4rem; }

    #projects h2,
    #articles h2 {
        margin: 1rem 0;
    }

    #projects h2,
    #articles h2,
    .reviews-section h2,
    .contact-info h2 { 
        font-size: 4.2vw; 
    }

    .projects-tabs label,
    .tab-content,
    .content-btn a,
    .work-experience a { 
        font-size: 2.6vw; 
    }
    
    .tab-content { padding-left: 1.2rem; }

    .projects-tabs {
        margin-bottom: 1rem;
    }

    article { 
        font-size: 2.6vw; 
    }

    .work-experience article:last-child,
    .education article:last-child {
        margin-bottom: 3rem;
    }
    
    .work-experience a { margin: 10px 0; }

    #contact { scroll-margin: 4vw;
    }

    .contact-info h2 { margin-top: 3rem;}

    .contact-info p:first-of-type{
        font-size: 3vw;
    }

    .contact-info p:last-of-type { font-size: 2.6vw; }

    fieldset { padding: 3rem; }

    fieldset label { 
        font-size: 2.8vw;
    }

    fieldset input,
    fieldset textarea { 
        font-size: 2.4vw;
        margin-top: 0.4rem;
        padding-left: 0.5rem; 
    }

    fieldset button {
        font-size: 2.6vw;
        margin-top: 1.2rem;
        padding: 0.4rem 0.8rem;
    }

    fieldset input:not(:placeholder-shown):invalid + .note-error,
    fieldset textarea:not(:placeholder-shown):invalid + .note-error {
        font-size: 2vw;
    }

    .email-link { font-size: 2.8vw;}

    .social-link { 
        gap: 10vw; 
        margin: auto;
    }

    .social-link a { font-size: 2.8vw; }

    #footer { padding: 1rem 0;}
    #footer p { font-size: 2.4vw; }

    .content-btn {
        margin: 20px 0 10px 0;
    }

    .reviews p {
        display: block;
        margin: 5px auto;
        width: 95%;
    }
        
}

@media (min-width: 1200px) {

    header {
        margin: 0;
        padding: 0.5rem 0;
    }

    .logo {
        margin: 0;
        padding: 0;
        text-align: left;
        font-size: 0.6vw;
        margin-left: 2rem;
    }

    .header-space {
        display: none;
    }

    .hamburger {
        display: none;
    }

    nav {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        gap: 5rem;
        background: transparent;
        align-items: center;
        margin-right: 2rem;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        width: auto;
        min-height: auto;
        gap: 3rem;
        margin: 0;
        padding: 0;
        text-align: right;
    }

    nav a {
        color: #ffffff;
    }
    
    .close-btn {
        display: none;
    }

    .toggle-text {
        display: none;
    }

    .theme-toggle {
        margin: 0;
        margin-left: 2rem;
    }

    .toggle-label {
        --toggle-width: 65px;
        --toggle-height: 32px;
        --circle-size: 26px;

        width: var(--toggle-width);
        height: var(--toggle-height);
    }

    .circle {
        width: var(--circle-size);
        height: var(--circle-size);
    }

    .toggle-label svg {
        width: calc(var(--circle-size) * 0.7);
    }

    #theme-switch:checked ~ .wrapper header .theme-toggle {
    background-color: transparent;
}

    #home {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        height: 100dvh;
        gap: 14vw;
        margin: 0;
    }

    .profile-picture {
        width: 25vw;
        margin: 0;
    }

    .hero {
        width: 636px;
        margin: 0;
    }

    .name { 
        font-size: 2.7vw; 
        margin: 0;
        width: max-content;
    }

    .role { 
        font-size: 3.2vw; 
        margin: 0;
        width: max-content;
    }

    .desc {
        font-size: 1.3vw; 
        padding-top: 0.8rem;
        margin: 0;
        margin-bottom: 2rem;
        width: 95%;
    }

    .social-icons {
        justify-content: start;
        margin-top: 2rem;
    }

    .social-icons a {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .download-cv-btn {
    display: flex;
    margin: 0;
    font-size: 1vw;
}

    nav a { font-size: 1.2vw; }

    #projects,
    #articles {
        scroll-margin: 6vw;
    }

    #projects h2,
    #articles h2,
    .reviews-section h2,  
    .contact-info h2 {
        font-size: 1.5vw; 
    }

    .projects-tabs label,
    .tab-content { 
        font-size: 0.9vw; 
    }
    
    .content-btn a { font-size: 0.9vw; }

    article { font-size: 0.9vw; }
    
    .work-experience a {
        font-size: 0.9vw; 
        margin-bottom: 1vw;
    }

    .education {
        padding-bottom: 2vw;
    }

    fieldset label {
        font-size: 1vw;
    }

    fieldset input,
    fieldset textarea,
    fieldset button { 
        font-size: 0.8vw; 
    }

    fieldset button {
        margin-bottom: 1rem;
    }

    .social-link a,
    #footer p { 
        font-size: 0.9vw; 
    }

    .desktop-section {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        width: 95%;
        gap: 2rem;
        margin: 0 auto;
    }

    #projects  {
        width: 30%;
        margin: 0;
        padding: 1rem;
    }

    #articles {
        display: flex;
        align-items: stretch;
        margin: 0;
        padding: 0;
        width: 70%;
        gap: 2rem;
    }

    .work-experience,
    .education {
        margin: 0;
    }

    .reviews-section {
        display: flex;
        flex-direction: column;
        margin: 2rem auto 0 auto;
    }

    .reviews-section h2 {
        font-size: 1.7vw;
        margin-bottom: 2rem;
    }

    .reviews{
        display: flex;
        justify-content: space-between;
        gap: 2rem;
    }

    .reviews1,
    .reviews2,
    .reviews3 {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 33.33%;
    }


    #contact {
        display: flex;
        flex-direction: row;
        width: 85%;
        margin: 3.5rem auto 5rem auto;
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        width: 50%;
    }

    .contact-info p,
    .contact-info h2,
    .email-link,
    .social-link {
    text-align: left;
    width: 60%;
}

    #contact h2{
        font-size: 1.9vw;
        text-align: start;
        margin: 0;
        margin-bottom: 2rem;
        padding: 0;
    }

    .contact-info p:first-of-type {
        font-weight: 500;
        margin-bottom: 1rem;
        font-size: 1.1vw;
    }

    .contact-info p:last-of-type {
        font-size: 0.9vw;
        margin-bottom: 10rem;
    }

    .email-link {
        margin: 0;
        font-size: 1vw;
    }

    .social-link {
        margin: 1rem;
    }

    .social-link ul{
        margin: 0;
        padding: 0;
        justify-content: flex-start;
        gap: 1vw;
    }

    .social-link a {
        display: inline-flex;
        align-items: center;
        gap: 1rem;
    }

    .social-link a i {
        display: block;
        pointer-events: none;
        transform: none !important;
    }

    form {
        width: 50%;
    }

    fieldset {
        margin: 0;
        width: 100%;
        padding: 1.8rem 2.5rem;
    }

    fieldset input:not(:placeholder-shown):invalid + .note-error,
    fieldset textarea:not(:placeholder-shown):invalid + .note-error {
        font-size: 0.6vw;
    }
}