:root {
    --bg: #0b0b0b;
    --surface: #111111;
    --surface-light: #171717;
    --text: #f4f1eb;
    --muted: #99958d;
    --line: rgba(255, 255, 255, 0.10);
    --accent: #d8ff3e;
    --max-width: 1240px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    width: 100%;
    display: block;
}

button {
    font: inherit;
}


/* NOISE */

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.035;
    z-index: 100;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}


/* CURSOR */

.cursor-glow {
    position: fixed;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(216, 255, 62, 0.035);
    filter: blur(60px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}


/* NAVBAR */

.navbar {
    height: 82px;
    width: min(100% - 48px, var(--max-width));
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: relative;
    z-index: 50;
}

.logo {
    font-family: "Space Grotesk", sans-serif;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 34px;
}

.nav-links a {
    color: var(--muted);
    font-size: 14px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cv {
    border: 1px solid var(--line);
    padding: 11px 18px;
    font-size: 13px;
    transition: 0.3s;
}

.nav-cv:hover {
    background: var(--accent);
    color: #111;
}

.menu-btn {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 60;
    padding: 10px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    margin: 6px 0;
    transition: 0.3s ease;
}

/* Animate two lines */
.menu-btn.active span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.menu-btn.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}


/* HERO */

.hero {
    width: min(100% - 48px, var(--max-width));
    min-height: calc(100vh - 82px);
    margin: auto;

    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;

    position: relative;
}

.hero-content {
    max-width: 760px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

.hero h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(65px, 8.2vw, 125px);
    line-height: 0.88;
    letter-spacing: -6px;
    max-width: 850px;
}

.hero h1 span {
    color: var(--accent);
}

.hero-description {
    max-width: 520px;
    margin-top: 38px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-top: 35px;
}

.btn {
    padding: 15px 22px;
    display: inline-flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    transition: 0.35s;
}

.btn-primary {
    background: var(--accent);
    color: #111;
}

.btn-primary:hover {
    transform: translateY(-4px);
}

.btn-secondary {
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    border-color: white;
}

.hero-visual {
    height: 480px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card {
    width: 290px;
    background: var(--surface);
    padding: 14px;
    transform: rotate(4deg);
    transition: 0.5s;
    position: relative;
    z-index: 2;
}

.profile-card:hover {
    transform: rotate(0deg) translateY(-10px);
}

.profile-image {
    aspect-ratio: 4/5;
    overflow: hidden;
}

.profile-image img {
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 0.5s;
}

.profile-card:hover img {
    filter: grayscale(0);
}

.profile-info {
    padding: 18px 5px 7px;
    display: flex;
    justify-content: space-between;
}

.profile-info span {
    color: var(--muted);
    font-size: 11px;
}

.profile-info strong {
    font-size: 12px;
}

.orbit {
    position: absolute;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.orbit-one {
    width: 400px;
    height: 400px;
    animation: orbit 18s linear infinite;
}

.orbit-two {
    width: 500px;
    height: 280px;
    transform: rotate(40deg);
}

@keyframes orbit {
    to {
        transform: rotate(360deg);
    }
}

.scroll-text {
    position: absolute;
    bottom: 25px;
    left: 0;
    color: #777;
    font-size: 10px;
    letter-spacing: 2px;
}



/* MARQUEE */

.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    width: 100%;
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 32px;
    animation: marquee 35s linear infinite;
}

.marquee span {
    font-family: "Space Grotesk";
    font-size: 14px;
    letter-spacing: 2px;
    white-space: nowrap;
}

.marquee i {
    color: var(--accent);
    font-style: normal;
    flex-shrink: 0;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* SECTIONS */

.section {
    width: min(100% - 48px, var(--max-width));
    margin: auto;
    padding: 150px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr 0.5fr;
    gap: 40px;
    align-items: end;
    margin-bottom: 80px;
}

.section-number {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2px;
}

.section-heading h2 {
    font-family: "Space Grotesk";
    font-size: clamp(50px, 6vw, 85px);
    letter-spacing: -4px;
    line-height: 0.95;
    margin-top: 20px;
}

.section-heading em,
.cv-section em,
.contact-section em {
    color: var(--accent);
    font-style: normal;
}

.heading-description {
    color: var(--muted);
    line-height: 1.7;
}


/* PROJECT */

.project {
    margin-bottom: 70px;
}

.project-image {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.project-image img {
    aspect-ratio: 16/8;
    object-fit: cover;
    transition: 0.7s cubic-bezier(.2, .7, .2, 1);
}

.project-image.small img {
    aspect-ratio: 4/3;
}

.project:hover img {
    transform: scale(1.04);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transition: 0.4s;
}

.project-overlay span {
    background: var(--accent);
    color: #111;
    padding: 13px 20px;
    font-size: 13px;
    transform: translateY(20px);
    transition: 0.4s;
}

.project:hover .project-overlay {
    opacity: 1;
}

.project:hover .project-overlay span {
    transform: translateY(0);
}

.project-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
    margin-top: 14px;
}

.project-number {
    color: var(--accent);
    font-size: 12px;
}

.project h3 {
    font-family: "Space Grotesk";
    font-size: 35px;
    margin-top: 12px;
}

.project-type {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.project-description {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-content: flex-start;
}

.tech-list span {
    border: 1px solid var(--line);
    padding: 7px 10px;
    font-size: 10px;
    color: var(--muted);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
}

.project-simple {
    border: 1px solid var(--line);
    min-height: 500px;
    padding: 45px;
    background: var(--surface);
}

.simple-project-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-icon {
    font-family: monospace;
    color: var(--accent);
    font-size: 45px;
    margin: 40px 0 10px;
}

.project-simple p {
    color: var(--muted);
    line-height: 1.7;
    margin-top: 20px;
    max-width: 400px;
}

.text-link {
    display: inline-block;
    margin-top: 25px;
    color: var(--accent);
    font-size: 13px;
}


/* ABOUT */

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    gap: 120px;
    align-items: center;
}

.about-photo {
    position: relative;
}

.about-photo img {
    aspect-ratio: 4/5;
    object-fit: cover;
    filter: grayscale(100%);
}

.photo-caption {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 13px;
}

.about-content {
    max-width: 620px;
}

.big-text {
    font-family: "Space Grotesk";
    font-size: 31px;
    line-height: 1.2;
    margin-bottom: 35px;
}

.about-content p:not(.big-text) {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 20px;
}


/* SERVICES */

.services-grid {
    border-top: 1px solid var(--line);
}

.service {
    display: grid;
    grid-template-columns: 0.15fr 0.7fr 1fr;
    gap: 40px;
    padding: 35px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
    transition: 0.3s;
}

.service:hover {
    padding-left: 15px;
}

.service>span {
    color: var(--accent);
    font-size: 11px;
}

.service h3 {
    font-family: "Space Grotesk";
    font-size: 27px;
}

.service p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.tech-stack {
    margin-top: 80px;
}

.tech-stack>p {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-items span {
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 13px;
    transition: 0.3s;
}

.tech-items span:hover {
    background: var(--accent);
    color: #111;
    transform: translateY(-3px);
}


/* PLAYGROUND */

.playground-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.experiment {
    min-height: 370px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}

.experiment>span {
    color: var(--muted);
    font-size: 11px;
}

.experiment-circle {
    width: 100px;
    height: 100px;
    border: 1px solid var(--accent);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--accent);
    font-size: 35px;

    margin: 70px auto 40px;
}

.rotate {
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    50% {
        transform: scale(1.15);
    }
}

.experiment h3 {
    font-family: "Space Grotesk";
    font-size: 24px;
}

.experiment p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}


/* TIMELINE */

.timeline {
    max-width: 900px;
    border-top: 1px solid var(--line);
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    padding: 35px 0;
    border-bottom: 1px solid var(--line);
}

.year {
    color: var(--accent);
    font-size: 12px;
}

.timeline-item h3 {
    font-family: "Space Grotesk";
    font-size: 25px;
}

.timeline-item p {
    color: var(--muted);
    margin-top: 8px;
    font-size: 14px;
}


/* CV */

.cv-section {
    width: min(100% - 48px, var(--max-width));
    margin: 0 auto 150px;
    padding: 65px;
    border: 1px solid var(--line);

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cv-section h2 {
    font-family: "Space Grotesk";
    font-size: clamp(40px, 5vw, 65px);
    letter-spacing: -3px;
    margin-top: 15px;
}

.big-download {
    border: 1px solid var(--accent);
    padding: 20px 25px;
    color: var(--accent);
    display: flex;
    gap: 30px;
    transition: 0.3s;
}

.big-download:hover {
    background: var(--accent);
    color: #111;
}


/* CONTACT */

.contact-section {
    min-height: 85vh;
    display: flex;
    align-items: center;

    border-top: 1px solid var(--line);
}

.contact-inner {
    width: min(100% - 48px, var(--max-width));
    margin: auto;
}

.contact-section h2 {
    font-family: "Space Grotesk";
    font-size: clamp(65px, 9vw, 135px);
    line-height: 0.87;
    letter-spacing: -6px;
    margin-top: 30px;
}

.contact-description {
    color: var(--muted);
    margin-top: 40px;
    max-width: 420px;
    line-height: 1.7;
}

.email-link {
    display: inline-flex;
    gap: 25px;
    color: var(--accent);
    font-size: clamp(20px, 3vw, 35px);
    margin-top: 30px;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 8px;
}

.social-links {
    display: flex;
    gap: 25px;
    margin-top: 70px;
}

.social-links a {
    color: var(--muted);
    font-size: 13px;
}

.social-links a:hover {
    color: var(--text);
}


/* FOOTER */

footer {
    width: min(100% - 48px, var(--max-width));
    margin: auto;
    padding: 25px 0;
    border-top: 1px solid var(--line);

    display: flex;
    justify-content: space-between;

    color: #666;
    font-size: 11px;
}


/* TOP BUTTON */

.top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;

    width: 45px;
    height: 45px;

    border: 1px solid var(--line);
    background: var(--surface);
    color: white;

    cursor: pointer;

    opacity: 0;
    pointer-events: none;

    transition: 0.3s;

    z-index: 20;
}

.top-btn.show {
    opacity: 1;
    pointer-events: auto;
}


/* REVEAL ANIMATION */

.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .nav-links {
        position: fixed;
        inset: 0;
        background: var(--bg);

        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 30px;

        transform: translateY(-100%);
        transition: 0.5s;

        z-index: 55;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 28px;
        color: var(--text);
    }

    .nav-cv {
        display: none;
    }

    .menu-btn {
        display: block;
        z-index: 60;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 60px;
    }

    .hero-visual {
        height: 400px;
    }

    .scroll-text {
        display: none;
    }

    .section-heading {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-photo {
        max-width: 500px;
    }

    .project-details {
        grid-template-columns: 1fr 1fr;
    }

    .project-description {
        grid-column: span 2;
    }

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

    .experiment {
        min-height: 300px;
    }

    .cv-section {
        flex-direction: column;
        align-items: flex-start;
    }
}


@media (max-width: 600px) {

    .navbar,
    .hero,
    .section,
    .cv-section,
    .contact-inner,
    footer {
        width: min(100% - 32px, var(--max-width));
    }

    .navbar {
        height: 70px;
    }

    .hero {
        min-height: calc(100vh - 70px);
        padding-top: 35px;
    }

    .hero h1 {
        font-size: clamp(52px, 16vw, 80px);
        letter-spacing: -4px;
    }

    .hero-description {
        font-size: 14px;
        margin-top: 28px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: space-between;
    }

    .hero-visual {
        height: 350px;
    }

    .profile-card {
        width: 230px;
    }

    .orbit-one {
        width: 300px;
        height: 300px;
    }

    .orbit-two {
        width: 350px;
        height: 200px;
    }

    .section {
        padding: 100px 0;
    }

    .section-heading {
        margin-bottom: 50px;
    }

    .section-heading h2 {
        font-size: 48px;
        letter-spacing: -3px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .project-details {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-description {
        grid-column: auto;
    }

    .project h3 {
        font-size: 30px;
    }

    .project-simple {
        min-height: 400px;
        padding: 30px;
    }

    .service {
        grid-template-columns: 40px 1fr;
        gap: 15px;
    }

    .service h3 {
        font-size: 22px;
    }

    .service p {
        grid-column: 2;
    }

    .tech-items span {
        padding: 11px 13px;
    }

    .timeline-item {
        grid-template-columns: 70px 1fr;
        gap: 15px;
    }

    .timeline-item h3 {
        font-size: 20px;
    }

    .cv-section {
        padding: 35px 25px;
        margin-bottom: 100px;
    }

    .cv-section h2 {
        font-size: 43px;
    }

    .contact-section {
        min-height: 75vh;
    }

    .contact-section h2 {
        font-size: 60px;
        letter-spacing: -4px;
    }

    .email-link {
        font-size: 18px;
        word-break: break-all;
    }

    .social-links {
        flex-wrap: wrap;
        margin-top: 50px;
    }

    footer {
        flex-direction: column;
        gap: 8px;
    }

    .cursor-glow {
        display: none;
    }

}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}


/* =========================================
   PROJECT EXPLORE BUTTON
========================================= */

.explore-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 20px;

    border: 1px solid var(--accent);
    border-radius: 50px;

    background: rgba(53, 208, 127, 0.08);
    color: var(--accent);

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.3s ease;
}

.explore-project:hover {
    background: var(--accent);
    color: #111;
    transform: translateY(-2px);
}

.project-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.55);

    opacity: 0;
    transition: .3s ease;
}

