* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #0b0b0b;
    color: #f4f4f4;
    font-family: Arial, Helvetica, sans-serif;
}

body.intro-running {
    overflow: hidden;
}

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

/* =========================================================
   INTRO
========================================================= */

#portfolio-intro {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #080808;
    z-index: 99999;
    overflow: hidden;
    color: white;
}

.intro-progress {
    position: absolute;
    left: 28px;
    bottom: 24px;
    z-index: 30;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.intro-grid {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 8px;
    padding: 8px;
    transform-origin: center center;
    will-change: transform;
}

.intro-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    will-change: transform;
}

.intro-item {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #151515;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 14px;
    font-size: 10px;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.12),
            rgba(255,255,255,0.02)
        );
    transform: scale(1.08);
    will-change: transform;
}

.intro-item:nth-child(2) .project-placeholder {
    background:
        linear-gradient(
            45deg,
            rgba(255,255,255,0.05),
            rgba(255,255,255,0.14)
        );
}

.intro-name {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

.intro-name-mask {
    overflow: hidden;
}

.intro-name h1 {
    margin: 0;
    font-size: clamp(56px, 9vw, 150px);
    font-weight: 500;
    line-height: 0.82;
    letter-spacing: -0.055em;
    transform: translateY(120%);
}

.intro-role-mask {
    margin-top: 26px;
    overflow: hidden;
}

.intro-role-mask p {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.24em;
    transform: translateY(150%);
}

/* =========================================================
   MAIN WEBSITE
========================================================= */

#website {
    position: relative;
    min-height: 100vh;
    background: #0b0b0b;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 7vw;
}

.hero-inner {
    max-width: 1250px;
}

.eyebrow,
.section-heading > p {
    margin: 0 0 24px;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: #9b9b9b;
}

.hero h2 {
    margin: 0;
    max-width: 1100px;
    font-size: clamp(48px, 7vw, 110px);
    font-weight: 500;
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero h2 span {
    color: #777;
}

.hero-copy {
    max-width: 650px;
    margin-top: 38px;
    font-size: 18px;
    line-height: 1.65;
    color: #b8b8b8;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 38px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid #2f2f2f;
    font-size: 13px;
    letter-spacing: 0.05em;
    transition: 0.25s ease;
}

.button-primary {
    background: #f4f4f4;
    color: #0b0b0b;
}

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

.button-secondary:hover {
    border-color: #777;
    transform: translateY(-2px);
}

.section {
    padding: 120px 7vw;
    border-top: 1px solid #242424;
}

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

.section-heading h3,
.contact-section h3 {
    margin: 0;
    font-size: clamp(42px, 6vw, 86px);
    font-weight: 500;
    letter-spacing: -0.05em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    min-height: 360px;
    padding: 28px;
    border: 1px solid #272727;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #505050;
    background: #111;
}

.project-number {
    color: #767676;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.project-card h4 {
    margin: auto 0 18px;
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.project-card p {
    margin: 0;
    color: #aaa;
    line-height: 1.65;
}

.project-tech {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #262626;
    color: #737373;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.about-copy {
    max-width: 850px;
}

.about-copy p {
    margin: 0;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.35;
    letter-spacing: -0.025em;
    color: #c9c9c9;
}

.contact-section {
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-link {
    margin-top: 36px;
    width: fit-content;
    font-size: clamp(22px, 3vw, 42px);
    color: #8e8e8e;
    border-bottom: 1px solid #444;
    transition: 0.25s ease;
}

.contact-link:hover {
    color: white;
    border-bottom-color: white;
}

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

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .intro-grid {
        gap: 5px;
        padding: 5px;
    }

    .intro-column {
        gap: 5px;
    }

    .col-4,
    .col-5 {
        display: none;
    }

    .intro-name h1 {
        font-size: 16vw;
    }

    .intro-role-mask p {
        font-size: 8px;
        letter-spacing: 0.18em;
    }

    .hero,
    .section {
        padding-left: 22px;
        padding-right: 22px;
    }

    .hero {
        min-height: 92vh;
    }

    .hero-copy {
        font-size: 16px;
    }

    .section {
        padding-top: 90px;
        padding-bottom: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    #portfolio-intro {
        display: none !important;
    }

    body.intro-running {
        overflow: auto;
    }
}
