/*** main style ***/
/*
    this .css is organized by alphabetizing properties and selectors (alphabetical convention).

    I first ordered all the tags, then the classes and finally the ids. Furthermore, to avoid ambiguity, for each block of properties, from right to left this rule applies: in the ordering, tags take priority over classes and classes take priority over ids
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap');

* {
    /* reset/initialization */
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    overflow-x: initial;
    padding: 0;
    scroll-behavior: smooth;
}

::-moz-selection {
    background: var(--color-details);
    color: var(--color-primary);
}

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-lettering);
}

::selection {
    background: var(--color-details);
    color: var(--color-primary);
}

/*
    https://codepen.io/sosuke/pen/Pjoqqp
    I used this fantstic tool to change the colors of the .png icons with css filters.
    It approximates the desired color and seems to work very well
*/
:root {
    /* default color palette */
    --color-black: invert(15%) sepia(10%) saturate(244%) hue-rotate(314deg) brightness(101%) contrast(85%); /* #373434 */
    --color-blue:  invert(24%) sepia(13%) saturate(1455%) hue-rotate(169deg) brightness(99%) contrast(88%); /* #34495e */

    --color-details:   #34495e;
    --color-footer:    #918d8d;
    --color-lettering: #373434;
    --color-primary:   #c4c1c1;
    --color-secondary: #b1aeae;

    --color-dark-icon:    var(--color-blue);
    --color-dark-icon2:   var(--color-black);
    --color-menu-icon:    var(--color-blue);
    --color-social-icon:  var(--color-black);
    --color-social-icon2: var(--color-blue);
}

/*** TAGS ***/
a, a:active, a:link, a:visited {
    color: var(--color-details);
    font-weight: 500;
}

a:hover {
    color: var(--color-lettering);
    font-weight: 500;
}

.footer-icon li a {
    display: grid;
    height: 40px;
    place-items: center;
    width: 40px;
}

.copyright p a {
    color: var(--color-lettering);
    text-decoration: none;
}

header ul li.submenu > a:first-of-type {
    color: var(--color-lettering);
    pointer-events: none;
    text-decoration: none;
}

aside {
    border-left: solid 5px var(--color-primary);
    z-index: 1;
}

blockquote {
    background-color: var(--color-secondary);
    border-left: 5px solid var(--color-lettering);
    color: var(--color-lettering);
    margin-bottom: 5px;
    margin-top: 5px;
    padding: 15px;
}

.footer-icon li button {
    display: grid;
    height: 40px;
    place-items: center;
    width: 40px;
}

.dark-theme button {
    background-color: inherit;
    border: none;
}

details {
    background-color: var(--color-secondary);
    border-left: 5px solid var(--color-lettering);
    color: var(--color-lettering);
    margin-top: 5px;
    padding: 15px;
}

.submenu:hover div {
    display: block;
}

h1, h2, h3 {
    color: var(--color-lettering);
    font-weight: 450;
}

/* .heading h1, */
.content h2,
.heading h2 {
    font-size: 30px;
}

.content h3 {
    font-size: 25px;
}

#right-panel h5 {
    color: var(--color-lettering);
    margin-bottom: 5px;
    margin-top: 7px;
}

header {
    background-color: var(--color-secondary);
    border-right: solid 5px var(--color-primary);
    bottom: 0;
    box-sizing: border-box;
    display: flex;
    font-size: 1.2rem;
    justify-content: space-between;
    padding: 180px 20px 180px 0px; /* 130px 20px 130px 0px */
    position: fixed;
    top: 0;
    transition: 0.5s;
    width: calc(18% + 5px);
    z-index: 1;
}

hr {
    border: 0;
    border-top: 5px solid var(--color-secondary);
    margin-bottom: 20px;
    margin-top: 30px;
}

html {
    background: var(--color-primary);
}

html[data-theme="dark"] {
    /* dark color palette */
    --color-purple: invert(34%) sepia(39%) saturate(2774%) hue-rotate(251deg) brightness(100%) contrast(119%); /* #b23eff */
    --color-white:  invert(90%) sepia(0%) saturate(0%) hue-rotate(194deg) brightness(91%) contrast(96%); /* #cecece */

    --color-details:   #b23eff;
    --color-footer:    #181818;
    --color-lettering: #cecece;
    --color-primary:   #222222;
    --color-secondary: #373434;

    --color-dark-icon:    var(--color-purple);
    --color-dark-icon2:   var(--color-white);
    --color-menu-icon:    var(--color-purple);
    --color-social-icon:  var(--color-white);
    --color-social-icon2: var(--color-purple);
}

.footer-icon li a img {
    filter: var(--color-social-icon);
    max-width: 24px;
}

.dark-theme img {
    filter: var(--color-dark-icon);
    max-width: 24px;
}

.footer-icon li a img:hover {
    filter: var(--color-social-icon2);
}