.project-image:hover .project-overlay {
    opacity: 1;
}


/* =========================================
   PYTHON PROJECT BUTTON
========================================= */

.project-button {
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-top: 20px;
}


/* =========================================
   PROJECT MODAL
========================================= */

.project-modal {

    position: fixed;

    inset: 0;

    background: rgba(10, 10, 10, 0.82);

    backdrop-filter: blur(10px);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px;

    z-index: 9999;

    opacity: 0;

    visibility: hidden;

    transition: .3s ease;
}


.project-modal.active {

    opacity: 1;

    visibility: visible;

}


/* =========================================
   MODAL BOX
========================================= */

.project-modal-box {

    width: min(1000px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    background: var(--surface, #ffffff);

    border-radius: 24px;

    position: relative;

    transform: translateY(30px) scale(.97);

    transition: .3s ease;

}


.project-modal.active .project-modal-box {

    transform: translateY(0) scale(1);

}


/* =========================================
   CLOSE BUTTON
========================================= */

.modal-close {

    position: absolute;

    right: 20px;

    top: 20px;

    width: 42px;

    height: 42px;

    border-radius: 50%;

    border: 1px solid rgba(255, 255, 255, .3);

    background: rgba(0, 0, 0, .55);

    color: white;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;

    z-index: 5;

}


/* =========================================
   MODAL IMAGE
========================================= */

.modal-image {

    width: 100%;

    background: #111;

    overflow: hidden;

}


.modal-image img {

    width: 100%;

    max-height: 550px;

    display: block;

    object-fit: contain;

}


/* =========================================
   MODAL CONTENT
========================================= */

.modal-content {

    padding: 40px;

}


.modal-label {

    font-size: 12px;

    letter-spacing: 2px;

    opacity: .5;

}


.modal-content h2 {

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(2rem, 5vw, 4rem);

    margin: 10px 0 5px;

}


.modal-type {

    opacity: .5;

    margin-bottom: 25px;

}


.modal-description {

    max-width: 700px;

    line-height: 1.8;

    opacity: .7;

    margin-bottom: 30px;

}


/* =========================================
   MODAL TECHNOLOGIES
========================================= */

.modal-tech-title {

    font-size: 12px;

    letter-spacing: 1.5px;

    opacity: .5;

}


.modal-tech-list {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 12px;

}


.modal-tech-list span {

    padding: 8px 13px;

    border: 1px solid rgba(0, 0, 0, .15);

    border-radius: 50px;

    font-size: 13px;

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .project-modal {

        padding: 15px;

    }

    .project-modal-box {

        max-height: 92vh;

        border-radius: 18px;

    }

    .modal-content {

        padding: 25px;

    }

    .modal-image img {

        max-height: 350px;

    }

}
