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

:root {
    --off-white: #F6F5F1;
    --ink: #1C1C1A;
    --muted: #888882;
    --border: #E0DED8;
}

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

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--off-white);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 5%;
    position: sticky;
    top: 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-name {
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-resume {
    color: var(--ink) !important;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
}

/* INTRO */
.intro {
    padding: 6rem 5% 5rem;
    max-width: 900px;
}

.intro h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.intro h1 em {
    font-style: italic;
    color: var(--muted);
}

.intro p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 580px;
    line-height: 1.7;
}

/* PROJECTS */
.projects {
    padding: 0 5% 6rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.project-row:hover { opacity: 0.85; }

.project-row.reverse .project-meta { order: 2; }
.project-row.reverse .project-visual { order: 1; }

/* META */
.tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 1rem;
}

.project-meta h2 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.project-meta p {
    font-size: 0.975rem;
    color: #555552;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.tech-stack {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.tech-stack li {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.tech-stack li:not(:last-child)::after {
    content: '—';
    margin-left: 0.75rem;
    color: var(--border);
    font-weight: 300;
}

/* VISUALS */
.project-visual {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-visual.dark-bg  { background: #111110; }
.project-visual.mid-bg   { background: #1E1F1B; }
.project-visual.phone-bg { background: #F0EEE9; }
.project-visual.warm-bg  { background: #2a1f15; }
.project-visual.img-visual { padding: 0; }

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
}

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



/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 4rem 5%;
    background: var(--off-white);
}

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

footer h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

footer p { color: var(--muted); font-size: 0.95rem; }

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* RESPONSIVE */
@media (max-width: 800px) {
    .project-row,
    .project-row.reverse .project-meta,
    .project-row.reverse .project-visual {
        grid-template-columns: 1fr;
        order: unset !important;
    }

    .project-row { gap: 2.5rem; }

    .intro h1 { font-size: 2.25rem; }

    .footer-inner { flex-direction: column; align-items: flex-start; gap: 2rem; }
    .footer-links { align-items: flex-start; }
}
