/* https://github.com/elad2412/the-new-css-reset v1.11.1 */
/* custom styles for: pre, code */

*:where(:not(html, iframe, canvas, img, svg, video, audio, pre, code):not(svg *, symbol *)) {
    all: unset;
    display: revert;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    overflow: visible;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    margin: 0;
}

a, button {
    cursor: revert;
}

ol, ul, menu, summary {
    list-style: none;
}

img {
    max-inline-size: 100%;
    max-block-size: 100%;
}

table {
    border-collapse: collapse;
}

input, textarea {
    -webkit-user-select: auto;
}

textarea {
    white-space: revert;
}

meter {
    -webkit-appearance: revert;
    appearance: revert;
}

:where(pre) {
  all: revert;
  box-sizing: border-box;
}

::placeholder {
  color: unset;
}

::marker {
    content: initial;
    font-weight: bold;
}

:where([hidden]) {
    display: none;
}

:where([contenteditable]:not([contenteditable="false"])) {
    -moz-user-modify: read-write;
    -webkit-user-modify: read-write;
    overflow-wrap: break-word;
    -webkit-line-break: after-white-space;
    -webkit-user-select: auto;
}

:where([draggable="true"]) {
    -webkit-user-drag: element;
}

:where(dialog:modal) {
    all: revert;
    box-sizing: border-box;
}

pre, code {
    margin: 0;
}

::-webkit-details-marker {
    display: none;
}
:root {
    /* Body */
    --body-font:                   ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

    /* Darks */
    --dark-1:                      rgb(11, 11, 15);
    --dark-a-1:                    #181820cc;
    --dark-a-2:                    rgba(57, 57, 76, 0.25);
    --dark-a-3:                    rgba(11, 11, 15, 0.60);
    --dark-a-4:                    rgba(19, 19, 26, 0.93);

    /* Whites */
    --white-1:                     #c8c8d5;
    --white-2:                     #a4a4b6;
    --white-a-1:                   rgba(171, 171, 191, 0.8); 
    --white-a-2:                   rgba(255, 255, 255, 0.65);

    /* Highlight */
    --highlight-bg:                #f6cf34fc;
    --highlight-bg-hover:          #f3db53;
    --highlight-bg-softer:         #e5c74ef5;
    /* 
    --highlight-bg:       #dab3f0;
    --highlight-bg-hover: #cda6ea; 
    /
    /* 
    --highlight-bg:       #c1b9e5;
    --highlight-bg-hover: #cda6ea; 
    */

    /* Scroll */
    --scroll-width:                 8px;
    --scroll-height:                8px;
    --scroll-bg:                    var(--dark-a-4);
    --scroll-bg-border-radius:      6px;
    --scroll-fg:                    var(--highlight-bg-softer);
    --scroll-fg-hover:              var(--highlight-bg-hover);
    --scroll-fg-border-radius:      6px;
    --scroll-corner:                var(--dark-a-1);

    /* Home */
    --home-title-1:                 var(--white-1);
    --home-title-2:                 #866ee7;
    --home-description:             var(--white-2);
    --home-button-text:             var(--white-1);

    --highlight-text:               #130606;
    --highlight-hover-text:         #0c0b0b;

    /* Logo */
    --logo-font:                    "Arial", serif;
    --logo-border:                  rgba(225, 225, 225, .1);

    /* Projects */
    --projects-details-close:       var(--white-2);
    --projects-details-open:        var(--white-1);
    
    /* Study */
    --study-cards-bg:               rgba(0, 0, 0, 0.20);
    --study-cards-padding:          24px;

    /* Study Sidebar */
    --study-sidebar-bg:             var(--dark-a-1);
    --study-sidebar-bg-hover:       var(--dark-a-2);
    --study-sidebar-text:           var(--white-2);
    --study-sidebar-text-hover:     var(--white-1);
    --study-sidebar-border:         var(--dark-1);
    --study-sidebar-border-details: var(--white-1);
    --study-sidebar-h2-hover:       var(--white-1);
    --study-sidebar-h3:             var(--white-a-1);
    --study-sidebar-h3-hover:       var(--white-2);

    /* Study Central */
    --central-bg:                   var(--dark-a-1);
    --study-overflow-border:        rgba(171, 171, 191, 0.18);

    /* Central Header Buttons */
    --header-button-bg:             var(--dark-a-4);
    --header-button-border:         var(--dark-1);
    --header-button-text:           var(--white-1);
    --header-button-hover-bg:       var(--dark-a-2);
    --header-button-hover-text:     var(--white-1);

    /* Central Footer */
    --footer-text:                  var(--white-1);

    /* Note */
    --note-headers:                 var(--white-1);
    --note-title:                   var(--white-1);
    --note-text:                    var(--white-1);

    /* _Note Subtitle */
    --note-subtitle:                rgba(171, 171, 191, 0.8);

    /* Checkbox */
    --checkbox-border:              #555;

    /* Table */
    --table-border:                 var(--white-1);
    --table-scrollbar:              #f1f1f1;

    /* Hyperlink */
    --hyperlink:                    #7ad0ec;
    --hyperlink-hover:              #6cbcd6;

    /* Line Emphasis */
    --line-emphasis:                rgba(0, 128, 0, 0.258);

    /* Strike-through */
    --strikethrough:                red;
    --table-strikethrough:          #8c8c8c;

    /* Code */
    --code-font:                    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Code Inline */
    --code-inline-bg:               #22262e;
    --code-inline-text:             #bad3ac;

    /* Code Block */
    --code-bg:                      #22262e;
    --code-text:                    var(--white-1);
    --code-comment:                 #9893a5;
    --code-tag:                     #b4637a;
    --code-variable:                #d7827e;
    --code-builtin:                 #ea9d34;
    --code-selector:                #56949f;
    --code-title:                   #56949f;
    --code-keyword:                 #907aa9;
    --code-string:                  #286983;
    --code-function-names:          #d7827e;
    --code-punctuation:             #575279;

    /* Block Quote */
    --blockquote-backgound:         #954ce3;
    --blockquote-foreground:        rgba(0, 0, 0, .08);
    --blockquote-color:             #ffffff;
    --blockquote-anchor:            #d2aefc;
    --blockquote-anchor-text-shadow: .4px 0 .8px black;
}