.dark-theme img:hover {
    filter: var(--color-dark-icon2)
}

header ul li:nth-child(5) div li {
    margin: 0px;
}

header ul li {
    margin: 7px 0 7px 0;
}

.check-list li {
    color: var(--color-lettering);
    list-style-type: none;
    margin-bottom: 0.3rem;
    padding-left: 1.5rem;
    position: relative;
}

.footer-icon li {
    list-style: none;
}

.check-list li:before {
    border-width: 0 0 0 0;
    content: 'o';
    display: block;
    height: 11px;
    left: 0;
    position: absolute;
    top: -2px;
    transform-origin: bottom left;
    width: 5px;
}

p {
    color: var(--color-lettering);
    font-weight: 400;
    /* letter-spacing: 0.5px; */
    text-align: justify;
}

.content p {
    padding-bottom: 24px;
}

#whats-new .content p {
    padding: 0px;
}

.copyright p {
    padding: 0px;
    text-align: center;
}

#right-panel p {
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: initial;
}

pre {
    background-color: var(--color-primary);
    color: var(--color-lettering);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    overflow-x: auto;
    padding: 10px 0 10px 20px;
    /* text-align: center; */
}

#post pre {
    background-color: var(--color-secondary);
}

section {
    font-size: 1.2rem;
    margin-left: calc(18% + 5px);
    margin-right: calc(18% + 5px);
    padding: 40px 5.810vw 36px 5.810vw; /* 100px 23.810vw 100px 23.810vw */
}

ul {
    list-style: none;
}

/*** CLASSES ***/
.arrow {
    -webkit-transform: rotate(-45deg);
    border: solid var(--color-details);
    border-width: 0px 2px 2px 0px;
    display: inline-block;
    margin-bottom: 2px;
    padding: 3px;
    transform: rotate(-45deg);
}

.submenu:hover .arrow {
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

h1.bigheader {
    font-size: 8vw;
    margin-bottom: 30px;
    text-align: center;
    /* text-decoration: initial; */
}

#post h1.bigheader {
    margin-bottom: 0px;
}

.check-list { /* custom unordered list */
    margin: 0;
    padding-left: 1rem;
    /* padding-top: 0.5rem; */
}

.copyright {
    background: var(--color-footer);
    border-top: solid 5px var(--color-primary);
    padding: 10px;
    position: relative;
    z-index: 0;
}

header .current-page {
    color: var(--color-lettering);
    text-decoration: none;
}

header .current-subitem {
    color: var(--color-lettering);
    text-decoration: none;
}

.cursor {
    background: white;
    border-radius: 50%;
    height: 1rem;
    mix-blend-mode: difference;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, -50%);
    transform-origin: 100% 100%;
    transition: all 0.3s ease;
    transition-property: background, transform;
    width: 1rem;
    z-index: 6;
}

.cursor-change {
    background: black;
    transform: scale(2);
}
.cursor-dark {
    background: var(--color-details);
    mix-blend-mode: initial;
    opacity: 0.5;
}

.footer-icon {
    align-items: center;
    display: flex;
    justify-content: center;
}

.heading {
    color: var(--color-lettering);
    margin-bottom: 10px;
}

.innercursor {
    background: var(--color-details);
    border-radius: 50%;
    display: none;
    height: .5rem;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, -50%) ;
    transform-origin: 100% 100% ;
    transition: all 0.2s ease;
    width: .5rem;
    z-index: 5;
}

.innercursor-change {
    background: var(--color-details);
    display: block;
    height: 1rem;
    opacity: 0.7;
    transition-property: background, transform;
    width: 1rem;
    z-index: 7;
}

.innercursor-dark {
    background: var(--color-details);
    display: block;
}

.keyword {
    font-weight: 500;
}

.menu-div {
    text-align: right;
    transition: 0.5s;
}

.smallheader {
    font-size: 3vw;
}

.submenu-options {
    background-color: var(--color-primary);
    display: none;
    padding: 5px 10px 5px 10px;
    /* width: 100%; */
}

.warning {
    color: red;
    font-weight: 500;
    text-decoration: underline;
}

/*** IDS ***/
#right-panel {
    background-color: var(--color-secondary);
    bottom: 0;
    box-sizing: border-box;
    /* overflow-y: scroll; */
    padding: 180px 0px 180px 20px;
    position: fixed;
    right: 0;
    top: 0;
    width: calc(18% + 5px);
}

section#about-intro,
section#contact-intro,
section#home,
section#post,
section#posts-2025,
section#tags-list {
    background: var(--color-primary);
    padding-top: 100px;
}

section#extras {
    background: var(--color-primary);
}

section#pgp-key,
section#projects,
section#whats-new {
    background: var(--color-secondary);
}

section#about-intro,
section#posts-2025,
section#tags-list {
    height: calc(100vh - 79px + 1px); /* temp class; to remove eventually */
}
