@font-face {
    font-family: "MFDefrag";
    src: url("fonts/MFDefrag-SquareCircle.woff2?v=4") format("woff2");
}

/* ======== ROOT ======== */

:root {
    font-size: 10px;
    --cursor-size: 3rem;
    --bg: #262626;
    --accent: #FE5000;
}

@media (min-width: 768px) {
    :root { font-size: 13px; }
}

@media (min-width: 1200px) {
    :root { font-size: 16px; }
}


/* ======== CURSOR ======== */

@media (hover: hover) {
    * {
        cursor: none !important;
    }

    .cursor {
        position: fixed;
        width: var(--cursor-size);
        height: var(--cursor-size);
        pointer-events: none;
        z-index: 99999;
        opacity: 0;
    }

    .cursor::before,
    .cursor::after {
        content: '';
        position: absolute;
        inset: 0;
        background-size: contain;
        background-repeat: no-repeat;
        transition: opacity 0.25s ease;
    }

    .cursor::before {
        background-image: url('../img/mouse-regular-orange.svg');
        opacity: 1;
    }

    .cursor::after {
        background-image: url('../img/mouse-hovering-orange.svg');
        opacity: 0;
    }

    .cursor--hovering::before { opacity: 0; }
    .cursor--hovering::after  { opacity: 1; }

    body.dark-mode .cursor::before,
    body.dark-mode .cursor::after {
        filter: brightness(0) invert(1);
    }
}


/* ======== BASE ======== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 0; }

body.dark-mode { scrollbar-color: #ffffff transparent; }
body.dark-mode::-webkit-scrollbar-thumb { background: #ffffff; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
}


/* ======== DARK MODE ======== */

body.dark-mode {
    --accent: #ffffff;
}

body.dark-mode header a,
body.dark-mode nav a,
body.dark-mode footer a,
body.dark-mode .square-2-circle,
body.dark-mode .circle-2-square,
body.dark-mode .section-intro p,
body.dark-mode .section-label,
body.dark-mode .services-grid__item p,
body.dark-mode .contact-section p,
body.dark-mode .contact-section a,
body.dark-mode .about-page p,
body.dark-mode .about-page a,
body.dark-mode .projects-list a,
body.dark-mode .projects-list span,
body.dark-mode .project__title,
body.dark-mode .project__type,
body.dark-mode .project__year,
body.dark-mode .project__description {
    color: #ffffff;
}

body.dark-mode .projects-list,
body.dark-mode .projects-list li,
body.dark-mode .services-grid,
body.dark-mode .services-grid__item,
body.dark-mode .project__title,
body.dark-mode .project__type,
body.dark-mode .project__year + .project__description {
    border-color: #ffffff;
}


/* ======== HEADER ======== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg);
    font-family: 'Roboto', sans-serif;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header a,
nav a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.5rem;
    transition: opacity 0.2s;
}

header a:hover,
nav a:hover { opacity: 0.6; }

.dark-toggle {
    display: inline-flex;
    align-items: center;
}

.dark-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dark-toggle__track {
    display: inline-block;
    width: 2.8rem;
    height: 1.4rem;
    background: #444;
    border-radius: 1rem;
    position: relative;
    transition: background 0.25s;
}

.dark-toggle__track::after {
    content: '';
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1rem;
    height: 1rem;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}

.dark-toggle input:checked + .dark-toggle__track { background: #555; }
.dark-toggle input:checked + .dark-toggle__track::after {
    transform: translateX(1.4rem);
    background: #ffffff;
}

nav {
    display: flex;
    gap: 2rem;
}


/* ======== FOOTER ======== */

footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--bg);
    font-family: 'Roboto', sans-serif;
}

footer span,
footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.5rem;
    transition: opacity 0.2s;
}

footer span { opacity: 0.5; }
footer a:hover { opacity: 0.6; }