/* SCROLL */
    html {
        scroll-behavior: smooth;
        scroll-padding:  2em;
        -webkit-overflow-scrolling: touch; 
    }

    ::-webkit-scrollbar
    {
        width:  var(--scroll-width);
        height: var(--scroll-height);
    }

    /* Track (Background) */
    ::-webkit-scrollbar-track
    {
        background:    var(--scroll-bg);
        border-radius: var(--scroll-bg-border-radius);
    }

    /* Thumb (Foreground) */
    ::-webkit-scrollbar-thumb
    {
        background:    var(--scroll-fg);
        border-radius: var(--scroll-fg-border-radius);
    }
    ::-webkit-scrollbar-thumb:hover
    {
        background: var(--scroll-fg-hover);
    }

    /* Corner */
    ::-webkit-scrollbar-corner
    {
        background: var(--scroll-corner);
    }

    /* Firefox support */
    /* @supports (-moz-appearance: none) { */
        * {
            scrollbar-width: thin;
            scrollbar-color: var(--scroll-fg) var(--scroll-bg);
        }
    /* } */
/* ROOT */
    html {
        overflow-y: auto;
    }

    body {
        display: flex;

        min-height: 100vh;
        margin: 0;

        font-family: var(--body-font);
    }

    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;

        background-image: url("/assets/bg.png");
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }

