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

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: #f5f5f5;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

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

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


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

:root {
    --background: #0a0a0a;
    --surface: #111111;
    --surface-light: #181818;

    --text: #f5f5f5;
    --text-secondary: #888888;
    --text-muted: #555555;

    --border: rgba(255, 255, 255, 0.12);

    --accent: #ffffff;

    --container: 1400px;

    --section-padding: 150px;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --mouse-x: 75%;
    --mouse-y: 30%;
}


/* =========================================================
   GLOBAL
========================================================= */

body::selection {
    background: #f5f5f5;
    color: #0a0a0a;
}

.section {
    width: min(var(--container), calc(100% - 80px));
    margin: 0 auto;
    padding: var(--section-padding) 0;
}

.section-number {
    display: block;

    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;

    margin-bottom: 18px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    padding-bottom: 50px;

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

.section-header h2 {
    font-size: clamp(48px, 6vw, 90px);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 0.95;
}

.section-header > p {
    max-width: 330px;

    color: var(--text-secondary);

    font-size: 15px;
    line-height: 1.7;
}


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

.header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    height: 90px;

    padding: 0 40px;

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

    z-index: 1000;

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

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);

    transition:
        height 0.45s var(--ease-out-expo),
        background 0.45s ease,
        box-shadow 0.45s ease;
}

.header.is-scrolled {
    height: 72px;
    background: rgba(10, 10, 10, 0.9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.8);
    transform: scaleX(var(--scroll-progress, 0));
    transform-origin: left;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.04em;
}

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

.nav {
    display: flex;
    gap: 35px;
}

.nav a {
    position: relative;

    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 500;

    transition: color 0.3s ease;
}

.nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -5px;

    width: 0;
    height: 1px;

    background: var(--text);

    transition: width 0.3s ease;
}

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

.nav a:hover::after {
    width: 100%;
}

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

.nav a.is-active::after {
    width: 100%;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    font-weight: 500;

    transition: opacity 0.3s ease;
}

.header-contact span {
    font-size: 16px;

    transition: transform 0.3s ease;
}

.header-contact:hover {
    opacity: 0.6;
}

.header-contact:hover span {
    transform: translate(3px, -3px);
}


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

.hero {
    position: relative;

    min-height: 100vh;

    padding: 180px 40px 50px;

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

    overflow: hidden;
}


/* subtle background */

.hero::before {
    content: "";

    position: absolute;

    left: var(--mouse-x);
    top: var(--mouse-y);

    width: 500px;
    height: 500px;

    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0) 70%
    );

    pointer-events: none;

    transform: translate(-50%, -50%);
    transition: left 0.9s var(--ease-out-expo), top 0.9s var(--ease-out-expo);
}


/* grid */

.hero::after {
    content: "";

    position: absolute;

    inset: 0;

    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,
        transparent 85%
    );

    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;

    max-width: 1200px;

    margin-top: auto;
    margin-bottom: auto;
}

.hero-label {
    margin-bottom: 30px;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 500;

    letter-spacing: 0.18em;
}

.hero h1 {
    max-width: 1100px;

    font-size: clamp(58px, 9vw, 145px);
    font-weight: 500;

    letter-spacing: -0.075em;
    line-height: 0.88;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(110deg, #777 18%, #fff 45%, #777 72%);
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: title-shimmer 5s ease-in-out 1.4s infinite;
}

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

    margin-top: 45px;

    color: var(--text-secondary);

    font-size: 17px;
    line-height: 1.7;
}

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

    margin-top: 35px;
}

.button {
    min-height: 52px;

    padding: 0 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    font-size: 13px;
    font-weight: 500;

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

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.button-primary {
    background: var(--text);
    color: var(--background);

    border-color: var(--text);
}

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

.button-primary span {
    font-size: 17px;

    transition: transform 0.3s ease;
}

.button-primary:hover span {
    transform: translate(3px, -3px);
}

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

.button-secondary:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-bottom {
    position: relative;
    z-index: 1;

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

    color: var(--text-muted);

    font-size: 10px;
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 70px;
    height: 1px;

    background: var(--text-muted);

    transform-origin: left;
    animation: scroll-line 2.2s var(--ease-out-expo) infinite;
}

.hero-bottom > span:last-child {
    animation: scroll-arrow 1.6s ease-in-out infinite;
}

@keyframes title-shimmer {
    0%, 24% { background-position: 100% 50%; }
    55%, 100% { background-position: -100% 50%; }
}

@keyframes scroll-line {
    0% { transform: scaleX(0); transform-origin: left; }
    45% { transform: scaleX(1); transform-origin: left; }
    55% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes scroll-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}


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

.projects {
    padding-top: 120px;
}

.projects-list {
    display: flex;
    flex-direction: column;
}

.project {
    display: grid;
    grid-template-columns: 1.35fr 1fr;

    min-height: 500px;

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

    transition: background 0.4s ease;

    isolation: isolate;
}

.project:first-child {
    border-top: none;
}

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

    padding: 30px;

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

    background: #111111;

    overflow: hidden;

    position: relative;
    perspective: 1200px;
}

