/* 
EM: Relative to the parent element

REM: Relative to the root element (HTML tag)

%: Relative to the parent element

VW: Relative to the viewport’s width

VH: Relative to the viewport’s height
*/

/* ---------- Global Variables ---------- */
:root {
    /* Background Colors */
    --bg-color-1: rgb(30, 30, 35);   /* Dark base color */
    --bg-color-2: rgb(42, 42, 47);  /* Lighter secondary color */
    --bg-mid: color-mix(in srgb, var(--bg-color-1) 50%, var(--bg-color-2) 50%);      /* Midpoint value for single-color backgrounds */
    --bg-gradient: linear-gradient(-120deg, var(--bg-color-1), var(--bg-color-2));  /* Angular gradient */
    
    /* Text Colors */
    --h1-color: rgb(255, 255, 255);
    --h2-color: rgb(245, 245, 245);
    --h3-color: rgb(230, 230, 230);
    --h4-color: rgb(215, 215, 215);
    --h5-color: rgb(195, 195, 195);
    /* Link Colors */
    --link-color: dodgerblue;
    --link-visited-color: steelblue;
    --link-hover-color: orchid;
    --link-active-color: darkorchid;

    /* Font Sizes */
    --font-h1: 2em;
    --font-h2: 1.75em;
    --font-h3: 1.5em;
    --font-h4: 1.25em;
    --font-h5: 1.0em;
    --font-button: 1.0em;
    --font-li: 1.5em;
    
    /* Spacing */
    --section-padding: 20px;
    --section-margin-vertical: 10px;
    --section-margin-horizontal: 0px;
    --post-padding: 15px;
    --post-margin: 15px;
    --inline-padding: 10px 20px;      /* Buttons and inline elements */
    
    /* Buttons */
    --button-bg: rgba(170, 170, 170, 0.74);
    --button-bg-hover: rgba(155, 155, 155, 0.65);
    --button-bg-active: rgba(195, 195, 195, 0.75);
    --button-radius: 5px;
    --button-scale-hover: 1.05;   /* Enlarge on hover */
    --button-scale-active: 0.95; /* Shrink on click */

    /* Underline */
    --underline-color: orangered;
    --underline-thickness: 3px;

    /* Image corners */
    --img-radius: 4px;
    
    /* Code Snippet */
    --code-title-bg-color: rgb(52, 52, 55);
    --code-bg-color: rgb(37, 40, 37);
    --code-text-color: rgb(25, 255, 25);
}

@font-face {
    font-family:  Arial, Open-Dyslexic, Verdana, Helvetica, monospace;
    font-display: swap;
}

/* ---------- Website Components ---------- */

/* Background pattern */
.background {
    overflow-y: auto;
    position: fixed;
    inset: 0;     /* shorthand for top/right/bottom/left = 0 */
    background: var(--bg-gradient);
    background-size: cover;
    z-index: -1;  /* Ensures that the background is behind all content */
}

/* Consistent padding around sections */
section {
    padding: var(--section-padding);
    margin: var(--section-margin-vertical) var(--section-margin-horizontal);
}

/* Header and Footer */
header, footer{
    width: 100%;
    position: relative;
    
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    
    text-align: center;
    
    z-index: 10;
}
header {
    top: 0;
    padding-top: 25px;
    padding-bottom: 45px;
}
footer{
    bottom: 0;
}

h1, h2, h3, h4, h5 {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 0;
}
h1 {
    color: var(--h1-color);
    font-size: var(--font-h1);
}
h2 {
    padding: var(--section-padding) 0;
    color: var(--h2-color);
    font-size: var(--font-h2);
}
h3 {
    width: 95%;
    padding: 7px 0 7px 2.5%;
    color: var(--h3-color);
    font-size: var(--font-h3);
    word-wrap: normal;
    overflow-wrap: anywhere;
}
h4 {
    padding: 5px 0;
    color: var(--h4-color);
    font-size: var(--font-h4);
}
h5 {
    padding: 2px 0;
    color: var(--h5-color);
    font-size: var(--font-h5);
}

/* Responsive post container */
@media (max-width: 1100px) {
    .post { max-width: 800px; }
}
.post
{
    width: 100%;
    max-width: 1000px;
    text-align: left;
    padding: var(--post-padding);
    margin: var(--post-margin) auto;
}

