body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    background-color: #f4f4f4; 
    color: #333; 
}
header { 
    background: #222; 
    color: #fff;
    padding: 40px 0; 
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

header img{
    border-radius: 50%;
    width: 140px;
    height: 140px;
    object-fit: cover;
    position: absolute;
    left: 2%;
}
header a{
    border-radius: 50%;
    width: 140px;
    height: 140px;
    border: 3px solid #444;
    position: absolute;
    left: 2%;
}

header h1{
    font-size: 42px;
    width: 100%;
}
header p{
    font-size: 20px;
}

.profile {
    max-width: 900px;
    margin: 40px auto 0;
    display: flex;
    align-items: center;
    gap: 30px;
}
.profile img {
    border-radius: 50%;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 3px solid #444;
    margin-left: 1em;
}
.profile-info h2 { 
    margin-bottom: 10px; 
}
.gallery-title {
    text-align: center;
    margin: 50px 0 10px;
    font-size: 2em;
    color: #222;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Always 4 columns */
    gap: 18px;
    max-width: 1100px; /* Optional: prevents gallery from getting too wide */
    margin: 0 auto 80px;
}
.gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.12);
    transition: transform 0.2s;
}
.gallery img:hover {
    transform: scale(1.03);
}
footer {
    text-align: center;
    padding: 24px 0;
    background: #222;
    color: #fff;
}
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
        max-width: 90%;
    }
    header img{
        position: relative;
    }
    header a{
        position: relative;
    }
    .profile-info p{
        margin-right: 1em;
    }
}
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr; /* 1 column for mobile */
        max-width: 90%;
    }
    header{
        height: max-content;
    }
    header img{
        position: relative;
    }
    header a{
        position: relative;
    }
    #toggle{
        margin-right: 0.5em;
    }
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

#toggle
{
    position: relative;
    display: block;
    width: 50px;
    height: 25px;
    border-radius: 25px;
    background: #fff;
    transition: 0.5s;
    cursor: pointer;
    box-shadow: inset 0 8px 60px rgba(0,0,0,0.1),
                inset 0 8px 8px rgba(0,0,0,0.1),
                inset 0 -4px 4px rgba(0,0,0,0.1);
}

#toggle.active
{
    background: #222;
    box-shadow: inset 0 2px 60px rgba(0,0,0,0.1),
                inset 0 2px 8px rgba(0,0,0,0.1),
                inset 0 -4px 4px rgba(0,0,0,0.05);
}

#toggle .indicator
{
    position: absolute;
    top: 0;
    left: 0;
    width: 25px;
    height: 25px;
    background: linear-gradient(to bottom, #eaeaea, #f9f9f9);
    border-radius: 50%;
    transform: scale(0.9);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5),
                inset 0 4px 4px rgba(255,255,255,0.2),
                inset 0 -4px 4px rgba(255,255,255,0.2),;
    transition: 0.5s;
}

#toggle.active .indicator
{
    left: 25px;
    background: linear-gradient(to bottom, #444, #222);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1),
    inset 0 4px 4px rgba(255,255,255,1),
    inset 0 -4px 4px rgba(255,255,255,1),;
}

body.active{
    background-color: #222;
    color: #f4f4f4;
}

body.active header{
    background-color: #0a1821;
    color: #fff;
}

body.active footer{
    background-color: #0a1821;
    color: #fff;
}

.light{
    height: 25px;
    display: flex;
    align-items: center;
    margin-right: 1em;
    transition: 0.5s;
}

.dark{
    display: none;
    transition: 0.5s;
}

body.active .light{
    display: none;
}

body.active .dark{
    height: 25px;
    display: flex;
    align-items: center;
    margin-right: 1em;
}

.togl
{
    width: fit-content;
    height: 25px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: absolute;
    right: 1%;
    top: 3%;
}

body.active h2
{
    color: white;
}






