html, body {
    margin: 0;
    padding: 0;
    background: #040408;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.heart-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.heart-stage.visible {
    opacity: 1;
}

.heart-stage canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.pt-content {
    position: relative;
    z-index: 2;
    padding: 9em clamp(2em, 8vw, 10em) 0;
}

.projects-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4em;
    flex-wrap: wrap;
}

.projects-side {
    flex: 0 1 28em;
    text-align: right;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95em, 1.05vw, 1.05em);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.01em;
    margin: 0 0 0.6em;
}

.projects-side .reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i) * 0.045s);
}

.projects-side.is-in .reveal-word {
    opacity: 1;
    transform: translateY(0);
}

.projects-heading {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(3.5em, 9vw, 7em);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    display: inline-block;
}

.projects-heading .letter-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    line-height: 1.1;
}

.projects-heading .letter {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition:
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        opacity   0.6s ease-out;
    transition-delay: calc(var(--i) * 60ms);
}

.projects-heading.is-in .letter {
    transform: translateY(0);
    opacity: 1;
}

/* Project tiles grid */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 22vh;
    column-gap: clamp(0.8em, 1.4vw, 1.4em);
    row-gap: clamp(2.5em, 4.5vw, 4.5em);
    margin-top: clamp(4em, 9vh, 7em);
    padding-bottom: clamp(4em, 10vh, 8em);
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9em;
    text-decoration: none;
    color: inherit;
    /* `translate` instead of `transform` avoids a compositing layer that softens the image */
    opacity: 0;
    translate: 0 48px;
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        translate 0.95s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i, 0) * 0.08s);
}

.tile.is-in {
    opacity: 1;
    translate: 0 0;
}

.tile-media {
    position: relative;
    flex: 1;
    border-radius: 14px;
    background: #0d0d14;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.tile-badge {
    position: absolute;
    top: 1em;
    left: 1em;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.9em;
    background: rgba(10, 10, 15, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.8em;
    letter-spacing: 0.02em;
    color: #fff;
}

.tile-badge::before {
    content: '';
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: #ffb454;
    box-shadow: 0 0 8px rgba(255, 180, 84, 0.7);
    animation: tile-badge-pulse 1.6s ease-in-out infinite;
}

@keyframes tile-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

/* Hover "View more" cursor bubble */

/* Outer wrapper: per-frame translate is set from JS */
.view-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: clamp(80px, 7.5vw, 115px);
    aspect-ratio: 1;
    pointer-events: none;
    z-index: 50;
    will-change: transform;
}

/* Inner bubble: handles the visual and show/hide animation */
.view-cursor-bubble {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    opacity: 0;
    transform: scale(0.4);
    transform-origin: 50% 50%;
    transition:
        opacity   0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    backdrop-filter: invert(1) hue-rotate(180deg) saturate(1.4);
    -webkit-backdrop-filter: invert(1) hue-rotate(180deg) saturate(1.4);
}

.view-cursor.is-active .view-cursor-bubble {
    opacity: 1;
    transform: scale(1);
}

.view-cursor span {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(0.85em, 1vw, 1em);
    letter-spacing: 0.02em;
    text-align: center;
    color: #ffffff;
    /* Difference blend keeps the label legible on any backdrop */
    mix-blend-mode: difference;
}

/* Index number label, above the image */
.tile-num {
    display: block;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(0.85em, 0.95vw, 1em);
    letter-spacing: 0.08em;
    color: #b89cff;
    margin-bottom: 0.25em;
}

.tile-title {
    margin: 0;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(1.25em, 1.6vw, 1.65em);
    letter-spacing: -0.01em;
    color: #ffffff;
}

/* Footer row: title on the left, tag pills on the right */
.tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    flex-wrap: wrap;
}

.tile-tags {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

/* Dark pill with thin white border */
.tile-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5em 1em;
    background: #0a0a0f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.85em;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    pointer-events: none;
}

/* Size variants for editorial variety */
.tile--xl { grid-column: span 7; grid-row: span 2; }
.tile--lg { grid-column: span 8; grid-row: span 2; }
.tile--md { grid-column: span 6; grid-row: span 2; }
.tile--sm { grid-column: span 5; grid-row: span 2; }

/* Section grouping */

.projects-section {
    margin-top: clamp(3em, 7vh, 6em);
}

.projects-section[aria-labelledby="bots-heading"] {
    margin-top: -60vh;
}

.projects-section:first-of-type {
    margin-top: clamp(4em, 9vh, 7em);
}