body.dark-mode footer span,
body.dark-mode footer a { color: #ffffff; }


/* ======== HERO ======== */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.word-block {
    width: 100%;
}

.word {
    display: flex;
    width: 100%;
    line-height: 1;
}

.square-2-circle {
    font-family: "MFDefrag", sans-serif;
    font-size: calc(21.74vw - 0.8696rem);
    font-variation-settings: "STYL" 200;
    transition: font-variation-settings 0.3s cubic-bezier(0.5, 0, 0, 1);
    color: var(--accent);
    cursor: default;
    user-select: none;
}

.square-2-circle.shifted { font-variation-settings: "STYL" 800; }

.square-2-circle:hover,
.square-2-circle.shifted:hover { font-variation-settings: "STYL" 800; }

.square-2-circle.shifted:hover { font-variation-settings: "STYL" 200; }

.circle-2-square {
    font-family: "MFDefrag", sans-serif;
    font-size: calc(21.74vw - 0.8696rem);
    font-variation-settings: "STYL" 800;
    transition: font-variation-settings 0.3s cubic-bezier(0.5, 0, 0, 1);
    color: var(--accent);
    cursor: default;
    user-select: none;
}

.circle-2-square.shifted { font-variation-settings: "STYL" 200; }

.circle-2-square:hover,
.circle-2-square.shifted:hover { font-variation-settings: "STYL" 200; }

.circle-2-square.shifted:hover { font-variation-settings: "STYL" 800; }


/* ======== SECTION INTRO (about text) ======== */

.section-intro {
    padding: 6rem 2rem;
    border-top: 1px solid var(--accent);
}

.section-intro p {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(2.4rem, 2vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--accent);
    margin: 0 0 2rem;
}

.section-intro p:last-of-type {
    margin-bottom: 0;
}

.section-intro p strong {
    font-weight: 700;
}

.section-intro p a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}


body.dark-mode .section-intro {
    border-color: #ffffff;
}


/* ======== SECTION LABEL ======== */

.section-label {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    color: var(--accent);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 2rem 2rem 1.5rem;
}


/* ======== SERVICES GRID ======== */

.services-grid {
    list-style: none;
    margin: 0 2rem 6rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.services-grid__item {
    padding: 2rem;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    container-type: inline-size;
}

.services-grid__item p {
    font-family: 'Roboto', sans-serif;
    font-size: 9cqw;
    font-weight: 400;
    line-height: 1.1;
    color: var(--accent);
    margin: 0;
}

/* ── Service decoration keyframes ── */

@keyframes cursor-ring {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

@keyframes cursor-dot-a {
    0%, 100% { transform: translate(0, 0); }
    25%  { transform: translate(120%, -80%); }
    50%  { transform: translate(-60%, 110%); }
    75%  { transform: translate(80%,   60%); }
}

@keyframes cursor-dot-b {
    0%, 100% { transform: translate(0, 0); }
    30%  { transform: translate(-110%, 50%); }
    60%  { transform: translate(80%,  -100%); }
    80%  { transform: translate(-50%,  -60%); }
}

@keyframes cursor-dot-c {
    0%, 100% { transform: translate(0, 0); }
    35%  { transform: translate(100%, 80%); }
    70%  { transform: translate(-80%, -40%); }
}

@keyframes circle-fill-outline {
    0%, 100% { background: var(--accent); }
    50%       { background: transparent; }
}

@keyframes slider-thumb {
    0%   { left: 8%; }
    100% { left: 88%; }
}

@keyframes circle-fade {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.08; }
}

@keyframes circle-morph {
    0%, 35%  { border-radius: 50%; }
    65%, 100% { border-radius: 0; }
}

@keyframes bar-anim-1 {
    0%   { width: 85%; }
    100% { width: 25%; }
}
@keyframes bar-anim-2 {
    0%   { width: 55%; }
    100% { width: 92%; }
}
@keyframes bar-anim-3 {
    0%   { width: 42%; }
    100% { width: 70%; }
}
@keyframes bar-anim-4 {
    0%   { width: 70%; }
    100% { width: 18%; }
}
@keyframes bar-anim-5 {
    0%   { width: 15%; }
    100% { width: 52%; }
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.08; }
}

