:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --parper: #fafafa;
    --line: #e6e6e6;
    --grey: #8a8a8a;
    --grey-dark: #4a4a4a;
    --maxw: 1180px;
    --ease: cubic-bezier(.16, .84, .44, 1);
}

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

html{
    scroll-behavior: smooth;
}

body{
    background: var(--white); 
    color: var(--black);
    font-family: 'Inter', sans-serif; 
    font-size: 16px; 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;

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

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

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 40px;
}

::selection {
    background: var(--black);
    color: var(--white);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 3px;
}

.serif {
    font-family: 'Instrument Serif', serif;
}

.serif-i {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
}

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

.eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 18px;
}

/* NAV */

header.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 26px 0;
    transition: padding .3s ease, border-color .3s ease, background .3s ease;
    background: rgba(255,255, 255, 0);
}

header.nav.scrolled {
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-name {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 22px;
}

.nav-links {
    display: flex;
    gap: 34px;
    font-size: 14px;
    color: var(--grey-dark);
}

.nav-links a {
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width .3s var(--ease);
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

@media (max-width:760px) {
    .nav-links {
        position: fixed;
        inset: 60px 0 0 0;
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        gap: 26px;
        font-size: 19px;
        transform: translateX(100%);
        transition: transform .35s var(--ease);
        border-top: 1px solid var(--line);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
    }
}

/* HERO */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
}

.hero-name {
    font-size: clamp(3rem, 9vw, 7.5rem);
    line-height: 0.98;
    letter-spacing: -0.01rem;
}

.hero-line {
    margin-top: 26px;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    max-width: 34ch;
    color: var(--grey-dark);
    line-height: 1.5;
}

.hero-foot {
    margin-top: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--grey);
    font-size: 13px;
}

.hero-foot .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3fae5c;
}

.scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--grey);
    font-family: 'IBM Plex Mono', monospace;
}

.scroll-cue .line {
    width: 34px;
    height: 1px;
    background: var(--line);
    position: relative;
    overflow: hidden;
}

.scroll-cue .line::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--black);
    animation: cue 2.6s ease-in-out infinite;
}

@keyframes cue {

    0% {
        left: -100%;
    }

    50% {
        left: 0%;
    }

    100% {
        left: 100%;
    }
}

.reveal {
    opacity: 0;
    transition: opacity 1s var(--ease), transform 1s var(--ease);
    transform: translateY(32px);
}

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

.reveal-img {
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1.1s var(--ease), transform 1.3s var(--ease);
}

.reveal-img.in {
    opacity: 1;
    transform: scale(1);
}

/* SECTION BASICS */
section {
    padding: 130px 0;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 64px;
}

.section-label .n {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--grey);
}

.section-label .l {
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* WORK */
.case {
    border-top: 1px solid var(--line);
    padding: 70px 0;
}

.case:last-child {
    border-bottom: 1px solid var(--line);
}

.case-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.case-title {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.case-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    letter-spacing: .06em;
    padding: 7px 14px;
    border: 1px solid var(--black);
    border-radius: 100px;
    white-space: nowrap;
}

.case-tag.real {
    background: var(--black);
    color: var(--white);
}

.case-body {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: start;
}

.case-body.reverse {
    direction: rtl;
}

.case-body.reverse>* {
    direction: ltr;
}

.case-media img {
    border-radius: 2px;
    width: 100%;
    border: 1px solid var(--line);
}

.case-text p {
    color: var(--grey-dark);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.case-text .role {
    font-size: 13px;
    color: var(--grey);
    margin-bottom: 20px;
}

.case-text .role strong {
    color: var(--black);
}

.iter-strip {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.iter-strip img {
    flex: 1;
    min-width: 0;
    border-radius: 2px;
    border: 1px solid var(--line);
    opacity: .85;
    transition: opacity .3s ease;
}

.iter-strip img:hover {
    opacity: 1;
}

.iter-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--grey);
    margin-top: 10px;
}

@media (max-width: 860px) {

    .case-body,
    .case-body.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}

/* ABOUT */
.about {
    background: var(--parper);
}

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

.about h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    max-width: 14ch;
    line-height: 1.15;
}

.about-copy p {
    font-size: 15.5px;
    color: var(--grey-dark);
    margin-bottom: 18px;
    max-width: 52ch;
    line-height: 1.75;
}

.skills-col h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 16px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 36px;
}

.skill-chip {
    font-size: 13px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--grey-dark);
}

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

/* CONTACT */
.contact {
    text-align: center;
}

.contact h2 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    margin-bottom: 30px;
}

.contact-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14.5px;
    border: 1px solid var(--black);
    transition: all .3s var(--ease);
}

.btn-fill {
    background: var(--black);
    color: var(--white);
}

.btn-fill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.btn-outline {
    color: var(--black);
}

.btn-outline:hover {
    background: var(--black);
    color: var(--white);
}

footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--grey);
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 640px) {
    section {
        padding: 90px 0;
    }

    .wrap {
        padding: 24px;
    }

    .nav-inner {
        padding: 0 24px;
    }

    .scroll-cue {
        left: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;

        .reveal,
        .reveal-img {
            opacity: 1;
            transform: none;
        }
    }
}