.project-image {
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 0.8s var(--ease-out-expo), filter 0.8s ease;
}

.project:hover .project-image img {
    transform: scale(1.06) translate3d(var(--image-x, 0), var(--image-y, 0), 0);
    filter: saturate(1.08) contrast(1.03);
}

.project-image::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    transform: translateX(-80%) rotate(8deg);
    transition: transform 1s var(--ease-out-expo);
    pointer-events: none;
}

.project:hover .project-image::after {
    transform: translateX(80%) rotate(8deg);
}

.project:hover .project-placeholder {
    transform: scale(1.03);
    color: rgba(255, 255, 255, 0.7);
}

.project-info {
    padding: 55px 50px;

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

.project-number {
    color: var(--text-muted);

    font-size: 11px;
    letter-spacing: 0.15em;
}

.project-info h3 {
    margin-top: 15px;

    font-size: clamp(28px, 3vw, 48px);
    font-weight: 500;

    letter-spacing: -0.05em;
}

.project-info > div:first-child p {
    max-width: 400px;

    margin-top: 20px;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.7;
}

.project-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tags span {
    padding: 7px 10px;

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

    color: var(--text-secondary);

    font-size: 10px;
    letter-spacing: 0.04em;

    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.project:hover .tags span {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.project-link {
    white-space: nowrap;

    font-size: 12px;

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

    padding-bottom: 4px;

    transition: opacity 0.3s ease;
}

.project-link:hover {
    opacity: 0.5;
}


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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 100px;

    padding-top: 90px;
}

.about-title p {
    color: var(--text-secondary);

    font-size: 14px;
}

.about-title h2 {
    margin-top: 15px;

    font-size: clamp(60px, 8vw, 120px);
    font-weight: 500;

    letter-spacing: -0.08em;
    line-height: 0.85;
}

.about-text {
    max-width: 550px;

    padding-top: 15px;
}

.about-text p {
    margin-bottom: 30px;

    color: var(--text-secondary);

    font-size: 18px;
    line-height: 1.8;
}

.about-text p:first-child {
    color: var(--text);
}


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

.services-list {
    margin-top: 30px;
}

.service {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;

    gap: 30px;

    padding: 35px 0;

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

    transition: padding 0.4s ease;

    position: relative;
    isolation: isolate;
}

.service::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--surface);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.45s var(--ease-out-expo);
    z-index: -1;
}

.service:first-child {
    border-top: 1px solid var(--border);
}

.service > span:first-child {
    color: var(--text-muted);

    font-size: 11px;
}

.service h3 {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 500;

    letter-spacing: -0.04em;
}

.service p {
    max-width: 450px;

    margin-top: 7px;

    color: var(--text-secondary);

    font-size: 14px;
}

.service-arrow {
    color: var(--text-secondary);

    font-size: 20px;

    text-align: right;

    transition:
        transform 0.4s ease,
        color 0.4s ease;
}

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

.service:hover::before {
    transform: scaleY(1);
}

.service:hover .service-arrow {
    color: var(--text);
    transform: translate(5px, -5px);
}


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

.contact {
    min-height: 80vh;

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

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

.contact-label {
    margin-top: 30px;

    color: var(--text-secondary);

    font-size: 12px;
    letter-spacing: 0.15em;
}

.contact h2 {
    max-width: 1000px;

    margin-top: 25px;

    font-size: clamp(60px, 9vw, 140px);
    font-weight: 500;

    letter-spacing: -0.08em;
    line-height: 0.85;
}

.contact h2 span {
    color: var(--text-secondary);
}

.contact-description {
    max-width: 500px;

    margin-top: 40px;

    color: var(--text-secondary);

    font-size: 16px;
    line-height: 1.7;
}

.contact-button {
    margin-top: 40px;

    padding: 18px 25px;

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

    background: var(--text);
    color: var(--background);

    font-size: 13px;
    font-weight: 500;

    transition: transform 0.3s ease;
}

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

.contact-button span {
    font-size: 18px;

    transition: transform 0.35s var(--ease-out-expo);
}

.contact-button:hover span {
    transform: translate(4px, -4px);
}


/* =========================================================
   MOTION SYSTEM
========================================================= */

.js .hero-reveal {
    opacity: 0;
    transform: translateY(42px);
    filter: blur(8px);
}

.js .hero-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition:
        opacity 0.9s var(--ease-out-expo) var(--delay, 0ms),
        transform 1.1s var(--ease-out-expo) var(--delay, 0ms),
        filter 0.9s ease var(--delay, 0ms);
}

