/* 
 * Copyright (c) 2025. Zahra A. S.
 * All rights reserved. 
 * This design is the intellectual property of Zahra A. S. 
 * Unauthorized use, reproduction, or distribution of this design is prohibited. 
 * For permissions, contact 182934048+zhrsh@users.noreply.github.com
 */

/* =========================== 
 * CSS VARIABLES
 * =========================== */
:root {
    --sidebar-bg: rgb(14, 14, 14); /* sidebar background color */
    --foreground: white; /* mostly for text color */
    --ignored-bm-foreground: white; /* foreground color that will not change when bloodmoon theme is activated */
    --content-bg: rgb(20, 20, 20); /* main content background color */
    --accent-color: rgb(197, 22, 22);
    --ignored-bm-accent: rgb(197, 22, 22); /* accent color that will not change when bloodmoon theme is activated */
    --accent-color-darker: rgb(124, 16, 16);
    --accent-color-alpha: rgba(197, 22, 22, 0.5);
    --black: rgb(0, 0, 0); /* pitch black */
    --side-bar-width: 400px;
    --eb-garamond:'EB-Garamond', 'Times New Roman', Times, serif;
}

/* =========================== 
 * FONTS
 * =========================== */
/* font: Blackletter */
@font-face { 
    font-family: 'Blackletter';
    src: url('../fonts/meyne_textur.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
/* font: Blackletter_Fallback, incase the ttf does not load */
@font-face { 
    font-family: 'Blackletter_Fallback';
    src: url('../fonts/UnifrakturMaguntia-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}
/* font: EB-Garamond */
/* normal import */
@font-face { 
    font-family: 'EB-Garamond';
    src: url('../fonts/EBGaramond-Regular.woff2') format('woff2'), 
        url('../fonts/ebgaramond-variablefont_wght.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'EB-Garamond';
    src: url('../fonts/EBGaramond-Medium.woff2') format('woff2');
    font-weight: 500; /* medium */
    font-style: normal;
}
@font-face {
    font-family: 'EB-Garamond';
    src: url('../fonts/EBGaramond-SemiBold.woff2') format('woff2');
    font-weight: 600; /* semiBold */
    font-style: normal;
}
/* italic import */
@font-face {
    font-family: 'EB-Garamond';
    src: url('../fonts/EBGaramond-Italic.woff2') format('woff2'), 
        url('../fonts/ebgaramond-italic-variablefont_wght.woff') format('woff');
    font-weight: 400; /* regular italic */
    font-style: italic; 
}
@font-face {
    font-family: 'EB-Garamond';
    src: url('../fonts/EBGaramond-MediumItalic.woff2') format('woff2');
    font-weight: 500; /* medium Italic */
    font-style: italic;
}
@font-face {
    font-family: 'EB-Garamond';
    src: url('../fonts/EBGaramond-SemiBoldItalic.woff2') format('woff2');
    font-weight: 600; /* semibold Italic */
    font-style: italic;
}



/* ===========================
 * TYPE SELECTORS
 * =========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}    

body {
    font-family: var(--eb-garamond);
    font-feature-settings: "ornm"; /* for EB Garamond ornaments like the finger bullet */
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--black);
}

p {
    font-size: 20px;
    transition: color 0.5s ease;
}

h1 {
    text-align: center;
    font-weight: 400;
    font-size: 75px;
    text-shadow: 0.05em 0.05em 0px black;
    margin-bottom: 15px;
    transition: color 0.5s ease;
}

section {
    position: relative;
    width: 100%;
}



/* ===========================
 * GENERAL CLASSES
 * =========================== */
::selection {
    background-color: var(--accent-color-alpha);
    color: var(--foreground);
}
/* for firefox */
::-moz-selection {
    background-color: var(--accent-color-alpha); 
    color: var(--foreground);
}

/* class for blackletter font */
.blackletter {
    font-family: 'Blackletter', 'Blackletter_Fallback', 'EB-Garamond', cursive;
    font-weight: 400;
}

/* class for EB Garamond /swash/ font */
.swash {
    font-family: 'EB-Garamond', 'Times New Roman', Times, serif;
    font-style: italic;
    font-feature-settings: 'swsh' 1; /* EB Garamond swash */
    font-weight: 400;
}

.links {
    text-decoration: none;
    color: var(--foreground);
    transition: color 0.5s ease;
}
.links:hover {
    color: var(--accent-color);
}

.custom-bullets {
    list-style-type: none;
    padding: 0;
    margin-left: 10px;
    font-size: 20px;
}
.custom-bullets li {
    position: relative;
    padding-left: 1.75em;
}
.custom-bullets li::before {
    content: '☞';
    position: absolute; 
    left: 0;
}



/* ===========================
 * MAIN CONTAINERS
 * =========================== */

/* fadeIn (most outer container) */
.fadein {
    opacity: 0; /* start fully transparent */
    animation: fadeIn 3s forwards; /* apply the fadeIn animation */
}
@keyframes fadeIn {
    to {
        opacity: 1; /* end fully opaque */
    }
}

/* behind the .container */ 
.background-image {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../img/paralax-hq.jpg), url(../img/paralax-lq.jpg); /* fallback low quality image */
    background-color: var(--accent-color-darker); /* incase the lq image doesn't load either, set fallback color in place of the image */
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* scroll for mobile compatibility? */
    z-index: -1; /* ensure this is behind the container */
    transition: filter 0.5s ease; /* transition for when bm theme is activated */
}

/* main container that holds the whole page */ 
.container {
    display: flex;
    z-index: 1;
}



/* ===========================
 * SIDEBAR
 *    left of content
 * =========================== */

.sidebar {
    width: var(--side-bar-width); /* fixed width for the sidebar */
    background: var(--sidebar-bg);
    color: var(--foreground);
    padding: 40px;
    position: fixed;
    height: 100vh;
    overflow: scroll;
}

.sidebar hr {
    border: none;
    height: 0.5px;
    margin-left: 20%;
    margin-right: 20%;
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: var(--foreground);
    transition: background-color 0.5s ease;
}

.sidebar h2 {
    text-align: center;
    font-size: 70px;
    font-weight: 400;
    line-height: 1;
    margin-top: 15px;
    margin-bottom: 15px;
    font-style: normal;
}

.sidebar-subtitle {
    text-align: center;
    font-size: 20px;
}
.sidebar-credits {
    text-align: center;
    font-size: 15px;
}

.sidebar img {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    font-size: 20px;
    text-align: center;
    font-style: italic;
}

.sidebar ul li a {
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.5s ease;
}
.sidebar ul li a:hover {
    color: var(--accent-color);
    text-decoration: none;
}



/* ===========================
 * CONTENT
 * =========================== */

.content {
    margin-left: var(--side-bar-width); /* space for the sidebar */
    flex: 1; /* take the remaining space */
}

.content .content-sections {
    padding: 40px;
    background-color: var(--content-bg);
}

.content-sections h2 {
    text-transform: uppercase;
    font-weight: 400;
}

.content hr {
    border: none;
    height: 1px;
    margin-top: 50px;
    margin-bottom: 50px;
    background-color: var(--ignored-bm-foreground);
}



/* ===========================
 * SECTION CLASSES
 * =========================== */

.bg-img-shorter { /* transparent section to show paralax bacgkground image behind it (shorter) */
    height: 30vh;
}

.bg-img { /* transparent section to show paralax bacgkground image behind it (100vh) */
    height: 100vh;
}

.bg-img .title-container {
    position: absolute; 
    bottom: 25px;
    right: 70px;
    color: var(--ignored-bm-foreground);
}

.bg-img .title-container h2 { /* for the transparent section with text */
    text-align: right;
    font-size: 100px;
    margin-top: -0.4em;
    text-shadow: 0.05em 0.05em 0px rgba(0, 0, 0, 0.30);
}

.bg-img .title-container p {
    text-align: right;
    font-size: 35px;
    text-shadow: 0.05em 0.05em 0px rgba(0, 0, 0, 0.30);;
}

/* button to activate the bloodmoon theme */
#secret-button-bm {
    cursor: help;
}



/* ===========================
 * ABOUT CONTAINER
 * =========================== */

/* about grid container (made using grid.layoutit.com) */
.about {  
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px 20px; 
    grid-auto-flow: row;
    grid-template-areas:
        "about-pfp about-text about-text"
        "about-pfp about-list1 about-list2"
        ". . .";
}
.about .header {
    background-color: var(--foreground);
    width: 100%;
    color: var(--content-bg);
}
.about h3 {
    font-size: 24px;
}
.about h2 {
    font-size: 27px;
    color: var(--content-bg);
    background-color: var(--ignored-bm-foreground);
    padding: 1px 1px 1px 15px;
    margin-bottom: 20px;
}
.about hr {
    margin: 20px 0px 0px 0px;
}

/* grid element 1 */
.about-pfp { 
    grid-area: about-pfp; 
    height: min-content;
    background-color: var(--ignored-bm-foreground);
    padding: 10px;
    font-style: italic;
    color: var(--content-bg);
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: center;
}
.about-pfp .pfp-img-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
    border: var(--foreground) 0.01px solid;
}
.about-pfp .pfp-img-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease, filter 0.5s ease;
}
.about-pfp .pfp-img-container img:hover {
    transform: scale(1.1);
}