/* Flex-based grid for images or cards */
.row {
    display: flex;

    align-items: center;
    justify-content: center;
}
/* (use 33.33% for three, 25% for four, 50% for two, etc...) */
.column {
    flex: 50%;
    padding: 25px 2px; /* Top/Bottom, Left,Right */
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Images */
img {
    max-width: 100%;
    width: 25%;
    height: auto;
    display: block;
    margin: 0 auto;

    align-items: center;
    justify-content: center;

    border-radius: var(--img-radius);
    padding-top: 15px;
    padding-bottom: 25px;
}

/* Underline */
.underline {
    text-decoration: underline;
    text-decoration-color: var(--underline-color);
    text-decoration-thickness: var(--underline-thickness);
}

/* Button base styling and interactions */
button {
    padding: var(--inline-padding);
    background-color: var(--button-bg);
    color: white;
    border: none;
    cursor: pointer;
    font-size: var(--font-button);
    border-radius: var(--button-radius);
    transition: transform 0.2s ease;
}
button:hover{
    background-color: var(--button-bg-hover);
    transform: scale(var(--button-scale-hover));
    box-shadow: 12px 17px 51px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(6px);
}
button:active{
    background-color: var(--button-bg-active);
    transform: scale(var(--button-scale-active));
}
.backButton {
    z-index: 900; /* on top of others */
    text-align: left;
    margin-top: 2px;
    margin-left: 4px;
    position: fixed;
}

/* Unordered List styling */
ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 25%;
    text-align: left;
}
ul li {
    /* match font size */
    font-size: var(--font-li);
    /* match font color */
    color: var(--h3-color);
}

/* Social media icons*/
.social-media
{
    display: flex;
    justify-content: center;
    list-style: none;
    padding-left: 2.5%;
}
.social-media .icon-content {
    position: relative;
    margin: 0 15px;
}
.social-media .icon-content .tooltip {
    position: absolute;
    bottom: 115%;
    left: 20%;
    transform: translateX(-50%);
    background: currentColor; /* Matches icon color */
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    font-size: 16px;
    transition: all 0.42s ease;
}
.social-media .icon-content:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: -35px;
}
.social-media .icon-content a {
    bottom: 2.5%;
    right: 15px;
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: rgb(77, 77, 77);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}
.social-media .icon-content a:hover {
    box-shadow: 3px 2px 45px 0px rgba(0, 0, 0, 0.12);
    color: white;
}
.social-media .icon-content a svg {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
}
.social-media .icon-content a .filled {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: currentColor;
    transition: all 0.3s ease-in-out;
}
.social-media .icon-content a:hover .filled {
    height: 100%;
}
.social-media .icon-content a[data-social="linkedin"] .filled,
.social-media .icon-content a[data-social="linkedin"] ~ .tooltip {
    background-color: #0274b3;
}
.social-media .icon-content a[data-social="github"] .filled,
.social-media .icon-content a[data-social="github"] ~ .tooltip {
    background-color: #24262a;
}
.social-media .icon-content a[data-social="youtube"] .filled,
.social-media .icon-content a[data-social="youtube"] ~ .tooltip
{
    background-color: #ff0000;
}

/* Links */
a {
    text-decoration: none;
    font-weight: bold;
    color: var(--link-color);
}
a:link {
    color: var(--link-color);
    background-color: transparent;
    text-decoration: none;
}
a:visited {
    color: var(--link-visited-color);
    background-color: transparent;
    text-decoration: none;
}
a:hover {
    color: var(--link-hover-color);
    background-color: transparent;
    text-decoration: underline;
}
a:active {
    color: var(--link-active-color);
    background-color: transparent;
    text-decoration: underline;
}

/* Quote Element */
/* Only used in R-10, so it's been moved there*/

/* Preformatted */
pre {
    background: rgb(42, 44, 42);
    padding: 10px 10px 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    overflow: auto;
    @media #{$media-size-phone}
    {
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    .quote {
        background: none !important;
        color: rgb(225, 195, 195);
        margin: 0;
        padding: 0;
        font-size: inherit;
    }
}

/* Code Snippet Window */
.snippet {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 25px;
}
.Swindow {
    align-items: center;
    justify-content: center;
    display: block;
    margin: 0 auto;
    position: relative;
    height: auto;
    width: auto;
    background: var(--code-title-bg-color);
    border: 5px solid var(--code-title-bg-color);
    border-radius: 15px;
    overflow: hidden;
}
.Swindow-title {
    background: var(--code-title-bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    height: 30px;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
}
.Swindow-title p {
    color: var(--h2-color);
    padding: 0;
    text-align: left;
    font-weight: bold;
    margin: 0;
    font-size: 16px;
}
.Sconsole {
    width: 100%;
    height: auto;
    background-color: var(--code-title-bg-color);
    color: #fff;
    overflow: auto;
}
.Sconsole pre {
    margin: 0;
    padding: 17px;
    background: var(--code-bg-color);
}
.Sconsole pre code {
    outline: none;
    color: var(--code-text-color);
    font-size: 14px;
}
