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

:root {
    --font-mono: 'Space Mono', 'Courier New', monospace;
    --color-text: #111;
    --nav-height: 72px;
    --page-padding: 80px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    color: var(--color-text);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: none;
}

body.loaded {
    opacity: 1;
}

body.page-home {
    background-color: #ffedbf;
}

body.page-about {
    background-color: #aad688;
}

body.page-work {
    background-color: #cbe4ff;
}

::selection {
    background: rgba(0, 0, 0, 0.12);
}

.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #111;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.25s ease;
    mix-blend-mode: multiply;
}

.cursor--hover {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.1);
}

.cursor--hidden {
    opacity: 0;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 var(--page-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar a {
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: opacity 0.2s ease;
}

.navbar a:hover {
    opacity: 0.4;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-text);
    transition: width 0.25s ease;
}

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

.main-text {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) var(--page-padding) 80px;
}

.btext {
    width: 80vw;
    max-width: 1100px;
    font-size: clamp(26px, 3.6vw, 52px);
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.pill {
    display: inline-flex;
    align-items: center;
    margin: 0 5px;
    vertical-align: middle;
    transform-origin: center bottom;
}

.pill img {
    height: 52px;
    width: auto;
    max-width: 84px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.38s ease;
    will-change: transform;
}

.pill:hover img {
    transform: scale(1.55) translateY(-6px) rotate(-5deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.resume-section {
    margin-top: 80px;
}

.resume-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    font-weight: 700;
    opacity: 0.4;
    margin-bottom: 12px;
    text-transform: uppercase;
}

#resume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid currentColor;
    padding-bottom: 3px;
    width: fit-content;
    transition: opacity 0.2s ease;
}

#resume:hover {
    opacity: 0.45;
}

#line {
    font-size: 12px;
    letter-spacing: 0.04em;
    opacity: 0.55;
    font-style: italic;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 32px var(--page-padding);
    border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.footer-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    font-weight: 700;
    opacity: 0.4;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.footer a {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    font-size: 13px;
    transition: opacity 0.2s ease;
}

.footer a:hover {
    opacity: 0.4;
}

.about {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 60px) var(--page-padding) 80px;
}

.about-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 80px;
    align-items: start;
    margin-bottom: 96px;
}

.about-heading {
    font-size: clamp(20px, 2.6vw, 38px);
    font-weight: 400;
    line-height: 1.6;
    max-width: 640px;
    padding-top: 8px;
}

.about-image img {
    width: 260px;
    height: 320px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: filter 0.4s ease;
}

.about-image img:hover {
    filter: saturate(1.1) contrast(1.04);
}

.about-section {
    margin-bottom: 72px;
}

.about-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0.4;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-block;
    padding: 7px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.22);
    border-radius: 999px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.22);
    cursor: default;
    transition: background 0.2s ease,
                border-color 0.2s ease,
                transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-tag:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
}

.js-demo {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.js-demo-caption {
    font-size: 11px;
    opacity: 0.38;
    margin-top: 5px;
    font-style: italic;
}

.project-intro {
    max-width: 820px;
    line-height: 1.7;
    margin-bottom: 22px;
    font-size: 14px;
    opacity: 0.8;
}

.projects-list {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    transition: padding-left 0.3s ease;
    cursor: default;
}

.project-item:hover {
    padding-left: 16px;
}

.project-main {
    max-width: 760px;
}

.project-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.project-summary {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 12px;
}

.project-proof {
    margin-left: 18px;
    margin-bottom: 14px;
}

.project-proof li {
    margin-bottom: 7px;
    font-size: 13px;
    line-height: 1.5;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.project-link {
    display: inline-flex;
    text-decoration: none;
    color: var(--color-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 1.5px solid currentColor;
    padding-bottom: 3px;
    transition: opacity 0.2s ease;
}

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

.project-tech {
    font-size: 12px;
    opacity: 0.45;
    letter-spacing: 0.04em;
    white-space: nowrap;
    align-self: flex-start;
    padding-top: 4px;
}

.work {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 60px) var(--page-padding) 80px;
}

.work-hero {
    margin-bottom: 86px;
    max-width: 980px;
}

.work-kicker {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.45;
    margin-bottom: 14px;
}

.work-title {
    font-size: clamp(28px, 4.2vw, 56px);
    line-height: 1.15;
    margin-bottom: 12px;
}

.work-org,
.work-dates {
    font-size: 14px;
    opacity: 0.75;
}

.work-dates {
    margin-top: 2px;
    margin-bottom: 16px;
}

.work-summary {
    max-width: 760px;
    line-height: 1.7;
    font-size: 15px;
}

.work-section {
    margin-bottom: 72px;
}

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

.work-card {
    border: 1.5px solid rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.36);
    padding: 18px;
    min-height: 140px;
}

.work-card h2 {
    font-size: 16px;
    margin-bottom: 10px;
}

.work-card p {
    font-size: 13px;
    line-height: 1.6;
}

.timeline {
    border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.16);
}

.timeline-date {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.timeline-text {
    font-size: 14px;
    line-height: 1.6;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-stagger.visible > *:nth-child(1)  { transition-delay: 0.00s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(2)  { transition-delay: 0.05s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(3)  { transition-delay: 0.10s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(4)  { transition-delay: 0.15s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(5)  { transition-delay: 0.20s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(6)  { transition-delay: 0.25s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(7)  { transition-delay: 0.30s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(8)  { transition-delay: 0.35s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(9)  { transition-delay: 0.40s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 0.45s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(11) { transition-delay: 0.50s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(12) { transition-delay: 0.55s; opacity: 1; transform: none; }

@media (max-width: 900px) {
    :root {
        --page-padding: 40px;
    }

    .about-header {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 64px;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        width: 180px;
        height: 220px;
    }

    .work-pillars {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 600px) {
    :root {
        --page-padding: 24px;
        --nav-height: 60px;
    }

    body {
        cursor: auto;
    }

    .cursor {
        display: none;
    }

    .btext {
        width: 100%;
        font-size: clamp(22px, 5.5vw, 30px);
        line-height: 1.6;
    }

    .pill img {
        height: 36px;
    }

    .navbar a {
        font-size: 11px;
        letter-spacing: 0.04em;
    }

    .nav-links {
        gap: 16px;
    }

    .about-heading {
        font-size: clamp(18px, 4.5vw, 26px);
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .footer-right {
        align-items: flex-start;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .project-tech {
        padding-top: 0;
        white-space: normal;
    }
}
