/* =========================================================
  1. Variablen
  ========================================================= */

:root {
    --color-bg-light: rgb(245, 246, 250);
    --color-bg-dark: #0f0f12;

    --color-surface-light: rgba(255, 255, 255, 0.4);
    --color-surface-dark: rgba(37, 37, 43, 0.4);

    --color-text-light: #232323;
    --color-text-dark: #f2f2f7;

    --color-primary: #007AFF;

    --color-hover-light: rgba(152,152,170,0.17);
    --color-hover-dark: rgba(255,255,255,0.08);

    --color-shadow-light: rgba(0, 122, 255, 0.3);
    --color-shadow-dark: rgba(0, 122, 255, 0.2);

    --background-color: var(--color-bg-light);
    --surface-color: var(--color-surface-light);
    --text-color: var(--color-text-light);
    --nav-active-bg: var(--color-hover-light);

    --grid-color-light: rgb(206, 210, 223);
    --grid-color-dark: rgb(44, 45, 50);

    --border-color-light: rgba(97, 106, 110, 0.33);
    --border-color-dark: rgb(54, 54, 57);

    --grid-size: 40px;
    --grid-cross: 4px;

    --grid-color: var(--grid-color-light);
    --color-border: var(--border-color-light);
    --color-shadow: var(--color-shadow-light);
}

/* =========================================================
   2. Dunkelmodus
   ========================================================= */

[data-theme="dark"] {
    --background-color: var(--color-bg-dark);
    --surface-color: var(--color-surface-dark);
    --text-color: var(--color-text-dark);
    --nav-active-bg: var(--color-hover-dark);
    --grid-color: var(--grid-color-dark);
    --color-border: var(--border-color-dark);
    --color-shadow: var(--color-shadow-dark);
}

/* =========================================================
   3. Aufbau
   ========================================================= */

body{
    margin:0;
    font-family: monospace;
    background-color:var(--background-color);
    transition: background-color 0.25s ease-in-out;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;

    background-image: radial-gradient(
            circle,
            var(--grid-color) calc(var(--grid-cross) / 2),
            transparent calc(var(--grid-cross) / 2)
    );

    background-size: var(--grid-size) var(--grid-size);
}


.footer-container{
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-top: 100px;
    background: linear-gradient(to top, var(--background-color), rgba(255, 255, 255, 0));
    color: var(--text-color);
}

/* =========================================================
   4. Layout
   ========================================================= */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 30px;
    width: 100%;
    z-index: 1000;
}

.navbar {
    position: fixed;
    top: 30px;
    display: flex;
    justify-content: center;
    width: auto;
    z-index: 1000;
    background-color: var(--surface-color);
    backdrop-filter: blur(8px);
    padding: 5px 0;
    border-radius: 90px;
    box-shadow: 2px 2px 20px 0 var(--color-shadow);
}

.darkmode-toggle {
    position: fixed;
    top: 30px;
    left: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 23px;
    padding: 10px;
    background-color: var(--surface-color);
    border-radius: 90px;
    box-shadow: 4px 4px 15px 0 var(--color-shadow);
    cursor: pointer;
    z-index: 1001;
    backdrop-filter: blur(3px);
}

.main-container,
.skills-container,
.project-container {
    margin-top: 40px;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    backdrop-filter: blur(2px);
    z-index: 5;
}

/* =========================================================
   5. Inhalt
   ========================================================= */

.main-container{
    margin-top: 120px;
    padding: 15px;
    background-color: var(--surface-color);
    border-radius: 25px;
    border: 1px solid var(--color-border);
    animation: flyIn 0.8s ease forwards;
    animation-delay: 0.4s;
    transition: box-shadow 0.4s ease-in-out;
}

.main-container:hover{
    box-shadow: 10px 10px 30px 0 var(--color-shadow);
}

.project-container{
    display: flex;
    padding: 15px;
    background-color: var(--surface-color);
    border-radius: 25px;
    border: 1px solid var(--color-border);
    transition: box-shadow 0.4s ease-in-out;
}

.project-container:hover .project-image{
    transform: rotate(1deg) scale(1.002);
}

.project-image{
    margin: 10px;
    width: 55%;
    height: 55%;
    z-index: 5;
    border-radius: 15px;
    transition: transform 0.4s ease-in-out;
}

.project-info{
    width: 500px;
}

.project-info-text{
    margin-left: 20px;
    color: var(--text-color);
}

.buttons-container{
    display: flex;
    flex-direction: row;
}

@keyframes flyIn {
    from{ transform: translateY(40px); opacity:0; }
    to{ transform: translateY(0); opacity:1; }
}

