/* 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 */
    body {
        display: flex;
        flex-direction: column;

        min-height: 100svh;

        overflow: hidden;

        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;

        overflow: hidden;
    }


/* MAIN */
    main {
        background: var(--central-bg);

        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        overflow: hidden;
    }

    main > section {
        display: flex;
        flex-direction: column;
    }

    @media (orientation: portrait) {    
        main > section {
            font-size: smaller;
        }
    }

    /* TITLE CONTAINER */

    main > section > header {
        display: flex;
        flex-direction: column;
        text-align: center;
        padding: 25px 36px 60px;
    }
    @media (orientation: portrait) {    
        main > section > header {
            padding: 25px 36px 35px;
        }
    }

    /* TITLE */
    main > section > header > h1 {
        color: transparent;
        background: linear-gradient(45deg, #ea60da, #ed8f57, #fbd41d);

        filter: drop-shadow(8px 8px 12px rgba(0, 0, 0, 0.8));
        background-clip: text;
        -webkit-background-clip: text;

        font-family: var(--logo-font);
        font-size: 6em;
        font-weight: 800;
        letter-spacing: 3px;

        /* text-transform: uppercase; */
        padding-bottom: calc(16px*1.2);
    }
    @media (orientation: portrait) {
        main > section > header > h1 {
            letter-spacing: 2px;
            line-height: 1.05em;
            font-size: 5.1em;
        }
    }

    /* SUBTITLE */
    main > section > header > p {
        color: var(--home-description);
        font-size: 1.6em;
    }
    @media (orientation: portrait) {
        main > section > header > p {
            font-size: 1.3em;
        }
    }



#topics {
    display: flex;
    flex-direction: column;

    gap: 40px;  
    justify-content: center;

    color: var(--home-button-text);
}

@media (orientation: portrait) {    
   #topics {
        gap: 20px;  
   }
}


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

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

    /* width: 100%; */
    width: auto;
    min-height: 160px;

    margin: 0 10%;
    padding: 1.75rem 1.25rem;

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

    cursor: pointer;

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

@media (orientation: portrait) {    
    .topic-card {
        min-height: 0;
        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.9rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

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

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

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

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

@media (orientation: portrait) {    
    .topic-name {
        font-size: 1.4rem;
        margin-bottom: 0;
    }
}

.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-1);

    min-height: 2.4em;
}




/* CENTRAL FOOTER */
    #central-footer {
        background: var(--central-bg);
        color: var(--footer-text);

        display: flex;
        justify-content: center;

        padding: 25px 12px 25px 12px;

        gap: 8px;
    }

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

    #central-footer > a {
        background: var(--highlight-bg);
        color: var(--highlight-text);

        border-radius: 4px;
        cursor: pointer;
        padding: 0 8px;
    }