.section-heading {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: clamp(1.4em, 2.4vw, 2em);
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 clamp(1.4em, 3vh, 2.4em);
    padding-bottom: 0.7em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-heading-row {
    display: flex;
    align-items: center;
    gap: 1em;
    margin: 0 0 clamp(1.4em, 3vh, 2.4em);
    padding-bottom: 0.7em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-heading-row .section-heading {
    margin: 0;
    padding: 0;
    border: none;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0.9em;
    background: rgba(10, 10, 15, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.85em;
    letter-spacing: 0.02em;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.section-badge::before {
    content: '';
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: #5865F2;
    box-shadow: 0 0 8px rgba(88, 101, 242, 0.7);
}

.section-badge:hover {
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.4);
}

.projects-section .projects-grid {
    margin-top: 0;
}

/* Websites grid: 6 tiles, editorial rhythm.
   01 hero left + 02 top-right, 03 below 01 (left), 04 below 02 (right),
   05 full-width hero, 06 left-aligned (sized like 02). */

.websites-grid .tile:nth-child(1) { grid-column: 1 / span 7; grid-row: span 3; }
.websites-grid .tile:nth-child(1) .tile-media { height: 64vh; flex: none; }
.websites-grid .tile:nth-child(2) { grid-column: 8 / span 5; grid-row: span 3; }
.websites-grid .tile:nth-child(2) .tile-media { height: 64vh; flex: none; }
.websites-grid .tile:nth-child(3) { grid-column: 1 / span 8; grid-row: span 4; margin-top: -5vh; margin-left: 1.5em; }
.websites-grid .tile:nth-child(3) .tile-media { height: 78vh; flex: none; }
.websites-grid .tile:nth-child(4) { grid-column: 5 / span 8; grid-row: span 4; margin-top: -25vh; margin-left: 1.5em; }
.websites-grid .tile:nth-child(4) .tile-media { height: 78vh; flex: none; }
.websites-grid .tile:nth-child(5) { grid-column: 1 / span 12; grid-row: span 5; margin-top: -45vh; }
.websites-grid .tile:nth-child(5) .tile-media { height: 92vh; flex: none; }
.websites-grid .tile:nth-child(6) { grid-column: 1 / span 5; grid-row: span 3; margin-top: -80vh; }
.websites-grid .tile:nth-child(6) .tile-media { height: 64vh; flex: none; }

/* Bots grid: 12 tiles, paired rows + final hero */

.bots-grid .tile:nth-child(1)  { grid-column: 1 / span 6; grid-row: span 3; }
.bots-grid .tile:nth-child(1)  .tile-media { height: 58vh; flex: none; }
.bots-grid .tile:nth-child(2)  { grid-column: 7 / span 6; grid-row: span 3; }
.bots-grid .tile:nth-child(2)  .tile-media { height: 58vh; flex: none; }
.bots-grid .tile:nth-child(3)  { grid-column: 1 / span 7; grid-row: span 3; margin-top: -15vh; }
.bots-grid .tile:nth-child(3)  .tile-media { height: 58vh; flex: none; }
.bots-grid .tile:nth-child(4)  { grid-column: 8 / span 5; grid-row: span 3; margin-top: -15vh; }
.bots-grid .tile:nth-child(4)  .tile-media { height: 58vh; flex: none; }
.bots-grid .tile:nth-child(5)  { grid-column: 1 / span 4; grid-row: span 2; margin-top: -28vh; }
.bots-grid .tile:nth-child(5)  .tile-media { height: 32vh; flex: none; }
.bots-grid .tile:nth-child(6)  { grid-column: 5 / span 4; grid-row: span 2; margin-top: -28vh; }
.bots-grid .tile:nth-child(6)  .tile-media { height: 32vh; flex: none; }
.bots-grid .tile:nth-child(7)  { grid-column: 9 / span 4; grid-row: span 2; margin-top: -28vh; }
.bots-grid .tile:nth-child(7)  .tile-media { height: 32vh; flex: none; }
.bots-grid .tile:nth-child(8)  { grid-column: 1 / span 4; grid-row: span 2; margin-top: -36vh; }
.bots-grid .tile:nth-child(8)  .tile-media { height: 32vh; flex: none; }
.bots-grid .tile:nth-child(9)  { grid-column: 5 / span 4; grid-row: span 2; margin-top: -36vh; }
.bots-grid .tile:nth-child(9)  .tile-media { height: 32vh; flex: none; }
.bots-grid .tile:nth-child(10) { grid-column: 9 / span 4; grid-row: span 2; margin-top: -36vh; }
.bots-grid .tile:nth-child(10) .tile-media { height: 32vh; flex: none; }
.bots-grid .tile:nth-child(11) { grid-column: 1 / span 5; grid-row: span 3; margin-top: -45vh; }
.bots-grid .tile:nth-child(11) .tile-media { height: 58vh; flex: none; }
.bots-grid .tile:nth-child(12) { grid-column: 6 / span 7; grid-row: span 3; margin-top: -45vh; }
.bots-grid .tile:nth-child(12) .tile-media { height: 58vh; flex: none; }

@media (max-width: 1000px) {
    .projects-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 26vh;
    }
    .websites-grid .tile:nth-child(n),
    .bots-grid .tile:nth-child(n) {
        grid-column: auto / span 6;
        grid-row: span 2;
    }
    .websites-grid .tile:nth-child(n) .tile-media,
    .bots-grid .tile:nth-child(n) .tile-media { height: auto; flex: 1; }
    .tile--xl,
    .tile--lg { grid-column: span 6; grid-row: span 2; }
    .tile--md { grid-column: span 3; grid-row: span 2; }
    .tile--sm { grid-column: span 3; grid-row: span 2; }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 32vh;
    }
    .tile,
    .tile--xl,
    .tile--lg,
    .tile--md,
    .tile--sm,
    .projects-grid .tile:nth-child(4),
    .projects-grid .tile:nth-child(6) { grid-column: span 1; grid-row: span 1; }
}

/* Mobile: single column of full-width tiles, particles and hover cursor off.
   `:nth-child(n)` matches the specificity of per-child rules (forced heights,
   absolute grid-row placements, negative margins), then cascade order wins. */
@media (max-width: 768px) {
    .heart-stage,
    .view-cursor {
        display: none !important;
    }
    .projects-grid {
        grid-template-columns: 1fr !important;
        grid-auto-flow: row !important;
        grid-auto-rows: minmax(40vh, auto) !important;
        row-gap: 1em !important;
        column-gap: 0 !important;
        padding-bottom: 6vh !important;
    }
    .projects-grid .tile:nth-child(n) {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        margin-top: 0 !important;
    }
    .projects-grid .tile:nth-child(n) .tile-media {
        height: auto !important;
        min-height: 36vh !important;
        flex: 1 1 auto !important;
    }
    /* Desktop uses -60vh to overlap the bots section into the website tiles.
       On mobile that pulls "Bot Development" right on top of tile 06, so reset it. */
    .projects-section[aria-labelledby="bots-heading"] {
        margin-top: clamp(6em, 16vh, 12em) !important;
    }
}

/* CTA section */

.cta-section {
    position: relative;
    z-index: 2;
    margin-top: clamp(1em, 3vh, 3em);
    padding: clamp(0.5em, 2vh, 1.5em) 0 clamp(10em, 24vh, 18em);
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    /* Break out of pt-content's right padding to right-anchor the CTA */
    margin-right: calc(-1 * clamp(2em, 8vw, 10em) + 2em);
}

.cta-section.visible { pointer-events: auto; }

.cta-inner {
    max-width: 50em;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.4em;
    text-align: right;
    padding: 2.8em 3em 2.6em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.2em;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cta-section.visible .cta-inner {
    opacity: 1;
}

.cta-heading {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4em, 4.4vw, 4em);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
    opacity: 0;
    transform: translateY(-60px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
        transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.cta-description {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1.18em;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    max-width: 28em;
}

.cta-description .cta-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i, 0) * 0.045s + 0.35s);
}

.cta-section.visible .cta-description .cta-word {
    opacity: 1;
    transform: translateY(0);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.9em 1.6em;
    margin-top: 0.6em;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 1em;
    color: #fff;
    background: #8a67ff;
    border: 1px solid #8a67ff;
    border-radius: 999px;
    text-decoration: none;
    opacity: 0;
    transform: translateX(80px) scale(1);
    transform-origin: right center;
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s,
        transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s,
        background-color 0.25s ease,
        border-color 0.25s ease;
}

.cta-section.visible .cta-heading {
    opacity: 1;
    transform: translateY(0);
}

.cta-section.visible .cta-button {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.cta-button:hover {
    transform: translateX(0) scale(1.2);
    background: #0a0a0f;
    border-color: rgba(255, 255, 255, 0.28);
}

.cta-button svg { transition: transform 0.25s ease; }
.cta-button:hover svg { transform: translate(2px, -2px); }

/* Space between the CTA section and the footer. */
#footer {
    margin-top: clamp(10em, 22vh, 18em);
}

/**
 * @INFO
 * Made by Cevio | https://www.cevio.at
 * @INFO
 */
