/* noto-sans-symbols-regular - latin_latin-ext_symbols */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans Symbols';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/kaomoji/noto-sans-symbols-v47-latin_latin-ext_symbols-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('./fonts/kaomoji/noto-sans-symbols-v47-latin_latin-ext_symbols-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
/* noto-sans-jp-regular - cyrillic_japanese_latin_latin-ext_vietnamese */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/kaomoji/noto-sans-jp-v55-cyrillic_japanese_latin_latin-ext_vietnamese-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('./fonts/kaomoji/noto-sans-jp-v55-cyrillic_japanese_latin_latin-ext_vietnamese-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}
/* noto-sans-mono-regular - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Noto Sans Mono';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/kaomoji/noto-sans-mono-v36-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
       url('./fonts/kaomoji/noto-sans-mono-v36-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */
}

:root {
    /* Background colors */
    --clr-bg-page: hsl(163, 86%, 5%);
    --clr-bg-page-texture: hsl(180, 80%, 30%);
    --clr-bg-card-transp: hsla(163, 86%, 5%, 0.69);
    --clr-bg-proj-details-body: hsl(0, 0%, 10%);
    --clr-bg-proj-details-comment: none;
    --clr-bg-proj-details-code: hsla(0, 0%, 10%, 0.62);
    --clr-bg-minigame-congrats: hsl(166, 90%, 50%);
    /* Button colors */
    --clr-button-github: #ffcb9a;
    --clr-button-email: hsl(166, 90%, 50%);
    --clr-button-code: #ffcb9a;
    --clr-button-demo: hsl(166, 90%, 50%);
    --clr-button-close-lightbox: hsl(166, 90%, 50%);
    --clr-button-default: #caccce;
    /* Additional colors */
    --clr-navdot: hsl(166, 90%, 50%);
    --clr-scrollbar: hsl(166, 90%, 50%);
    --clr-proj-details-last-p: hsl(210 3% 60% / 1);

    /* General text colors */
    --clr-text-header: hsl(210 3% 90% / 1);
    --clr-text-body: hsl(210 3% 80% / 1);
    --clr-text-dim: hsl(210 3% 60% / 1);
    /* Minigame text colors */
    --clr-text-minigame-main: hsl(210 3% 5% / 1);
    --clr-text-minigame-congrats-time: #bd680b;
    --clr-text-minigame-curse: #f5194b; 
    /* Additional text colors */
    --clr-text-techtags: #d9b08c;
    --clr-text-highlight: hsl(166, 90%, 50%);
    --clr-text-hlink: hsl(166, 90%, 50%);
    --clr-text-tooltip: hsl(166, 90%, 50%);
    --clr-text-footer: hsl(166, 90%, 50%);
    --clr-text-code: #d9b08c;
    --clr-text-comment: hsl(210 3% 70% / 1);

    /* Font families */
    --ff-name: "Inter", sans-serif;
    --ff-title: "Inter", sans-serif;
    --ff-body: "Inter", sans-serif;
    --ff-slide-header: "Major Mono Display", monospace;
    --ff-minigame-kaomoji: 'Noto Sans Mono', 'Noto Sans JP', 'Noto Sans Symbols', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ff-code: "Fira Code", monospace;

    /* Header font sizes */
    --ff-size-h1: clamp(2.5rem, 4vw, 6rem);
    --ff-size-h2: clamp(1.5rem, 2.8vw, 4rem);
    --ff-size-h3: clamp(1.25rem, 0.85vw, 2rem);
    /* Body text: 16px mobile > 19px desktop */
    --ff-size-body: clamp(16px, 0.34vw + 15.27px, 19px);
    /* Body smaller: 14px mobile > 17px desktop */
    --ff-size-body-smaller: clamp(14px, 0.34vw + 13.27px, 17px);
    /* Smallest text: 12px mobile > 15px desktop */
    --ff-size-smallest: clamp(12px, 0.34vw + 11.27px, 15px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.slides-container {
    height: 100vh;
    overflow-y: hidden;
}

.background-container {
    background-image: url('first-bg.svg');
    background-repeat: repeat;
    background-size: auto;
    background-blend-mode: color-dodge;
    background-position: top left;
    image-rendering: crisp-edges;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -3;
    pointer-events: none;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

@media (max-width: 768px) {
    .background-container {
        background-size: cover;
    }
}

h1 {
    font-family: var(--ff-name);
    font-size: var(--ff-size-h1);
    color: var(--clr-text-header);
    font-weight: 300;
    margin-bottom: 1rem;
}

h2 {
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    color: var(--clr-text-header);
}

@media (max-width: 768px) {
    h2 {
        margin-bottom: 1rem;
    }
}

h3 {
    font-weight: 200;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    opacity: 0.9;
    color: var(--clr-text-header);
}

body {
    font-family: var(--ff-body);
    font-size: var(--ff-size-body);
    -webkit-font-smoothing: antialiased !important;
    -moz-font-smoothing: antialiased !important;
    text-rendering: optimizelegibility !important;
    -font-smoothing: antialiased;
    line-height: 1.7;
    letter-spacing: 0.03em;
    word-spacing: 0.02em;
    color: var( --clr-text-body);
    background: var(--clr-bg-page);
    overflow-x: hidden;
}

/* Tablets / Laptops */
@media (min-width: 769px) and (max-width: 1400px)  {
    body {
        line-height: 1.7;
    }
}
/* Smartphones */
@media (max-width: 768px) {
    body {
        line-height: 1.65; 
        letter-spacing: 0.005em;
        word-spacing: 0.01em;
    }
}

/* Highlight text */
::selection {
  background-color: var(--clr-text-highlight);
  color: #0c0c0c;
  text-shadow: none;
}
::-moz-selection {
  background-color: var(--clr-text-highlight);
  color: #0c0c0c;
  text-shadow: none;
}
::-webkit-selection {
  background-color: var(--clr-text-highlight);
  color: #0c0c0c;
  text-shadow: none;
}

/* Code text */
code {
    display: inline-block;
    font-family: var(--ff-code);
    font-size: var(--ff-size-body);
    color: var(--clr-text-code);
    font-weight: 500;
    overflow-x: auto;
    width: -webkit-fill-available;
}
@media (max-width: 768px) {
    code {
        font-size: var(--ff-size-smallest);
    }
}

/* Strong text */
strong {
    color: var(--clr-text-body);
    cursor: help !important;
}

/* Images (dor proj details mostly) */
figure {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
}

figure .images-container {
  display: flex;
  min-block-size: fit-content;
  justify-content: center;
  align-items: stretch;
  gap: 0.8rem;
  max-width: 100%;
  flex-wrap: wrap;
}

figure .images-container img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

figure figcaption {
    text-align: center;
    font-size: var(--ff-size-smallest);
    color: var(--clr-text-dim);
    margin-bottom: 0.5rem;
}

/* Hyperlink */
.hlink {
    cursor: pointer !important;
    color: var(--clr-text-hlink);
    opacity: 0.95;
    text-decoration: none;
}

/* Tooltip */
.dynamic-tooltip {
    position: fixed;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
    background-color: var(--clr-bg-page);
    border: 1px solid rgba(21, 245, 194, 0.3);
    color: var(--clr-text-tooltip);
    font-family: var(--ff-body);
    font-size: var(--ff-size-smallest);
    padding: 0.4em 0.8em;
    border-radius: 4px;
    white-space:inherit;
}

/* The class JS will add to show the tooltip */
.dynamic-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* MINI GAME and SPOTLIGHT */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    filter: sepia(1);
    background-image: url('second-bg.svg');
    background-repeat: repeat;
    background-size: auto;
    background-position: -10px -10px;
    background-blend-mode: color-dodge;
    image-rendering: crisp-edges;
    pointer-events: none;
    opacity: 0;
    z-index: -1;
    --spotlight-size: 180px;
    clip-path: circle(calc(var(--spotlight-size) / 2) at var(--mouse-x) var(--mouse-y));
    transition: opacity 0.2s ease-out;
}

.spotlight-overlay.active {
    opacity: 1;
}

@media (min-width: 769px) and (max-width: 1500px)  {
    .spotlight-overlay {
        --spotlight-size: 140px;
    }
}

/* Spotlight/Easter egg base */
.hidden-watermark {
    position: fixed;
    width: 70px;
    height: 70px;
    background-image: url('dot.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.25s ease-out 1.0s;
    transform: translate(-50%, -50%);
}
.hidden-watermark.reveal {
    opacity: 1;
    transition: none;
}

@media (min-width: 769px) and (max-width: 1400px)  {
    .hidden-watermark {
        position: fixed;
        width: 60px;
        height: 60px;
    }
}

/* Hint and Cheater messages */
.intro-message,
.cheater-message,
.exploration-hint {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--clr-bg-page);
    color: var( --clr-text-body);
    font-weight: 400;
    padding: 12px 20px;
    border-radius: 25px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.intro-message.show,
.cheater-message.show,
.exploration-hint.show {
    opacity: 0.95;
    transform: translateX(0);
}

.cheater-message.show {
    bottom: 300px;
}

/* Congrats message */
.congrats-message {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(20px);
    background-color: var( --clr-bg-minigame-congrats);
    color: var(--clr-text-minigame-main);
    font-weight: 400;
    padding: 12px 20px;
    border-radius: 25px;
    z-index: 1001;
    opacity: 0;
    transition: all 0.4s ease-out;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.congrats-message.show {
    opacity: 0.9;
    transform: translate(-50%, -50%) translateY(0);
}

.congrats-congrats,
.congrats-text {
    font-weight: normal;
    opacity:0.8;
}

.congrats-message .emoji {
    display: block;
    font-weight: 300;
    font-family: var(--ff-minigame-kaomoji);
}

@media (max-width: 768px) {
    .congrats-message {
        right: 0px;
        justify-self: anchor-center;
    }
    .exploration-hint {
        right: 0px;
        justify-self: anchor-center;
    }
}

/* SLIDES */
.slide {
    height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    transform: translateZ(0);
    image-rendering: crisp-edges;
}

@media (min-width: 769px) and (max-width: 1400px)  {
    .slide {
        padding: 3.3rem;
        padding-block: 1rem;
    }
}
@media (max-width: 768px) {
    .slide {
        padding: 1rem;
        justify-content: space-evenly;
    }
}

/* Navigation */
.slide-navigation {
    position: fixed;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 769px) and (max-width: 1400px) {
    .slide-navigation {
        right: 1.6rem;
    }
}
@media (max-width: 768px) {
    .slide-navigation {
        right: 0.5rem;
        opacity: 0.7;
    }
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-dot.active,
.nav-dot:hover {
    background: var(--clr-navdot);
    transform: scale(1.2);
}

.nav-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--clr-bg-page);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-dot.active::after {
    opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

@media (max-width: 768px) {
    ::-webkit-scrollbar {
        display: none;
    }
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(21, 245, 194, 0.7);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--clr-scrollbar);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--clr-scrollbar) transparent;
}

@media (min-width: 769px) and (max-width: 1400px) {
    * {
        scrollbar-width: auto;
    }
}
@media (max-width: 768px) {
    * {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
}

html {
    scroll-behavior: smooth;
}

/* Previous and Next slide buttons */
.prev-slide,
.next-slide {
    position: sticky;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    font-size: 24px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.slide.header-slide .next-slide {
    margin-top: 5rem;
}

@media (max-width: 768px) and (orientation: portrait){
    .slide.header-slide .next-slide {
        margin-top: 2rem;
    }
}

.prev-slide:hover,
.next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-slide {
    margin-bottom: 0.5rem;
}
.next-slide {
    margin-top: 0.5rem;
}

.prev-slide:focus,
.next-slide:focus {
    outline: none;
    box-shadow: none;
}

.slide:first-child .prev-slide {
    display: none;
}

.slide:last-child .next-slide {
    display: none;
}

@media (max-width: 768px) {
    .next-slide {
        margin-top: 0.5rem;
    }
}

/* HEADER SLIDE */
.header-slide {
    justify-content: center;
}

/* Main name */
#name {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* text-shadow: 0 0 12px var(--clr-bg-page-texture); */
}

/* Titles below name */
.title {
    margin-bottom: 2rem;
    display: inline-block;
    place-self: center;
    width: fit-content;
}

#title-main,
#title-additional {
    font-family: var(--ff-body);
    font-size: var(--ff-size-h3);
    font-weight: 300;
    color: var( --clr-text-body);
    padding: 0px;
    margin: 0px;
}

#title-additional {
    border-top: solid;
    border-color: var(--clr-bg-page-texture);
    border-width: 1px !important;
}

/* Links */
.github-link {
    color: var(--clr-button-github);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.github-link:hover {
    text-shadow: 0 0 20px var(--clr-button-github);
    transform: translateY(-2px);
}

.github-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}
.email-link {
    color: var(--clr-button-email);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--ff-size-body);
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.email-link:hover {
    text-shadow: 0 0 20px var(--clr-button-email);
    transform: translateY(-2px);
    opacity: 1;
}
.email-icon {
    width: 26px;
    height: 24px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1;
}
.email-icon-p1 {
    fill: hsl(166, 90%, 50%);
    stroke-width: 2;
}
.email-icon-p2 {
    fill: none;
    stroke: #15f5c100;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

/* CONTENT SLIDES */
.slide-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

@media (max-width: 768px) and (orientation: landscape) {
    .slide-content {
        width: 100%;
        justify-items: center;
    }
}
@media (max-width: 768px) and (orientation: portrait) {
    .slide-content {
        width: 98%;
        place-items: center;
    }
}

.slide-content h2{
    font-family: var(--ff-slide-header);
    font-size: var(--ff-size-h2);
    color: var(--clr-text-header);
}

@media (max-width: 768px) and (orientation: landscape) {
    .slide-content h2 {
        display: none;
    }
}

.slide-content h3 {
    font-family: var(--ff-body);
    font-size: var(--ff-size-h3);
}

.tech-tags {
    font-family: var(--ff-code);
    display: flex;
    flex-wrap: wrap;
    width: fit-content !important;
    column-gap: 0.8rem;
    margin-bottom: 1.5rem;
    justify-content: left;
    border-radius: 0.75rem;
}

.tech-tag {
    font-size: var(--ff-size-body-smaller);
    letter-spacing: 0.05em;
    background: none;
    color: var(--clr-text-techtags);
}

/* PROJECTS SLIDE */
.projects-grid {
    columns: 1;
    width: 100%;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .projects-grid {
        width: 98%;
        margin-bottom: 0px;
    }
}

/* Project cards */
.project-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, border-color;
    box-sizing: border-box;
    background: var(--clr-bg-card-transp);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    border-right: none;
    padding-left: 0.5rem;
    text-align: left;
    height: fit-content;
    display: grid;
    grid-template-columns: 10px 1fr 135px;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 1rem;
    justify-content: space-between;
    line-height: normal;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .project-card {
        grid-template-columns: none;
        row-gap: 0.2rem;
        padding: 0.4rem 0.4rem 0.8rem 0;
        background: var(--clr-bg-card-transp);
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin-bottom: 2rem;
    }
    
    .project-card:hover {
        transform: none;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
}

/* Project date */
.date-main-block {
    display: contents;
}

.project-date {
    font-family: var(--ff-slide-header);
    font-weight: 600;
    color: var(--clr-bg-page-texture);
    writing-mode: sideways-lr;
    pointer-events: none;
    width: fit-content;
}

.project-date[data-tooltip] {
    cursor: help;
    pointer-events: all;
    cursor: help;
}

@media (max-width: 768px) {
    .project-date {
        writing-mode: horizontal-tb;
    }
}

/* Project main info */
.project-main {
    min-width: 15%;
    padding: 0.5rem;
    cursor: pointer;
}

.project-main:hover {
    background-image: url(noise-bg.svg);
}

@media (max-width: 768px) {
    .project-main {
        padding-bottom: 0;
        padding-left: 0;
    }
}

/* Project title */
.project-title {
    color: var(--clr-text-header);
    font-size: var(--ff-size-h3);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .project-title {
        margin-bottom: 0.5rem;
    }
}

/* Helper text ('click on this panel') */
.helper-text {
    display: inline-block;
    font-size: var(--ff-size-smallest);
    opacity: 0.6;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    .helper-text {
        margin-top: 0 !important;
        margin-bottom: 1rem;
    }
}

/* Project description */
.project-description {
    font-size: var(--ff-size-body);
    color: var( --clr-text-body);
    margin-bottom: 1rem;
    display: none;
}

/* Project tech tags */
.project-card .tech-tags {
    margin-bottom: 0;
}

.project-card .tech-tag {
    padding-bottom: 0;
}

@media (max-width: 768px) {
    .project-card .tech-tags {
        display: none;
    }
}

/* Project details/dropdown section */
details {
    display: none;
}

.project-details p {
    /* background: var(--clr-bg-proj-details-body); */
    background: var(--clr-bg-card-transp);
    color: var(--clr-text-dim);
    font-size: var(--ff-size-body);
    line-height: 1.75;
    letter-spacing: 0.015em;
    word-spacing: 0.025em;
    font-weight: 400;
    text-indent: 2em;
    padding: 0.8rem;
    border-radius: 0.75rem;
    /* border-bottom-style: solid;
    border-bottom-color: black; */
}

.project-details {
    margin-bottom: 2rem;
    background: var(--clr-bg-card-transp);
}

@media (max-width: 768px) {    
    .project-details {
        padding: 0;
    }
}

.project-details h4 {
    margin-top: 1rem;
    color: var(--clr-text-code);
}

.project-details .comment {
    background-color: var(--clr-bg-card-transp);
    color: var(--clr-text-comment);
    border: none;
}

.project-details .code {
    display: grid;
    justify-content: center;
    padding: 0.8rem;
    letter-spacing: 0.02em;
}

/* Project details expanded */
.project-card:has(details[open]) {
    grid-template-columns: 10px 180px 1fr 100px;
    background: none;
    line-height: inherit;
    border: none;
    align-items: start;
    position: relative;
    left: -5%;
}

.project-card:has(details[open]):hover {
    transform: none;
}

.project-card:has(details[open]) details {
    display: block;
}

.project-card:has(details[open]) summary {
    display: none;
}

.project-card:has(details[open]) .project-details-p-headers {
    margin-bottom: 0.5rem;
    margin-top: 2rem;
    background: var(--clr-text-code);
    color: var(--clr-text-minigame-main);
    font-weight: 800;
}

.project-card:has(details[open]) .project-details-p-headers:first-child {
    margin-top: 0rem;
}

.project-card:has(details[open]) .project-date {
    padding-top: 5px;
}

.project-card:has(details[open]) .project-main {
    padding-top: 0px;
}

.project-card:has(details[open]) .project-title {
    font-family: var(--ff-slide-header);
    font-size: var(--ff-size-body-smaller);
    white-space: pre-line;
    word-spacing: 100vw;
}

.project-card:has(details[open]) .project-description {
    font-size: var(--ff-size-body-smaller);
    color: var(--clr-text-dim);
    display: block;
}

.project-card:has(details[open]) .tech-tags {
    flex-direction: column;
    flex-wrap: nowrap;
}

.project-card:has(details[open]) .project-links {
    margin-top: 2px;
}

/* Project details expanded SMALL SCREEN */
@media (max-width: 1100px) {

    .project-card:has(details[open]) {
        grid-template-columns: none;
        left: auto;
    }
    
    .project-card:has(details[open]) .project-date {
        writing-mode: horizontal-tb;
        padding: 0;
    }
    
    .project-card:has(details[open]) .project-main {
        display: grid;
        row-gap: 0.5rem;
        margin-bottom: 0.8rem;
    }
    
    .project-card:has(details[open]) .project-title {
        white-space: inherit;
        word-spacing: normal;
        margin-right: 1rem;
    }
    
    .project-card:has(details[open]) .project-description {
        font-size: var(--ff-size-body);
        color: var(--clr-text-dim);
        align-self: end;
        margin-bottom: 0;
    }
    
    .project-card:has(details[open]) .tech-tags {
        flex-direction: row;
        margin-bottom: 0.8rem !important;
    }
    
    .project-card:has(details[open]) .helper-text {
        margin-top: 0 !important;
    }
    
    .project-links {
        flex-direction: row !important;
    }
}

/* Buttons-links */
.project-links {
    display: flex;
    row-gap: 0.5rem;
    column-gap: 1rem;
    justify-content: left;
    flex-direction: column;
}

@media (max-width: 768px) {
    .project-links {
        padding-left: 0px;
    }
}

.portfolio-button,
.portfolio-highlight-button {
    padding: 0.2rem 0.5rem;
    font-size: var(--ff-size-smallest);
    align-content: center;
    font-weight: 400;
    background: transparent;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px; 
}

.portfolio-button {
    color: var(--clr-button-code);
    border: 1px solid var(--clr-button-code);
}
.portfolio-button:hover {
    background: rgba(255, 203, 154, 0.219);
}

.portfolio-highlight-button {
    color: var(--clr-button-demo);
    border: 1px solid var(--clr-button-demo);
}
.portfolio-highlight-button:hover {
    background: rgba(21, 245, 194, 0.1);
}

/* Button with 2 styles */
.portfolio-mid-button {
    padding: 0.2rem 0.5rem;
    font-size: var(--ff-size-smallest);
    align-content: center;
    font-weight: 400;
    background: transparent;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;

    /* Split border colors */
    border: 1px solid;
    border-image: linear-gradient(
        to right,
        var(--clr-button-code) 50%,
        var(--clr-button-demo) 50%
    ) 1;

    /* Split text color using background-clip */
    background: linear-gradient(
        to right,
        var(--clr-button-code) 50%,
        var(--clr-button-demo) 50%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.portfolio-mid-button:hover {
    /* Split hover background */
    background: linear-gradient(
        to right,
        rgba(255, 203, 154, 0.219) 50%,
        rgba(21, 245, 194, 0.1) 50%
    );
    -webkit-background-clip: padding-box;
    -webkit-text-fill-color: initial;
    color: var(--clr-text-body);
}


/* VISUALIZATIONS SLIDE */
.visualizations-grid {
    columns: 4;
    column-gap: 2rem;
    width: 100%;
    margin-bottom: 1rem;
}

@media (min-width: 769px) and (max-width: 1400px)  {
    .visualizations-grid {
        columns: 4;
    }
}
@media (max-width: 768px) and (orientation: landscape) {
    .visualizations-grid {
        margin-block: 1rem;
        max-width: 96%;
        column-gap: 1rem;
        row-gap: 1rem;
        display: flex;
        flex-wrap: wrap;
        overflow-y: auto;
    }
}
@media (max-width: 768px) and (orientation: portrait){
    .visualizations-grid {
        columns: 2;
        max-width: 96%;
        column-gap: 1rem;
    }
}

.visualization-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, border-color;
    box-sizing: border-box;
    cursor: pointer;
}
.visualization-card:hover {
    transform: translateY(-4px);
    will-change: auto;
}
.visualization-card:hover .visualization-overlay {
    opacity: 1;
}

@media (max-width: 768px) and (orientation: landscape) {
    .visualization-card {
        margin: 0px;
    }
}
@media (max-width: 768px) and (orientation: portrait) {
    .visualization-card {
        margin-bottom: 1rem;
    }
}

.visualization-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    min-height: 3.5rem;
    align-content: center;
    line-height: normal;
}

@media (max-width: 768px) and (orientation: landscape) {
    .visualization-image-container {
        border-radius: 0.5rem;
        min-height: 0px;
    }
}

.visualization-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    image-rendering: auto;
}

@media (max-width: 768px) and (orientation: landscape) {
    .visualization-image {
        width: auto;
        height: 5rem;
    }
}

.visualization-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.875);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .visualization-overlay {
        display: none;
    }
}