/* grid element 2 */
.about-text { 
    grid-area: about-text; 
    height: auto;
}
    .about-text h2 {
        font-size: 38px;
        background-color: var(--ignored-bm-foreground);
    }

/* grid element 3 */
.about-list1 { 
    grid-area: about-list1; 
}

/* grid element 4 */
.about-list2 { 
    grid-area: about-list2; 
}


        
/* ===========================
 * PORTFOLIO CONTAINER
 * =========================== */
 
.portfolio-container {
    display: grid;
    margin-top: 15px;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border: 10px solid var(--ignored-bm-foreground); 
}

.portfolio-item img {
    width: 100%;
    height: auto;
    transition: transform 0.8s ease, filter 0.8s ease;
    filter: saturate(0%);
}

.portfolio-item:hover img {
    transform: scale(1.1);
    filter: saturate(100%);
}
.portfolio-item:hover .project-name {
    color: var(--ignored-bm-accent);
}

.project-name {
    position: absolute;
    font-style: italic;
    bottom: 0;
    left: 0;
    width: 100%;
    color: var(--sidebar-bg);
    background-color: var(--ignored-bm-foreground);
    padding: 5px;
    box-sizing: border-box; /* ensure padding is included in width */
    transition: color 0.8s ease;
}



/* ===========================
 * CONTACT CONTAINER
 * =========================== */