/* CENTRAL */
    #central-wrapper {
        display: flex;
        flex-direction: column;
        flex: auto;

        margin: 0 auto;

        padding: 80px 15vw 24px;
        
        background: var(--central-bg);
    }

    @media (orientation: portrait) {
        #central-wrapper {
            padding: 60px 7vw 0px;
        }
    }



.site-logo {
    width: 480px;

    color: transparent;
    background: linear-gradient(45deg, #ea60da, #ed8f57, #fbd41d);
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: .5px var(--logo-border);

    font-family: var(--logo-font);
    font-size: 2.3em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;

    background-clip: text;
    -webkit-background-clip: text;

    background-position-x: -78px;
    background-attachment: local;
}

@media (max-width: 600px) {
    .site-logo {
        width: auto;
        
        font-size: xx-large;
        
        background-position-x: 0;
    }
}


/* ================================
   TOPICS GRID
   ================================ */

.topics-grid {
    display: grid;

    grid-template-columns: repeat(3, 1.2fr);
    gap: 2.8rem;

    justify-content: center;

    padding: 1rem 0 2rem;
}

/* Tablet */
@media (max-width: 1200px) {
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        justify-content: stretch;

        padding: 1rem 0 0.6rem;
    }
}

/* ================================
   TOPIC CARD
   ================================ */

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    width: 100%;
    min-height: 160px;

    padding: 1.75rem 1.25rem;

    border-radius: 4px;
    background: var(--study-cards-bg);
    border: 1px solid var(--dark-1);

    font-size: large;
    text-decoration: none;
    cursor: pointer;

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease;
}

@media (orientation: portrait) {
    .topic-card {
        padding: 1rem;
    }
}

.topic-card:hover {
    transform: translateY(-6px);
    background: var(--dark-a-2);
    border-color: var(--highlight-bg-hover);
}

/* Keyboard accessibility */
.topic-card:focus-visible {
    outline: 2px solid var(--highlight-bg-hover);
    outline-offset: 4px;
}

/* ================================
   TOPIC ICON
   ================================ */

.topic-icon {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

@media (orientation: portrait) {    
    .topic-icon {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
}

/* ================================
   TOPIC NAME
   ================================ */

.topic-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--highlight-bg);

    margin-bottom: 0.4rem;
    transition: color 0.25s ease;
}

.topic-card:hover .topic-name {
    color: var(--highlight-bg-hover);
}

/* ================================
   TOPIC DESCRIPTION
   ================================ */

.topic-description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--white-a-2);

    min-height: 2.4em;
}


@media (orientation: portrait) {    
    .topic-description {
        font-size: 0.8rem;
    }
}



/* NOTE CONTENT */
    #note-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding-top: 30px;

        color: var(--note-text);
    }
    
    @media (orientation: portrait) {
        #note-content {
            padding-top: 10px;
        }
    }


/* HEADERS */
    #note-content header {
        padding: 20px 0px;
        display: flex;
        flex-direction: column;
    }
    #note-content header > p {
        color: var(--note-subtitle);

        font-size: 1.0em;
        padding-top: 8px;
    }

    #note-content h1 {
        line-height: 1em;
        font-size: 3.0em;
        font-weight: 400;
        color: var(--white-1);
    }

    @media (orientation: portrait) {
        #note-content h1 {
            font-size: 2.6em;
        }
    }


/* CENTRAL FOOTER */
    #central-footer {
        display: flex;
        justify-content: center;

        margin-top: auto;
        padding: 25px 12px 25px 12px;


        gap: 8px;

        color: var(--footer-text);
    }

    @media (orientation: portrait) {
        #central-footer {
            font-size: x-small;
            padding: 25px 0px;
        }
    }


    #central-footer > a {
        width: max-content;
        padding: 0 8px;

        background: var(--highlight-bg);
        color: var(--highlight-text);

        border-radius: 4px;
        cursor: pointer;
    }

    /* @media (max-width: 768px) {
        #central-footer > a {
            margin-left: auto;
            margin-right: auto;
        }
    } */