@keyframes play-breathe {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.82); }
}

/* ── Service decorations ── */

.svc-deco {
    margin-top: auto;
    padding-top: 1.5rem;
    pointer-events: none;
}

/* 01 — cursor */
.svc-cursor {
    position: relative;
    width: 8cqw;
    height: 8cqw;
    min-width: 3rem;
    min-height: 3rem;
}

.svc-cursor__dot {
    position: absolute;
    width: 1.2cqw;
    height: 1.2cqw;
    min-width: 0.45rem;
    min-height: 0.45rem;
    background: var(--accent);
    border-radius: 50%;
    top: 25%;
    left: 20%;
    animation: cursor-dot-a 5s ease-in-out infinite;
}

.svc-cursor__dot--b {
    top: 60%;
    left: 62%;
    animation: cursor-dot-b 7s ease-in-out infinite;
}

.svc-cursor__dot--c {
    top: 72%;
    left: 30%;
    animation: cursor-dot-c 6s ease-in-out infinite;
}

.svc-cursor__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6cqw;
    height: 6cqw;
    min-width: 2.2rem;
    min-height: 2.2rem;
    border: 1px solid var(--accent);
    border-radius: 50%;
    animation: cursor-ring 2.2s ease-out infinite;
}

.svc-cursor__ring--b {
    width: 4cqw;
    height: 4cqw;
    min-width: 1.5rem;
    min-height: 1.5rem;
    animation: cursor-ring 2.2s ease-out infinite 1.1s;
}

/* 02 — slider */
.svc-slider {
    position: relative;
    height: 1px;
    background: var(--accent);
    margin: 1rem 0;
}

.svc-slider__thumb {
    position: absolute;
    top: 50%;
    left: 8%;
    transform: translate(-50%, -50%);
    width: 2.5cqw;
    height: 2.5cqw;
    min-width: 1rem;
    min-height: 1rem;
    background: var(--accent);
    border-radius: 50%;
    animation: slider-thumb 3.2s ease-in-out infinite alternate;
}

/* 03 — circles */
.svc-circles {
    display: flex;
    gap: 1.5cqw;
    flex-wrap: wrap;
}

.svc-circle {
    width: 3.5cqw;
    height: 3.5cqw;
    min-width: 1.2rem;
    min-height: 1.2rem;
    border-radius: 50%;
    background: var(--accent);
}

.svc-circle--outline {
    background: transparent;
    border: 1px solid var(--accent);
}

.svc-circle--toggle {
    border: 1px solid var(--accent);
}

.svc-circle:nth-child(1) { animation: circle-fill-outline 2.1s ease-in-out infinite 0.0s; }
.svc-circle:nth-child(2) { animation: circle-morph       3.2s ease-in-out infinite alternate 0.0s; }
.svc-circle:nth-child(3) { animation: circle-fill-outline 3.6s ease-in-out infinite 1.3s; }
.svc-circle:nth-child(4) { animation: circle-fill-outline 2.7s ease-in-out infinite 0.3s; }
.svc-circle:nth-child(5) { animation: circle-morph       2.5s ease-in-out infinite alternate 0.8s; }
.svc-circle:nth-child(6) { animation: circle-fill-outline 1.8s ease-in-out infinite 1.8s; }
.svc-circle:nth-child(7) { animation: circle-fill-outline 3.3s ease-in-out infinite 0.9s; }
.svc-circle:nth-child(8) { animation: circle-morph       3.8s ease-in-out infinite alternate 1.4s; }

/* 04 — bars */
.svc-bars {
    display: flex;
    flex-direction: column;
    gap: 0.8cqw;
}

.svc-bar {
    height: 3px;
    background: var(--accent);
}