.js .scroll-reveal {
    opacity: 0;
    transform: translateY(58px);
    filter: blur(7px);
    transition:
        opacity 0.8s var(--ease-out-expo) var(--delay, 0ms),
        transform 1s var(--ease-out-expo) var(--delay, 0ms),
        filter 0.8s ease var(--delay, 0ms);
}

.js .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.js .project.scroll-reveal {
    transform: translateY(70px) scale(0.985);
}

.js .project.scroll-reveal.is-visible {
    transform: translateY(0) scale(1);
}

.ambient-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.035), transparent 68%);
    transform: translate3d(calc(var(--cursor-x, -500px) - 50%), calc(var(--cursor-y, -500px) - 50%), 0);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

main,
.footer {
    position: relative;
    z-index: 1;
}


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

.footer {
    width: min(var(--container), calc(100% - 80px));

    margin: 0 auto;

    padding: 35px 0;

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

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

.footer-logo {
    font-size: 17px;
    font-weight: 600;
}

.footer-logo span {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a,
.footer p {
    color: var(--text-muted);

    font-size: 11px;

    transition: color 0.3s ease;
}

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

.footer p {
    text-align: right;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 900px) {

    :root {
        --section-padding: 110px;
    }

    .header {
        padding: 0 25px;
    }

    .nav {
        gap: 20px;
    }

    .header-contact {
        display: none;
    }

    .hero {
        padding-left: 25px;
        padding-right: 25px;
    }

    .section {
        width: min(100% - 50px, var(--container));
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 30px;
    }

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

    .project-image {
        min-height: 450px;
    }

    .project-info {
        min-height: 400px;
    }

    .about-content {
        grid-template-columns: 1fr;

        gap: 60px;
    }

    .about-text {
        max-width: 700px;
    }

    .footer {
        width: calc(100% - 50px);
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 600px) {

    :root {
        --section-padding: 90px;
    }


    /* HEADER */

    .header {
        height: 70px;

        padding: 0 20px;
    }

    .header.is-scrolled {
        height: 62px;
    }

    .logo {
        font-size: 18px;
    }

    .nav {
        gap: 14px;
    }

    .nav a {
        font-size: 11px;
    }


    /* HERO */

    .hero {
        min-height: 100svh;

        padding: 130px 20px 30px;
    }

    .hero-label {
        margin-bottom: 25px;

        font-size: 10px;
    }

    .hero h1 {
        font-size: clamp(52px, 16vw, 90px);

        line-height: 0.9;
    }

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

        margin-top: 30px;

        font-size: 14px;
    }

    .hero-buttons {
        width: 100%;

        flex-direction: column;

        margin-top: 30px;
    }

    .button {
        width: 100%;
    }

    .hero-bottom {
        font-size: 8px;
    }

    .scroll-line {
        width: 40px;
    }


    /* SECTIONS */

    .section {
        width: calc(100% - 40px);
    }

    .section-header {
        padding-bottom: 35px;
    }

    .section-header h2 {
        font-size: 52px;
    }

    .section-header > p {
        font-size: 13px;
    }


    /* PROJECTS */

    .project-image {
        min-height: 300px;

        padding: 15px;
    }

    .project-info {
        min-height: 420px;

        padding: 35px 0;
    }

    .project-info h3 {
        font-size: 34px;
    }

    .project-info > div:first-child p {
        font-size: 13px;
    }

    .project-footer {
        align-items: flex-start;

        flex-direction: column;
    }

    .project-link {
        margin-top: 10px;
    }


    /* ABOUT */

    .about-content {
        padding-top: 55px;

        gap: 50px;
    }

    .about-title h2 {
        font-size: 75px;
    }

    .about-text p {
        font-size: 15px;

        line-height: 1.7;
    }


    /* SERVICES */

    .service {
        grid-template-columns: 35px 1fr 25px;

        gap: 12px;

        padding: 25px 0;
    }

    .service:hover {
        padding-left: 0;
        padding-right: 0;
    }

    .ambient-glow {
        display: none;
    }

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

    .service p {
        font-size: 12px;

        line-height: 1.6;
    }

    .service-arrow {
        font-size: 17px;
    }


    /* CONTACT */

    .contact {
        min-height: 70vh;
    }

    .contact h2 {
        font-size: clamp(55px, 15vw, 85px);
    }

    .contact-description {
        font-size: 14px;
    }


    /* FOOTER */

    .footer {
        width: calc(100% - 40px);

        grid-template-columns: 1fr;

        gap: 25px;
    }

    .footer-links {
        order: 2;
    }

    .footer p {
        order: 3;

        text-align: left;
    }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

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

    html {
        scroll-behavior: auto;
    }

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

    .js .hero-reveal,
    .js .scroll-reveal,
    .js .project.scroll-reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .ambient-glow {
        display: none;
    }

}
