:root {
    --bg-dark: url("https://i.redd.it/7vvhf0lpqd8b1.png");
    --bg-light: url("https://10wallpaper.com/wallpaper/2560x1600/2107/Blue_Creative_2021_Windows_11_Dynamic_4K_HD_2560x1600.jpg");

    --text-dark: white;
    --text-light: black;

    --card-dark: #111;
    --card-light: #ffff;
    
    --accent-dark: #956afa;
    --accent-light: #2f80ed;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-image: var(--bg-dark);
    background-repeat: no-repeat;
    background-position: center;
    color: var(--text-dark);
    background-size: cover;
    background-attachment: scroll;
    background-color: #ccc;
    transition: 
        background-image, 0.6s ease,
        color 0.4s ease;
}
body.light {
    background-image: var(--bg-light);
    color: var(--text-light);
}
body.light .trabalho,
body.light .trabalho2 {
    background: var(--card-light);
    color: var(--text-light);
}
body.light h1 {
    color: #111;
}
body.light .trabalho {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
body.light .trabalho2 {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
body.light .words::after {
    background-color: transparent;
}
body.light .word {
    color: darkblue;
}
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--accent-dark);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}
.icon-wrapper {
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .4s;
    pointer-events: none;
}
.icon {
    width: 16px;
    height: 16px;
    position: absolute;
    transition: all 0.4s ease;
}
.sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
    fill: black;
}
.moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1); 
    fill: var(--accent-dark);
}
input:checked + .slider {
    background-color: var(--accent-light);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

input:checked + .slider .icon-wrapper {
    transform: translateX(30px);
}
input:checked + .slider .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

input:checked + .slider .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0); 
}
header {
    color: white;
    text-align: center;
    padding: 50px 20px;
}
header h1 {
    margin: 0;
    font-size: 2.5em;
}
section {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-direction: column;
}
section h2 {
    background: linear-gradient(180deg, #080808, #1a1a1a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.trabalhos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.trabalho {
    width: 390px;
    height: 250px;
    background: #111;
    border-radius: 20px;
    box-shadow: 0 0 40px 10px rgba(255, 248, 185, 0.4); 
    justify-content: center;
    align-items: center;
    color: white;
    font-family: sans-serif;
    font-size: 1.2em;
    position: relative;
}
.trabalho a {
    color: #6d04e4;
    text-decoration: none;
}
.trabalho a:hover {
    text-decoration: underline;
}
.trabalho2 {
    width: 1000px;
    height: 200px;
    background: #111;
    border-radius: 20px;
    box-shadow: 0 0 40px 10px rgba(255, 248, 185, 0.4); 
    justify-content: center;
    align-items: center;
    color: white;
    font-family: sans-serif;
    font-size: 1.2em;
    position: relative;
}
.trabalho, .trabalho2{
    background: var(--card-dark);
    transition: background 0.4s ease, color 0.4s ease;
}
.trabalho:hover, .trabalho2:hover {
    transform: scale(1.03);
        transition: 1s;
}
/* texto animado*/
.linha-animada {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    color: white;
    flex-wrap: wrap;
}
.words {
    position: relative;
    height: 1.35em;
    overflow: hidden;
    display: inline-block;
}
.words::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.2) 20%,
        rgba(0, 0, 0, 0.2) 80%,
        rgba(0, 0, 0, 0) 100%
    );
}
.word {
    display: block;
    height: 1.35em;
    line-height: 1.35em;
    padding-left: 4px;
    color: var(--accent-dark);
    animation: linha-spin 4s infinite;
}
@keyframes linha-spin {
    10% { transform: translateY(-102%); }
    25% { transform: translateY(-100%); }
    35% { transform: translateY(-202%); }
    50% { transform: translateY(-200%); }
    60% { transform: translateY(-302%); }
    75% { transform: translateY(-300%); }
    85% { transform: translateY(-402%); }
    100% { transform: translateY(-400%); }
}
footer {
    text-align: center;
    padding: 20px;
    background: #111;
    color: white;
}
/* animação de scroll */
.aboutme {
    animation: scrollshow;
    animation-timeline: view(45%  auto);
}
@keyframes scrollshow{
    from{
        opacity: 0;
        transform: translateY(200px) scale(0.3);
    }to{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.works {
    animation: scrollshow both;
    animation-timeline: view(100% 5%);
}
@keyframes scrollshow{
    from{
        opacity: 0;
        transform: translateY(100px) scale(0.3);
    }to{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.insta, .github {
    height: 45px;
    width: 45px;
    padding: 8px;
}