.main-text{
    padding-left: 30px;
    color:var(--text-color);
}

.main-image{
    width: 32px;
    position: relative;
    top: 8px;
}

.github-icon{
    width:32px;
    filter: brightness(0) invert(1);
}

.arrow{
    width: 16px;
}

/* Icons im Dark Mode weiß */
[data-theme="dark"] .button-icon,
[data-theme="dark"] .arrow {
    filter: brightness(0) invert(1);
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 17px;
    font-family: monospace;
    color: var(--text-color);
    background-color: var(--surface-color);
    border: 1px solid var(--color-border);
    cursor: pointer;
    border-radius: 15px;
    padding: 6px 10px;
    margin-left: 30px;
    margin-top: 30px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, color 0.3s, box-shadow 0.3s;
}

button:hover {
    background-color: #0873ec;
    border: none;
    color: white;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5),
    0 0 20px rgba(0, 122, 255, 0.5),
    0 0 30px rgba(0, 122, 255, 0.5);
}

button:hover .button-icon{
    filter: brightness(0) invert(1);
}

button:hover .arrow{
    filter: brightness(0) invert(1);
}

.button-icon {
    width: 32px;
}

.itchio-button {
    background-color: var(--surface-color);
    transition: transform 0.3s ease, color 0.3s, box-shadow 0.3s;
}

.itchio-button:hover {
    background-color: #ec5353;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 10px rgba(236, 83, 83, 0.4),
    0 0 20px rgba(236, 83, 83, 0.4),
    0 0 30px rgba(236, 83, 83, 0.4);
}

.project-button1 {
    margin-left: 10px;
}
.project-button2 {
    margin-left: 5px;
}

.project-button2:hover {
    background-color: #bc11ff;
    border: none;
    color: white;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 10px rgba(188, 17, 255, 0.5),
    0 0 20px rgba(188, 17, 255, 0.5),
    0 0 30px rgba(188, 17, 255, 0.5);
}

a{
    text-decoration: none;
}

h1 {
    padding-bottom: 20px;
    font-size: 30px;
}

h4 {
    font-size: 16px;
}

p {
    font-size: 16px;
}

.link {
    color: var(--color-primary);
    font-weight: 800;
}

/* =========================================================
   6. Bereich "Erfahrung"
   ========================================================= */

.skills-container {
    padding: 15px;
    background-color:var(--surface-color);
    border-radius: 25px;
    border: 1px solid var(--color-border);
    animation: flyIn 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
    margin-bottom: 50px;
    transition: box-shadow 0.4s ease-in-out;
}

.skills-container:hover{
    box-shadow: 10px 10px 30px 0 var(--color-shadow);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.grid-item img {
    width: 50px;
    margin-bottom: 10px;
}

.grid-item p {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
}

.grid-item:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5),
    0 0 20px rgba(0, 122, 255, 0.5),
    0 0 30px rgba(0, 122, 255, 0.5);
    border: 2px solid rgba(0, 122, 255, 0.78);
}

.languages-container{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 35px 0;
}

.language-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: fit-content;
    padding: 10px;
    margin-left: 5px;
    margin-top: -30px;
    background-color: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.language-item img {
    max-width: 20px;
    margin-right: 10px;
}

.language-item p {
    margin: 0;
    font-size: 15px;
    color: var(--text-color);
}

.language-item:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5),
    0 0 20px rgba(0, 122, 255, 0.5),
    0 0 30px rgba(0, 122, 255, 0.5);
    border: 2px solid rgba(0, 122, 255, 0.78);
}


/* =========================================================
   7. Navigation
   ========================================================= */

.nav-container{
    display:flex;
    justify-content:space-between;
    padding-left:5px;
    padding-right:5px;
}

.nav-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:5px 40px;
    text-decoration:none;
    color:var(--text-color);
    font-weight:700;
    font-size:16px;
}

.nav-item img.nav-icon{
    width:24px;
    height:24px;
    margin-bottom:5px;
}

.nav-item.active{
    background:var(--nav-active-bg);
    border-radius:90px;
    color:var(--color-primary);
}

.nav-item.active img.nav-icon{
    filter: brightness(0) saturate(100%)
    invert(42%) sepia(98%) saturate(2592%)
    hue-rotate(199deg) brightness(101%) contrast(101%);
}

