@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@400;500;600;700;800&display=swap');


/* =========================================================
   RESET
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #090909;
    color: #f1f1ef;
    font-family: "Manrope", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --background: #090909;
    --surface: #101010;
    --surface-light: #151515;

    --text: #f1f1ef;
    --muted: #898989;
    --dim: #555555;

    --border: #242424;
    --border-light: #303030;

    --accent: #d7ff4f;

    --max-width: 1240px;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.background-grid {
    position: fixed;
    inset: 0;
    z-index: -3;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 80px 80px;

    mask-image: linear-gradient(
        to bottom,
        black 0%,
        transparent 75%
    );
}

.noise {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.035;

    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='.5'/%3E%3C/svg%3E");
}


/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    width: min(var(--max-width), calc(100% - 64px));
    height: 90px;

    margin: auto;

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

    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

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

.navbar nav {
    display: flex;
    gap: 34px;
}

.navbar nav a {
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    transition:
        color 0.25s ease;
}

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


/* =========================================================
   GENERAL
   ========================================================= */

main {
    width: min(var(--max-width), calc(100% - 64px));
    margin: auto;
}

.eyebrow,
.section-number,
.project-type,
.project-status,
.status,
.tech-stack,
.detail span {
    font-family: "DM Mono", monospace;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

.section-number {
    color: var(--dim);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

h1,
h2,
h3 {
    line-height: 0.95;
    letter-spacing: -0.055em;
}

h1 span,
h2 span {
    color: var(--muted);
}


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

.hero {
    min-height: calc(100vh - 90px);

    display: grid;
    grid-template-columns: 1fr 260px;
    align-items: center;

    padding: 90px 0 110px;

    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 850px;
}

.hero h1 {
    margin-top: 26px;

    font-size: clamp(4rem, 8.5vw, 8.5rem);
    font-weight: 700;
}

.hero-description {
    max-width: 590px;

    margin-top: 38px;

    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 12px;

    margin-top: 38px;
}

.button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    gap: 16px;

    padding: 0 20px;

    font-family: "DM Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.03em;

    border: 1px solid var(--border-light);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent);
    color: #080808;
    border-color: var(--accent);
}

.button-primary:hover {
    background: #e2ff72;
}

.button-secondary {
    color: var(--muted);
}

.button-secondary:hover {
    color: var(--text);
    border-color: #444;
}

.hero-side {
    height: 100%;

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

    padding: 30px 0 20px 40px;
}

.status {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--muted);

    font-size: 0.62rem;
    line-height: 1.4;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;

    display: block;

    background: var(--accent);
    border-radius: 50%;

    box-shadow: 0 0 12px rgba(215, 255, 79, 0.45);
}