.visualization-title {
    color: var(--clr-text-header);
    font-size: var(--ff-size-body) !important;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.visualization-description {
    color: var(--clr-text-body);
    opacity: 0.9;
    font-size: var(--ff-size-body);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
    backdrop-filter: blur(8px);
}
.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) and (orientation: landscape) {
    .lightbox {
        padding-top: 1rem;
        padding-bottom: 0px;
    }
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    column-gap: 2rem;
    columns: 2;
    place-content: center;
    justify-items: center;
}

@media (max-width: 768px) {
    .lightbox-content {
        position: relative;
        display: flex;
        align-items: center;
        max-width: 90vw;
        max-height: fit-content;
        flex-direction: column;
        flex-wrap: nowrap;
        column-gap: none;
        columns: 0;
        place-content: normal;
        justify-items: normal;
    }
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.75rem;
    overflow-block: auto;
}

@media (max-width: 768px) {
    .lightbox-image {
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
        border-radius: 0.75rem;
    }
}

.lightbox-info {
    text-align: left;
    max-width: 30%;
    min-width: 20%;
}

@media (min-width: 769px) and (max-width: 1400px)  { 
    .lightbox-info {
        margin-top: 1rem;
    }
}
@media (max-width: 768px) {
    .lightbox-info {
        margin-top: 2rem;
        max-width: 85%;
        max-width: 100%;
    }
}

