/* ── Color Tokens ── */
:root {
    --bg: #fafafa;
    --text: #111;
    --text-muted: #555;
    --text-faint: #777;
    --text-label: #999;
    --border: #ddd;
    --border-strong: #111;
    --input-border: #ccc;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111;
        --text: #f0f0f0;
        --text-muted: #aaa;
        --text-faint: #888;
        --text-label: #777;
        --border: #333;
        --border-strong: #eee;
        --input-border: #444;
    }
}

/* ── Global Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ── Page Content Wrapper ── */
#page-content {
    position: relative;
    height: 100vh;
    overflow-y: auto;
    z-index: 1;
    transition: opacity 0.18s ease;
}

/* ── Landing Page (scoped to .page-home) ── */
.page-home {
    display: flex;
    flex-direction: column;
}

.page-home #fluid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-home nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    padding: 2rem 3rem;
    pointer-events: none;
}
.page-home nav .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}
.page-home nav a {
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}
.page-home nav a:hover { opacity: 0.5; }
.page-home .nav-links { display: flex; gap: 2rem; }
.page-home .nav-links a { opacity: 0.5; }
.page-home .nav-links a:hover { opacity: 1; }

.page-home main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    pointer-events: none;
    z-index: 10;
}

.page-home h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-align: center;
    color: transparent;
    user-select: none;
}

.page-home .cta-row {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}
.page-home .cta-row a {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.3s ease, opacity 0.3s ease;
    pointer-events: auto;
}
.page-home .cta-row a:hover {
    border-bottom-color: var(--text);
}

.page-home .footer-anchor {
    position: fixed;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    z-index: 50;
    pointer-events: none;
}
.page-home .footer-anchor a {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text);
    opacity: 0.2;
    text-decoration: none;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}
.page-home .footer-anchor a:hover { opacity: 0.8; }

@media (max-width: 640px) {
    .page-home nav { padding: 1.5rem; }
    .page-home .nav-links { gap: 1.2rem; }
    .page-home .cta-row { gap: 1.5rem; }
}

/* ── Subpages (work, about, contact) ── */
.subpage nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    padding: 2.5rem 4rem;
}
.subpage .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}
.subpage nav a {
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.subpage nav a:hover { opacity: 0.5; }
.subpage .nav-links {
    display: flex;
    gap: 2rem;
}
.subpage .nav-links a { opacity: 0.5; }
.subpage .nav-links a:hover { opacity: 1; }
.subpage .nav-links a.active {
    opacity: 1;
    font-weight: 600;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 2px;
    cursor: default;
}

.subpage main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 4rem 4rem;
    position: relative;
    z-index: 10;
}

.subpage h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 3rem;
}

.subpage .content-block {
    max-width: 56rem;
}

/* Work page cards */
.subpage .work-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.subpage .work-card {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.subpage .work-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.subpage .work-card-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 300;
    opacity: 0.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.subpage .work-card-title {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.subpage .work-card-category {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.4;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.subpage .work-card-desc {
    font-size: 0.875rem;
    opacity: 0.55;
    line-height: 1.7;
    max-width: 24rem;
    font-weight: 300;
}

.subpage .work-demo-badge {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.35;
    margin-bottom: 1rem;
}

.subpage .work-demo-note {
    margin-top: 4rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.25;
}

/* About page */
.page-about main {
    justify-content: center;
}

.subpage .about-layout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8rem;
    align-items: start;
    max-width: 48rem;
    margin: 0 auto;
}

.subpage .about-meta {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding-top: 0.5rem;
}



.subpage .meta-label {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.4;
    font-weight: 600;
}

.subpage .meta-value {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.subpage .about-content {
    max-width: 36rem;
}

.subpage .about-content p {
    font-size: 0.875rem;
    opacity: 0.6;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Contact page — split layout */
.page-contact main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 8rem 6rem 4rem;
}

.contact-layout {
    display: flex;
    gap: 4rem;
    max-width: 56rem;
    width: 100%;
    align-items: flex-start;
    margin: 0 auto;
}

.contact-left {
    flex: 0 0 auto;
    max-width: 20rem;
    min-width: 0;
}

.contact-left h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 4rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--text);
}

.contact-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.contact-link:hover svg {
    opacity: 1;
}

.contact-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border);
    flex-shrink: 0;
}

.contact-right {
    flex: 1;
    min-width: 0;
}

.contact-form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.contact-form-group label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-label);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.contact-form-group:focus-within label {
    color: var(--text);
}

.contact-form-group input,
.contact-form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--input-border);
    padding: 0.6rem 0;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
    border-radius: 0;
    line-height: 1.6;
}

.contact-form-group input::placeholder,
.contact-form-group textarea::placeholder {
    color: transparent;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
    border-bottom-color: var(--text);
}

.contact-submit {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    padding-bottom: 4px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    margin-top: 1rem;
}

.contact-submit:hover {
    border-bottom-color: var(--text);
}

.contact-success {
    display: none;
    padding: 4rem 0;
}

.contact-success.visible {
    display: block;
}

.contact-success h2 {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(10px);
    animation: contactFadeUp 0.5s ease forwards;
}

.contact-success p {
    font-size: 0.95rem;
    color: var(--text-faint);
    font-weight: 300;
    opacity: 0;
    transform: translateY(10px);
    animation: contactFadeUp 0.5s ease 0.15s forwards;
}

@keyframes contactFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



@media (max-width: 640px) {
    .subpage nav { padding: 1.5rem; }
    .subpage main { padding: 6rem 1.5rem 2rem; }
    .subpage .nav-links { gap: 1.2rem; }
    .subpage .work-cards { grid-template-columns: 1fr; }
    .subpage .about-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .page-contact main {
        padding: 7rem 2rem 3rem;
        align-items: flex-start;
    }
    .contact-layout {
        flex-direction: column;
        gap: 3rem;
    }
    .contact-divider {
        width: 100%;
        height: 1px;
        align-self: auto;
    }
    .contact-left h1 {
        margin-bottom: 2.5rem;
    }
}