.svc-bar:nth-child(1) { animation: bar-anim-1 2.3s ease-in-out infinite alternate; }
.svc-bar:nth-child(2) { animation: bar-anim-2 3.1s ease-in-out infinite alternate 0.4s; }
.svc-bar:nth-child(3) { animation: bar-anim-3 1.9s ease-in-out infinite alternate 0.8s; }
.svc-bar:nth-child(4) { animation: bar-anim-4 2.7s ease-in-out infinite alternate 0.2s; }
.svc-bar:nth-child(5) { animation: bar-anim-5 3.5s ease-in-out infinite alternate 1.1s; }

/* 05 — dot grid */
.svc-grid-dots {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1.2cqw;
    width: 100%;
}

.svc-dot {
    width: 1.5cqw;
    height: 1.5cqw;
    min-width: 0.45rem;
    min-height: 0.45rem;
    background: var(--accent);
    border-radius: 50%;
}

.svc-dot:nth-child(1)  { animation: dot-blink 2.3s ease-in-out infinite 0.0s; }
.svc-dot:nth-child(2)  { animation: dot-blink 3.7s ease-in-out infinite 0.5s; }
.svc-dot:nth-child(3)  { animation: dot-blink 1.9s ease-in-out infinite 1.2s; }
.svc-dot:nth-child(4)  { animation: dot-blink 4.1s ease-in-out infinite 0.3s; }
.svc-dot:nth-child(5)  { animation: dot-blink 2.8s ease-in-out infinite 1.7s; }
.svc-dot:nth-child(6)  { animation: dot-blink 3.2s ease-in-out infinite 0.8s; }
.svc-dot:nth-child(7)  { animation: dot-blink 2.1s ease-in-out infinite 2.1s; }
.svc-dot:nth-child(8)  { animation: dot-blink 3.9s ease-in-out infinite 0.1s; }
.svc-dot:nth-child(9)  { animation: dot-blink 1.7s ease-in-out infinite 1.4s; }
.svc-dot:nth-child(10) { animation: dot-blink 4.4s ease-in-out infinite 0.6s; }
.svc-dot:nth-child(11) { animation: dot-blink 2.6s ease-in-out infinite 1.9s; }
.svc-dot:nth-child(12) { animation: dot-blink 3.0s ease-in-out infinite 0.4s; }
.svc-dot:nth-child(13) { animation: dot-blink 2.4s ease-in-out infinite 1.1s; }
.svc-dot:nth-child(14) { animation: dot-blink 3.6s ease-in-out infinite 2.3s; }
.svc-dot:nth-child(15) { animation: dot-blink 1.8s ease-in-out infinite 0.7s; }
.svc-dot:nth-child(16) { animation: dot-blink 4.2s ease-in-out infinite 1.5s; }
.svc-dot:nth-child(17) { animation: dot-blink 2.9s ease-in-out infinite 0.2s; }
.svc-dot:nth-child(18) { animation: dot-blink 3.4s ease-in-out infinite 1.8s; }
.svc-dot:nth-child(19) { animation: dot-blink 2.2s ease-in-out infinite 2.6s; }
.svc-dot:nth-child(20) { animation: dot-blink 3.8s ease-in-out infinite 0.9s; }
.svc-dot:nth-child(21) { animation: dot-blink 1.6s ease-in-out infinite 1.3s; }
.svc-dot:nth-child(22) { animation: dot-blink 4.0s ease-in-out infinite 2.0s; }
.svc-dot:nth-child(23) { animation: dot-blink 2.7s ease-in-out infinite 0.5s; }
.svc-dot:nth-child(24) { animation: dot-blink 3.3s ease-in-out infinite 1.6s; }
.svc-dot:nth-child(25) { animation: dot-blink 2.0s ease-in-out infinite 2.8s; }
.svc-dot:nth-child(26) { animation: dot-blink 3.5s ease-in-out infinite 0.4s; }
.svc-dot:nth-child(27) { animation: dot-blink 2.5s ease-in-out infinite 1.0s; }
.svc-dot:nth-child(28) { animation: dot-blink 4.3s ease-in-out infinite 2.2s; }
.svc-dot:nth-child(29) { animation: dot-blink 1.5s ease-in-out infinite 0.6s; }
.svc-dot:nth-child(30) { animation: dot-blink 3.1s ease-in-out infinite 1.5s; }
.svc-dot:nth-child(31) { animation: dot-blink 2.8s ease-in-out infinite 2.4s; }
.svc-dot:nth-child(32) { animation: dot-blink 3.9s ease-in-out infinite 0.3s; }
.svc-dot:nth-child(33) { animation: dot-blink 1.7s ease-in-out infinite 1.7s; }
.svc-dot:nth-child(34) { animation: dot-blink 4.5s ease-in-out infinite 0.8s; }
.svc-dot:nth-child(35) { animation: dot-blink 2.3s ease-in-out infinite 2.0s; }
.svc-dot:nth-child(36) { animation: dot-blink 3.6s ease-in-out infinite 1.2s; }
.svc-dot:nth-child(37) { animation: dot-blink 2.1s ease-in-out infinite 0.1s; }
.svc-dot:nth-child(38) { animation: dot-blink 4.0s ease-in-out infinite 2.7s; }
.svc-dot:nth-child(39) { animation: dot-blink 2.6s ease-in-out infinite 1.4s; }
.svc-dot:nth-child(40) { animation: dot-blink 3.2s ease-in-out infinite 0.7s; }
.svc-dot:nth-child(41) { animation: dot-blink 1.9s ease-in-out infinite 2.1s; }
.svc-dot:nth-child(42) { animation: dot-blink 3.7s ease-in-out infinite 0.5s; }
.svc-dot:nth-child(43) { animation: dot-blink 2.4s ease-in-out infinite 1.6s; }
.svc-dot:nth-child(44) { animation: dot-blink 4.1s ease-in-out infinite 2.9s; }
.svc-dot:nth-child(45) { animation: dot-blink 2.9s ease-in-out infinite 0.9s; }
.svc-dot:nth-child(46) { animation: dot-blink 3.4s ease-in-out infinite 1.3s; }
.svc-dot:nth-child(47) { animation: dot-blink 1.8s ease-in-out infinite 2.5s; }
.svc-dot:nth-child(48) { animation: dot-blink 4.2s ease-in-out infinite 0.2s; }
.svc-dot:nth-child(49) { animation: dot-blink 2.2s ease-in-out infinite 1.8s; }
.svc-dot:nth-child(50) { animation: dot-blink 3.8s ease-in-out infinite 3.0s; }