.lightbox-title {
    font-weight: 700;
    color: var(--clr-text-header);
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .lightbox-title{
        display: none;
    }
}

.lightbox-description {
    color: var(--clr-text-body);
    opacity: 0.8;
    padding-bottom: 1rem;
}

@media (min-width: 769px) and (max-width: 1400px)  { 
    .lightbox-description {
        padding-bottom: 0.6rem;
    }
}
@media (max-width: 768px) {
    .lightbox-description {
        display: none;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    #lightbox-tech-tags {
        display: none;
    }
}

.lightbox-close {
    position: absolute;
    top: -2rem;
    right: 0;
    background: none;
    border: none;
    color: var(--clr-button-default);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.lightbox-close:hover {
    color: var(--clr-button-close-lightbox);
}

@media (max-width: 768px) {
    .lightbox-close {
        display: contents;
    }
}

/* NOTEBOOKS SLIDE */
.notebooks-grid {
    columns: 3;
    column-gap: 2rem;
    width: 100%;
    margin-bottom: 1rem;
}

@media (min-width: 769px) and (max-width: 1400px)  {
    .notebooks-grid {
        columns: 2;
    }

}
@media (max-width: 768px) {
    .notebooks-grid{
        columns: 1;
        width: 98%;
        margin-bottom: 0px;
    }
}

.notebook-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, border-color;
    box-sizing: border-box;
    background: var(--clr-bg-card-transp);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: left;
}
.notebook-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 245, 194, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .notebook-card {
        padding: 0.4rem;
        padding-bottom: 0.8rem;
        background-color: var(--clr-bg-card-transp);
        border-left: none;
        border-right: none;
        border-radius: 0px;
        margin-bottom: 0.8rem;
    }
    .notebook-card:hover {
        transform: none;
        border-left: none;
        border-right: none;
        border-radius: 0px;
    }
}