[data-theme="dark"] .nav-item:not(.active) img.nav-icon{
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .main-image {
    filter: brightness(0) invert(1);
}

/* =========================================================
   8. Dunkelmodus Schalter
   ========================================================= */

.mode-icon{
    height:25px;
    width:25px;
    margin:0 5px;
}

.mode-icon.active{
    filter: brightness(0) saturate(100%)
    invert(42%) sepia(98%) saturate(2592%)
    hue-rotate(199deg) brightness(101%) contrast(101%);
}

[data-theme="dark"] .mode-icon.light{
    filter: brightness(0) invert(1);
}

.selector{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:35px;
    height:35px;
    background-color:var(--nav-active-bg);
    border-radius:50%;
    transition:left 0.3s;
}


.buttons {
    display:flex;
    justify-content:left;
    flex-wrap:wrap;
}

/* =========================================================
   9. für andere Geräte und Smartphones
   ========================================================= */

@media (max-width: 900px) {

    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 700px) {

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-item {
        padding: 5px 15px;
        font-size: 14px;
    }

    .nav-item img.nav-icon {
        width: 20px;
        height: 20px;
    }

    p {
        font-size: 14px;
    }

}

@media (max-width: 500px) {

    .grid-container {
        grid-template-columns: 1fr;
    }

    p{
        font-size: 14px;
    }

}

@media (max-width: 768px) {

    .navbar {
        top: 20px;
    }

    .darkmode-toggle {
        position: fixed;
        left: 43%;
        top: 85px;
        margin-top: 10px;
    }

    .main-container,
    .skills-container {
        margin-left: 20px;
        margin-right: 20px;
        margin-top: 140px;
    }

    p {
        font-size: 14px;
    }

}

.top-blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
    z-index: 999;

    backdrop-filter: blur(20px);

    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
}

.blue {
    color: var(--color-primary);
    font-size: 130%;
    text-shadow:
            0 0 5px rgba(0, 122, 255, 0.3),
            0 0 10px rgba(0, 122, 255, 0.2),
            0 0 20px rgba(0, 122, 255, 0.1);
}

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;

    width: 250px;
    height: 250px;

    pointer-events: none;
    border-radius: 50%;
    z-index: 0;

    background: radial-gradient(
            circle,
            rgba(0, 122, 255, 0.3),
            rgba(0, 122, 255, 0.15),
            rgba(0, 122, 255, 0.05),
            rgba(0, 122, 255, 0.001),
            rgba(0, 122, 255, 0)
    );

    transform: translate(-50%, -50%);
}

body {
    margin: 0;
    height: 100%;
}

.comets {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.comet {
    position: absolute;
    width: 180px;
    height: 2px;

    background: linear-gradient(
            90deg,
            rgba(0, 122, 255, 0.02),
            rgb(0, 122, 255)
    );

    transform: rotate(45deg);
    animation: cometMove 6s linear infinite;
}

.comet:nth-child(1) {
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.comet:nth-child(2) {
    top: -10%;
    left: -30%;
    animation-delay: 1s;
}

.comet:nth-child(3) {
    top: -30%;
    left: -5%;
    animation-delay: 2s;
}

.comet:nth-child(4) {
    top: -40%;
    left: -20%;
    animation-delay: 1.5s;
}

@keyframes cometMove {
    from {
        transform: translate(0, 0) rotate(30deg);
        opacity: 1;
    }
    to {
        transform: translate(120vw, 120vh) rotate(30deg);
        opacity: 0;
    }
}


body {
    cursor: none;
}

a,
button,
input,
textarea,
select,
label {
    cursor: none;
}

.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: rgba(0, 123, 255, 0.35);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.15s ease, height 0.15s ease;
    z-index: 9999;
    backdrop-filter: blur(2px);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.cursor.hover {
    width: 28px;
    height: 28px;
}

::selection {
    background: rgba(0, 123, 255, 0.1);
}

.projects-carousel {
    position: relative;
    margin: 50px auto;
    width: 100%;
    max-width: 600px;
}

.projects-wrapper {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0 0;
    box-sizing: border-box;
}

.projects-wrapper::-webkit-scrollbar {
    display: none;
}
.projects-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.project-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    box-sizing: border-box;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: var(--surface-color);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background-color: var(--color-primary);
    color: white;
}

.carousel-btn.prev {
    left: -80px;
}

.carousel-btn.next {
    right: -50px;
}


.lang-progress-wrapper {
    display: flex;
    align-items: center;
    font-family: Arial, sans-serif;
    padding-top: 15px;
}

.lang-progress-container {
    width: 60px;
    background: var(--surface-color);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 3px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-progress-bar {
    height: 16px;
    background: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.25),
    0 0 20px rgba(0, 122, 255, 0.25),
    0 0 30px rgba(0, 122, 255, 0.25);
    border-radius: 20px;
}

.lang-progress-label {
    font-size: 14px;
    color: var(--text-color);
    white-space: nowrap;
    margin-left: 10px;
}