@import url('https://fonts.googleapis.com/css2?family=Vollkorn:ital,wght@0,400..900;1,400..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vollkorn", serif;
}

body {
    background-image: url('assets/headbga.jpeg');
    background-repeat: repeat;
    background-attachment: fixed;
    background-position: center top;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    color: rgb(125, 13, 13);
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 248, 230, 0.75);
    z-index: -1;
    pointer-events: none;
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    padding-bottom: 0;
    z-index: 1;
}

header {
    position: relative;
    width: 100%;
    min-height: 12vh;
    margin-top: 1em;
    background-image: url('assets/pfbkg2.jpeg');
    background-repeat: repeat-x;
    background-position: center;
    border-top: 4px solid rgb(125, 13, 13);
    border-bottom: 4px solid rgb(125, 13, 13);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 2em;
}

h1 {
    color: rgb(125, 13, 13);
    font-size: 3.5em;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

h2 {
    font-size: 2em;
    text-align: center;
    margin-top: 0.5em;
    color: rgb(125, 13, 13);
    margin-bottom: 1em;
}

h2 span {
    color: rgb(114, 24, 108);
    font-weight: 900;
}

h3 {
    font-size: 2.5em;
    color: rgb(125, 13, 13);
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 700;
    text-align: center;
    padding-top: 1em;
}

.info {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4em 1em;
    margin-bottom: 0;
    background-color: rgba(255, 245, 230, 0.5);
    border-top: 2px solid rgba(125, 13, 13, 0.1);
    border-bottom: 2px solid rgba(125, 13, 13, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
}

.info.title-band {
    padding: 2em 0;
    margin-bottom: 0;
    background-color: rgba(255, 245, 230, 0.5);
}

.info p {
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.6;
    padding: 2em 3em;
    width: 98%;
    max-width: 98%;
    background-image: url('assets/pfbkg.jpeg');
    background-repeat: repeat;
    border: 3px solid rgb(125, 13, 13);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    color: #2c0505;
}


.gallery {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 3em 1em;
    background-color: rgba(255, 245, 230, 0.5);
    border-top: 2px solid rgba(125, 13, 13, 0.1);
    border-bottom: 2px solid rgba(125, 13, 13, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5em;
}

body.dark-mode .info,
body.dark-mode .gallery {
    background-color: rgba(20, 10, 10, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
}

@media (min-width: 1024px) {

    .info,
    .gallery {
        border-radius: 0;
        margin-bottom: 0;
    }
}

.project-item {
    width: 340px;
    background-image: url('assets/pfbkg.jpeg');
    background-size: cover;
    border: 0.5em solid rgb(125, 13, 13);
    border-radius: 8px;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    transition: transform 0.3s ease-in-out, border-color 0.3s ease;
    cursor: pointer;
}

body.dark-mode .link-icon,
body.dark-mode img {
    filter: invert(1) hue-rotate(180deg);
}

body.dark-mode .project-item img {
    filter: none !important;
}

body.dark-mode #theme-toggle {
    filter: invert(1) hue-rotate(180deg);
}

.project-item:hover {
    transform: scale(1.05);
    border-color: rgb(147, 61, 167);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-title {
    font-size: 1.6em;
    font-weight: 700;
    color: rgb(125, 13, 13);
}

.project-desc {
    font-size: 1em;
    font-weight: 600;
    color: #3e0a0a;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    font-size: 0.85em;
    font-weight: 700;
    color: rgb(114, 24, 108);
}

.bottom-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4em;
    width: 100%;
    margin-top: 2em;
}

.bottom-section.info {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.section-header-box {
    background-image: url('assets/pfbkg.jpeg');
    border: 3px solid rgb(125, 13, 13);
    border-radius: 0.25em;
    padding: 0.3em 1.5em;
    font-size: 2em;
    font-weight: 700;
    color: rgb(125, 13, 13);
    display: inline-block;
    margin-bottom: 0.5em;
}

.links-grid {
    display: flex;
    gap: 1.5em;
    flex-wrap: wrap;
    justify-content: center;
}

.link-icon {
    width: 3em;
    height: 3em;
    object-fit: contain;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.link-icon:hover {
    transform: translateY(-5px);
}

#theme-toggle {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: url('assets/pfbkg.jpeg');
    color: rgb(125, 13, 13);
    border: 3px solid rgb(125, 13, 13);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    z-index: 100;
}

#theme-toggle:hover {
    transform: translateY(-50%) rotate(15deg) scale(1.1);
}

body.dark-mode {
    background-color: #0f0505;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.40'/%3E%3C/svg%3E"),
        linear-gradient(rgba(15, 5, 5, 0.90), rgba(15, 5, 5, 0.90)),
        url('assets/darkbg.jpg');
    background-repeat: repeat;
    background-attachment: fixed;
    background-position: center top;
    background-blend-mode: multiply, normal, normal;

}

html {
    scrollbar-width: none;
}

body {
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

body.dark-mode::before {
    display: none;
}

body.dark-mode h2,
body.dark-mode h3 {
    color: #e0d0b0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

body.dark-mode h2 span {
    color: #d484e8;
}

body.dark-mode header,
body.dark-mode .info p,
body.dark-mode .project-item,
body.dark-mode .section-header-box {
    filter: invert(1) hue-rotate(180deg);
}

body.dark-mode .link-icon,
body.dark-mode img {
    filter: invert(1) hue-rotate(180deg);
}

body.dark-mode .project-item img {
    filter: none !important;
}

body.dark-mode #theme-toggle {
    filter: invert(1) hue-rotate(180deg);
}

.footer-mark {
    width: 100%;
    text-align: center;
    padding: 2em;
    font-size: 1.2em;
    font-weight: 700;
    color: rgb(125, 13, 13);
    opacity: 0.8;
    margin-top: 2em;
    border-top: 2px solid rgba(125, 13, 13, 0.1);
}

body.dark-mode .footer-mark {
    color: #e0d0b0;
    border-color: rgba(255, 255, 255, 0.1);
}

@media(max-width:768px) {
    header {
        min-height: 15vh;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.4em;
    }

    #theme-toggle {
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .links-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1em;
    }
}