.notebook-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .notebook-header {
        flex-direction: column;
        align-items: center;
        gap: 0px;
        margin-bottom: 0px;
    }
}

.notebook-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-right: 0.75rem;
}

@media (max-width: 768px) {
    .notebook-title {
        padding-right: 0px;
    }
}

.notebook-description {
    color: var( --clr-text-body);
    margin-bottom: 1rem;
}

@media (max-width: 768px) and (orientation: portrait) {
    .notebook-card .tech-tags {
        display: none;
    }
}

/* QR code */
.qr-code {
    width: 6rem;
    height: 6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.qr-code:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .qr-code {
        width: 4rem;
        height: 4rem;
    }
}

.qr-helper-text {
    font-size: var(--ff-size-smallest);
    opacity: 0.6;
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .qr-helper-text {
        margin-bottom: 0.1rem;
    }
}

/* FOOTER */
.site-footer {
  text-align: center;
  font-size: var(--ff-size-body-smaller);
  color: var(--clr-text-footer);
  opacity: 0.8;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
}


@media (min-width: 769px) and (max-width: 1400px)  { 
    .site-footer {
        padding: 0.5rem 0.1rem;
        margin-top: 2rem;
    }
}
@media (max-width: 768px) {
    .site-footer {
        padding: 0.25rem 0.5rem;
        margin-top: 1rem;
    }
}