@property --primary-color {
    syntax: '<color>';
    inherits: true;
    initial-value: #FFCD00;
}

@property --background-color {
    syntax: '<color>';
    inherits: true;
    initial-value: #091214;
}

:root {
    --primary-color: #FFCD00;
    --link-color: #C1C1C1;
    --background-color: #091214;
}

html, body {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    width: 100vw;
    height: auto;
    background: linear-gradient(105deg, var(--background-color) 0%, color-mix(in srgb, var(--primary-color), var(--background-color) 90%) 70%);
    color: var(--primary-color);
    position: relative;
    font-weight: 400;
    line-height: 1.2;
    opacity: 1;
    scroll-behavior: smooth;
    transition: color 0.4s ease, --primary-color 0.4s ease, --background-color 0.4s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    z-index: 9;
    padding-top: 1.25vw;
    padding-bottom: 8px;
    -webkit-transition: top 0.3s 0s ease-out;
    -moz-transition: top 0.3s 0s ease-out;
    -o-transition: top 0.3s 0s ease-out;
    transition: top 0.3s 0s ease-out;
}

.scroll-indicator {
    position: absolute;
    top: calc(100vh - 4.5rem);
    left: 50%;
    transform: translateX(-50%) rotate(-90deg); /* centered + points down */
    font-size: 1.75rem;
    color: var(--link-color);
    animation: scroll-hint 1.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scroll-hint {
    0%, 100% { transform: translateX(-50%) rotate(-90deg) translateX(0); }
    50%      { transform: translateX(-50%) rotate(-90deg) translateX(0.5rem); }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-indicator { animation: none; }
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    background-image: linear-gradient(to bottom, var(--background-color), transparent);
    z-index: -1;
    pointer-events: none;
}

.nav {
    position: relative;
    display: flex;
    /* justify-content: center; */
    /* padding-left: 8%; */
    padding-right: 8%;
    justify-content: right;
    gap: 2.5vw;
}

.nav-link {
    position: relative;
    padding-bottom: 0.4rem;
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: left 0.3s ease, width 0.3s ease, background-color 0.4s ease;
}

.contentWrapper {
    position: relative;
    padding-top: 0;
    margin-top: 0;
    padding-left: 8%;
    /* padding-bottom: 50vw; */
    margin-bottom: 0;
}

.title {
    padding-top: 40vh;
    height: 80vh;
}

/* projects */
.projecten {
    padding-top: 10px;
}
.contentWrapper {
    padding-right: 8%;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 6vw;
}

.project-list:last-child {
    margin-bottom: 13vh;
}

.project-item {
    display: flex;
    align-items: stretch;
    min-height: 70vh;
    gap: 4vw;
}

.project-item > div {
    flex: 1 1 50%;
    width: 50%;
}

.project-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.project-info h3 {
    font-size: clamp(1.5rem, 2.2vw, 2.25rem);
    margin: 0;
}

.project-info span {
    color: #949393;
}

.project-info p {
    color: var(--link-color);
    line-height: 1.5;
    margin-bottom: 2px;
}

.project-link {
    margin-top: 0.2rem;
    align-self: flex-start;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.project-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.project-image {
    display: flex;
    align-items: center;      /* centers the image vertically in the stretched half */
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .project-item {
        flex-direction: column;
        min-height: auto;
        gap: 1.5rem;
    }
    .project-item > div {
        width: 100%;
    }
    .project-image img {
        max-height: 50vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    html, body,
    .nav-indicator,
    .nav-link,
    .project-link {
        transition: none;
    }
}

/* image slideshow */
.project-slideshow {
    position: relative;
    width: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 23px 16px 18px 1px rgba(0, 0, 0, 0.47);
}

.slideshow-track {
    display: grid; /* stacks all slides in the same cell */
}

.slideshow-track .slide {
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
    box-shadow: none;
    border-radius: 0;
}

.slideshow-track .slide.active { opacity: 1; }

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(9, 18, 20, 0.719);
    color: var(--link-color);
    border: none;
    border-radius: 8px;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.slide-nav:hover { background: rgba(9, 18, 20, 0.9); }
.slide-prev { left: 0.3rem; }
.slide-next { right: 0.3rem; }

.slide-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
}

.slide-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--link-color);
    cursor: pointer;
    transition: background 0.25s ease;
}

.slide-dots .dot.active { background: var(--primary-color); }

/* over */
.over {
    position: relative;
    isolation: isolate;
    padding-top: 22vh;
}

.over::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--background-color) 20vh,
        var(--background-color) 100%
    );
    z-index: -1;
    pointer-events: none;
}

.code {
    counter-reset: line;
    font-size: clamp(0.75rem, 1.275vw, 1.2rem);
    line-height: 1.5;
}

.line {
    color: var(--link-color);
    white-space: pre;
    background: transparent;
    box-shadow: 0 0 0 100vmax transparent;
    clip-path: inset(0 -100vmax);
}

@media (hover: hover) {
    .line:hover {
        --line-hover: color-mix(in srgb, var(--background-color), white 7%);
        background-color: var(--line-hover);
        box-shadow: 0 0 0 100vmax var(--line-hover);
    }
}

.line::before {
    counter-increment: line;
    content: counter(line, decimal-leading-zero) "  ";
    color: #949393;
    user-select: none;
}

/* syntax colors */
.kw   { color: #ff7ab2; }                  /* keywords: class, return, this */
.cls  { color: var(--primary-color); font-weight: 700; }  /* class name */
.fn   { color: var(--primary-color); }     /* function names */
.prop { color: #7dcfff; }                  /* properties: naam, leeftijd */
.str  { color: #a6e3a1; }                  /* strings */
.num  { color: #fab387; }                  /* numbers */

/* contact */
.contact {
    position: relative;
    isolation: isolate;
    padding-top: 12vh;
    padding-bottom: 20vh;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        var(--background-color) 0%,
        color-mix(in srgb, var(--background-color), black 60%) 20vh,
        color-mix(in srgb, var(--background-color), black 60%) 100%
    );
    z-index: -1;
    pointer-events: none;
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact-text {
    color: var(--link-color);
}

.contact-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--link-color), transparent 70%);
    border-radius: 8px;
    background: color-mix(in srgb, var(--background-color), white 4%);
    color: var(--link-color);
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.contact-link svg {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
}

.contact-link:hover,
.contact-link:focus-visible {
    color: #fff;
    border-color: color-mix(in srgb, var(--link-color), transparent 30%);
    background: color-mix(in srgb, var(--background-color), white 10%);
    transform: translateY(-2px);
}

.contact-link:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .contact-link { transition: none; }
    .contact-link:hover { transform: none; }
}

@media (max-width: 768px) {
    .project-item {
        flex-direction: column;
        min-height: auto;
        gap: 1.5rem;
    }
    .project-item > div {
        width: 100%;
    }
    .project-info {
        order: 1;
    }
    .project-image {
        order: 2;
    }
    .project-image img {
        max-height: 50vh;
    }
    .line {
        white-space: pre-wrap;
        padding-left: 4ch;
        text-indent: -4ch;
        overflow-wrap: anywhere;
    }
}