.hero-mark {
    display: flex;
    flex-direction: column;
    align-items: flex-end;

    font-family: "DM Mono", monospace;
    color: var(--dim);

    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

.hero-mark span:last-child {
    margin-top: 5px;

    color: #2c2c2c;

    font-size: 2.4rem;
    font-weight: 500;
    letter-spacing: -0.08em;
}


/* =========================================================
   WORK SECTION
   ========================================================= */

.work-section {
    padding: 150px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 80px;

    margin-bottom: 80px;
}

.section-heading h2 {
    margin-top: 22px;

    font-size: clamp(3.5rem, 7vw, 6.5rem);
    font-weight: 700;
}

.section-intro {
    align-self: end;

    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
}


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

.project {
    position: relative;

    background: rgba(16, 16, 16, 0.65);

    border: 1px solid var(--border);

    transition:
        border-color 0.3s ease,
        transform 0.3s ease;
}

.project:hover {
    border-color: var(--border-light);
}

.project-number {
    position: absolute;
    top: 28px;
    right: 30px;

    color: var(--dim);

    font-family: "DM Mono", monospace;
    font-size: 0.65rem;
}

.project-content {
    position: relative;
    z-index: 2;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 26px;
}

.project-type {
    color: var(--muted);

    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

.project-status {
    color: var(--accent);

    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

.project h3 {
    font-size: 2.7rem;
    font-weight: 700;
}

.project p {
    max-width: 570px;

    margin-top: 20px;

    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.85;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 28px;
}

.tech-stack span {
    padding: 6px 9px;

    color: #777;
    background: #151515;

    border: 1px solid #242424;

    font-size: 0.58rem;
}

.project-links {
    margin-top: 35px;
}

.project-links a,
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: var(--text);

    font-family: "DM Mono", monospace;
    font-size: 0.68rem;

    border-bottom: 1px solid #444;

    padding-bottom: 5px;

    transition:
        color 0.25s ease,
        border-color 0.25s ease;
}

.project-links a:hover,
.contact-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}


/* =========================================================
   FEATURED PROJECT
   ========================================================= */

.featured-project {
    min-height: 500px;

    display: grid;
    grid-template-columns: 1fr 0.8fr;

    overflow: hidden;
}

.featured-project .project-content {
    padding: 60px;
}

.mathvault-visual {
    position: relative;

    min-height: 500px;

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

    border-left: 1px solid var(--border);

    overflow: hidden;
}

.mathvault-visual::before {
    content: "";

    position: absolute;
    width: 420px;
    height: 420px;

    border: 1px solid #202020;
    border-radius: 50%;
}

.mathvault-visual::after {
    content: "";

    position: absolute;
    width: 300px;
    height: 300px;

    border: 1px solid #1d1d1d;
    border-radius: 50%;
}

.visual-window {
    position: relative;
    z-index: 2;

    width: 72%;
    min-height: 280px;

    background: #0b0b0b;

    border: 1px solid #292929;

    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.window-top {
    height: 30px;

    display: flex;
    align-items: center;
    gap: 5px;

    padding-left: 12px;

    border-bottom: 1px solid #242424;
}

.window-top span {
    width: 5px;
    height: 5px;

    background: #343434;
    border-radius: 50%;
}

.visual-content {
    padding: 35px;
}

.visual-label {
    color: var(--accent);

    font-family: "DM Mono", monospace;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
}

.visual-title {
    margin-top: 30px;

    color: #ddd;

    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.visual-lines {
    margin-top: 30px;
}

.visual-lines i {
    display: block;

    width: 100%;
    height: 1px;

    margin-top: 10px;

    background: #292929;
}

.visual-lines i:nth-child(2) {
    width: 70%;
}

.visual-lines i:nth-child(3) {
    width: 85%;
}


/* =========================================================
   PROJECT GRID
   ========================================================= */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    margin-top: 20px;

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

.project-grid .project {
    min-height: 460px;

    padding: 55px;

    border-top: 0;
    border-left: 0;
}

.project-grid .project:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.project-grid .project:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
}


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

.about-section {
    padding: 150px 0;

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 120px;

    margin-top: 80px;
}

.about-main {
    max-width: 720px;
}

.large-text {
    color: var(--text) !important;

    font-size: clamp(1.7rem, 3vw, 2.7rem) !important;
    line-height: 1.35 !important;
    letter-spacing: -0.04em;
}

.about-main p + p {
    margin-top: 35px;

    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.9;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.detail {
    padding-top: 15px;

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

.detail span {
    color: var(--dim);

    font-size: 0.6rem;
    letter-spacing: 0.1em;
}

.detail p {
    margin-top: 14px;

    color: var(--muted);

    font-family: "DM Mono", monospace;
    font-size: 0.7rem;
    line-height: 1.8;
}

.detail a {
    transition: color 0.2s ease;
}

.detail a:hover {
    color: var(--accent);
}


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

.contact-section {
    padding: 150px 0;

    text-align: center;

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

.contact-section h2 {
    margin-top: 25px;

    font-size: clamp(4rem, 9vw, 8rem);
}

.contact-section > p:not(.section-number) {
    max-width: 450px;

    margin: 35px auto;

    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.contact-link {
    margin-top: 5px;
}


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

footer {
    width: min(var(--max-width), calc(100% - 64px));

    margin: auto;
    padding: 30px 0;

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

    color: var(--dim);

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

    font-family: "DM Mono", monospace;
    font-size: 0.6rem;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 100px 0;
    }

    .hero-side {
        height: auto;

        margin-top: 80px;
        padding: 0;

        flex-direction: row;
        align-items: center;
    }

    .hero-mark {
        align-items: flex-end;
    }

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

    .section-intro {
        max-width: 550px;
    }

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

    .mathvault-visual {
        min-height: 420px;

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

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

}


@media (max-width: 650px) {

    :root {
        --max-width: 100%;
    }

    .navbar,
    main,
    footer {
        width: calc(100% - 36px);
    }

    .navbar {
        height: 72px;
    }

    .navbar nav {
        gap: 17px;
    }

    .navbar nav a {
        font-size: 0.58rem;
    }

    .hero {
        padding: 85px 0 90px;
    }

    .hero h1 {
        font-size: clamp(3.5rem, 17vw, 6rem);
    }

    .hero-description {
        font-size: 0.86rem;
    }

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

    .button {
        justify-content: center;
    }

    .work-section,
    .about-section,
    .contact-section {
        padding: 100px 0;
    }

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

    .section-heading h2 {
        font-size: clamp(3.3rem, 16vw, 5rem);
    }

    .featured-project .project-content,
    .project-grid .project {
        padding: 38px 28px;
    }

    .featured-project {
        min-height: auto;
    }

    .mathvault-visual {
        min-height: 350px;
    }

    .visual-window {
        width: 78%;
    }

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

    .project-grid .project {
        min-height: auto;
    }

    .project-grid .project:nth-child(odd) {
        border-right: 0;
    }

    .project-grid .project:not(:last-child) {
        border-bottom: 1px solid var(--border);
    }

    .project h3 {
        font-size: 2.3rem;
    }

    .about-content {
        margin-top: 55px;
    }

    .contact-section h2 {
        font-size: clamp(3.5rem, 16vw, 6rem);
    }

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

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

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

    html {
        scroll-behavior: auto;
    }

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

}


/* =========================================================
   SCROLL REVEAL
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(25px);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

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


/* Stagger project cards */

.project-grid .project:nth-child(2) {
    transition-delay: 0.08s;
}

.project-grid .project:nth-child(3) {
    transition-delay: 0.16s;
}

.project-grid .project:nth-child(4) {
    transition-delay: 0.24s;
}


/* Active navigation */

.navbar nav a.active {
    color: var(--text);
}


/* MathVault visual transition */

.visual-window {
    transition:
        transform 0.15s ease-out;
}