.get-in-touch {
    margin: 0 auto;
    padding: 30px;
    width: 100%;
    background-color: var(--sidebar-bg);
}
.get-in-touch h2 {
    text-align: center;
    padding-bottom: 15px;
}
.get-in-touch input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 0px;
    font-family: var(--eb-garamond);
    height: 60px;
    font-size: 18px;
}
.get-in-touch button {
    width: 100%;
    padding: 10px;
    background-color: var(--ignored-bm-accent);
    color: var(--ignored-bm-foreground);
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    font-family: var(--eb-garamond);
    font-size: 18px;
    transition: background-color 0.5s ease;
}
.get-in-touch button:hover {
    background-color: var(--accent-color-darker);
}



/* ===========================
 * BACK TO THE TOP BUTTON
 *    mobile only
 * =========================== */
.back-to-top {
    display: none; /* hide for larger screens */
}



/* ===========================
 * MEDIO QUERIES
 * =========================== */

/* large desktops */
@media (max-width: 1180px) {
    .sidebar {
        width: 200px; /* adjust sidebar width for smaller screens */
    }

    .content {
        margin-left: 200px; /* adjust content margin */
    }
    .sidebar h2 {
        font-size: 50px;
    }
}

/* smaller desktops / tablets */
@media (max-width: 900px) {
    .portfolio-container {
        grid-template-columns: 1fr; /* change portfolio grid to a single column */
    }
    .about {
        grid-template-columns: 1fr; /* change about grid to a single column */
        grid-template-areas:
          "about-pfp"
          "about-text"
          "about-list1"
          "about-list2";
    }
    .about-pfp {
        flex-direction: row;
    }
    .pfp-subtitle {
        font-size: 2.6vw;
    }
}

/* tablets / mobile devices */
@media (max-width: 600px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%; /* full width for sidebar on small screens */
        position: relative; /* change to relative */
        height: auto; /* auto height */
    }
    .sidebar h2 {
        font-size: 70px;
    }

    .content {
        margin-left: 0; /* no margin on small screens */
    }

    .bg-img { /* transparent section to show paralax bacgkground image */
        height: 50vh;
    }

    /* only appears for this vw size */
    .back-to-top {
        display: flex; /* enable flexbox */
        justify-content: center; /* center horizontally */
        align-items: center; /* center vertically */
        position: fixed;
        bottom: 20px;
        right: 20px; /* bottom right of the screen for ergonomics */
        height: 50px;
        width: 50px;
        padding: 0px 1px 3px 0px;
        font-size: 40px;
        text-decoration: none;
        z-index: 1000;
        background-color: rgba(0, 0, 0, 0.500); /* inverted colors of content */
        color: var(--foreground);
        transition: color 0.5s ease, background-color 0.5s ease;
    }
    .back-to-top:hover {
        background-color: var(--sidebar-bg);
        color: var(--accent-color);
    }
    .pfp-subtitle {
        font-size: 3.7vw;
    }
}

/* small mobile devices */
@media (max-width: 400px) {
    h1 {
        font-size: 20vw;
        margin-bottom: 0px;
    }
    .about-pfp {
        flex-direction: column;
    }
    .pfp-subtitle, p, li {
        font-size: 18px;
    }
    .bg-img .title-container {
        bottom: 0px;
        right: 30px;
    }
    /* for the header title */
    .bg-img .title-container h2 {
        font-size: 25vw;
    }
    .bg-img .title-container p {
        font-size: 9vw;
    }
    .content .content-sections, .sidebar {
        padding: 20px;
    }
}