/* 06 — play */
.svc-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8cqw 0 8cqw 14cqw;
    border-color: transparent transparent transparent var(--accent);
    animation: play-breathe 2.4s ease-in-out infinite;
}


/* ======== PROJECTS GRID ======== */

.work-section {
    padding-bottom: 6rem;
}

.projects-list {
    list-style: none;
    margin: 0 2rem 6rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}

@media (max-width: 768px) {
    .projects-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.projects-list li {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
    container-type: inline-size;
}

.projects-list a {
    font-family: 'Roboto', sans-serif;
    font-size: 7cqw;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}

.projects-list a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
}

.projects-list span {
    font-size: 7cqw;
    color: var(--accent);
}

.project-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.projects-list li:hover .project-preview { opacity: 1; }

.project-type { opacity: 0.5; }
.project-year { margin-top: auto; }


/* ======== CONTACT SECTION ======== */

.contact-section {
    padding: 4rem 2rem 6rem;
    border-top: 1px solid var(--accent);
}

.contact-section p {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(2rem, 3vw, 3.5rem);
    color: var(--accent);
    margin: 0 0 3rem;
    line-height: 1.2;
}

.contact-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-form input {
    flex: 1;
    min-width: 16rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    padding: 1.2rem 1.8rem;
    outline: none;
    transition: opacity 0.2s;
}

.contact-form input::placeholder { opacity: 0.4; }
.contact-form input:focus { opacity: 1; }

body.dark-mode .contact-form input {
    border-color: #ffffff;
    color: #ffffff;
}

.contact-form button {
    background: var(--accent);
    color: #262626;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1.2rem 3rem;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.contact-form button:hover { opacity: 0.8; }

.contact-section .contact-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent);
}

.contact-section .contact-links a {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.contact-section .contact-links a:hover { opacity: 1; }

body.dark-mode .contact-section .contact-links {
    border-color: #ffffff;
}


/* ======== LIGHTBOX ======== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.lightbox--open {
    opacity: 1;
    pointer-events: all;
}

.lightbox__media-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.lightbox__close {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 2.5rem;
    line-height: 1;
    padding: 0 0 1rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.lightbox__close:hover { opacity: 1; }

body.dark-mode .lightbox__close { color: #ffffff; }

.lightbox__arrow {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 3rem;
    padding: 1rem 2rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.lightbox__arrow:hover { opacity: 1; }

body.dark-mode .lightbox__arrow { color: #ffffff; }

.lightbox__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox__media {
    height: calc(90vh - 6rem);
    aspect-ratio: 9 / 16;
    background: #333;
}

@media (max-width: 640px) {
    .lightbox {
        flex-wrap: wrap;
        align-content: center;
    }

    .lightbox__inner {
        order: 1;
        flex: 0 0 100%;
    }

    .lightbox__arrow {
        order: 2;
        flex: 1;
    }

    .lightbox__media {
        height: calc(70vh - 6rem);
    }
}

.lightbox__title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    color: var(--accent);
    margin: 0;
}

.lightbox__year {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: var(--accent);
    margin: 0;
    opacity: 0.5;
}

body.dark-mode .lightbox__title,
body.dark-mode .lightbox__year { color: #ffffff; }

.lightbox__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ======== PROJECT PAGES ======== */

.project {
    padding: 8rem 2rem 6rem;
}

.project__layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.project__text {
    position: sticky;
    top: 8rem;
}

.project__title,
.project__type,
.project__year,
.project__description {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--accent);
    margin: 0;
    padding: 1rem 0;
    line-height: 1.4;
}

.project__title,
.project__type {
    border-top: 1px solid var(--accent);
}

.project__year + .project__description {
    border-top: 1px solid var(--accent);
}

.project__year { padding-top: 0; }

.project__description--meta { opacity: 0.5; }

.project__video {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #333;
}

.project__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100%;
    width: calc(100% * 32 / 27);
    transform: translate(-50%, -50%);
    border: none;
}

.project__video--vertical { aspect-ratio: 1 / 1; }
.project__video--vertical iframe { width: 100%; height: 100%; }

.project__video::after {
    content: '';
    position: absolute;
    inset: 0;
}

.project__images {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project__image {
    width: 100%;
    background: #333;
}

.project__image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .project__layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project__text { position: static; }

    .project__title,
    .project__type,
    .project__year,
    .project__description { font-size: 1.4rem; }
}


/* ======== ABOUT PAGE ======== */

.about-page {
    padding: 8rem 2rem 6rem;
    max-width: 800px;
}

.about-page p {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    line-height: 1.75;
    color: var(--accent);
    margin: 0 0 2.5rem;
}

.about-page p:last-child { margin-bottom: 0; }

.about-page a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.about-page a:hover { opacity: 0.6; }

.about-page .about-contact {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent);
}

body.dark-mode .about-page .about-contact {
    border-color: #ffffff;
}


/* ======== COPY EMAIL TOOLTIP ======== */

.copy-email {
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
}

.copy-email::after {
    content: 'copied';
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: var(--accent);
    background: none;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.copy-email.copied::after {
    opacity: 1;
}


/* ======== PLAYGROUND PAGE ======== */

.playground-page {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 6rem;
}

@media (min-width: 768px) {
    .playground-page {
        padding-top: 2rem;
    }
}

.playground-sphere {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#sphere-scene {
    position: absolute;
    inset: 0;
}

.gif-card {
    width: 50px;
    height: 89px;
    background: #333;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

@media (min-width: 768px) {
    .gif-card {
        width: 55px;
        height: 98px;
    }
}

.gif-card:hover {
    box-shadow: 0 0 18px rgba(254, 80, 0, 0.85);
}

.gif-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
