:root {
    --bg: #0f1012;
    --panel: rgba(255, 255, 255, 0.03);
    --panel-strong: rgba(255, 255, 255, 0.05);
    --text: #f2f1ed;
    --muted: #a3a39b;
    --muted-strong: #d0d0c7;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #f2f1ed;
    --accent-soft: #67b7ff;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    --radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

#what-i-do,
#work,
#about,
#contact,
.work-group {
    scroll-margin-top: 110px;
}

#top {
    scroll-margin-top: 0;
}

#page-top {
    scroll-margin-top: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 30%),
        linear-gradient(180deg, #0f1012 0%, #141518 100%);
}

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

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

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 72px;
}

.site-header {
    position: sticky;
    top: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 44px;
    padding: 14px 12px 14px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: rgba(15, 16, 18, 0.78);
    backdrop-filter: blur(10px);
}

.brand,
.site-nav a,
.section-label,
.feature-type,
.hero-link {
    font-family: "IBM Plex Mono", monospace;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-mark {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 auto;
}

.site-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.site-nav a {
    font-size: 0.84rem;
    color: var(--muted);
}

.hero {
    display: block;
    min-height: calc(100vh - 170px);
    margin-bottom: 36px;
}

.hero-copy,
.panel,
.feature-card,
.capability-card,
.contact-panel {
    border: 1px solid rgba(18, 18, 18, 0.06);
    background: var(--panel);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
}

.hero-copy {
    max-width: 980px;
    padding: 44px 0 24px;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.section-label,
.feature-type {
    margin: 0 0 14px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.84rem;
}

.hero h1 {
    margin: 0;
    font-family: "Inter Tight", sans-serif;
    font-size: clamp(5rem, 14vw, 10.2rem);
    font-weight: 700;
    line-height: 0.94;
    letter-spacing: -0.045em;
}

.hero-summary,
.hero-detail,
.panel p,
.feature-copy p,
.capability-card p,
.contact-panel p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}

.hero-kicker {
    margin: 24px 0 0;
    color: var(--muted-strong);
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(0.8rem, 1.2vw, 0.92rem);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-summary {
    max-width: 48rem;
    margin: 16px 0 0;
    color: #d7d7d2;
    font-size: clamp(0.98rem, 1.22vw, 1.14rem);
    line-height: 1.28;
}

.hero-detail {
    max-width: 58rem;
    margin: 12px 0 0;
    color: var(--accent-soft);
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(0.84rem, 1vw, 0.94rem);
    line-height: 1.55;
}

.hero-links {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    color: #7a7670;
    font-size: clamp(0.88rem, 1.1vw, 0.98rem);
    letter-spacing: 0.01em;
    transition: color 180ms ease;
}

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

.hero-link-primary {
    color: var(--text);
    font-family: "Inter Tight", sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.12rem);
    font-weight: 700;
}

.about-grid,
.feature-grid,
.capability-grid {
    display: grid;
    gap: 22px;
}

.about-grid {
    grid-template-columns: 0.95fr 1.05fr;
    margin-bottom: 110px;
}

.panel {
    padding: 22px;
    border-radius: 0;
}

.panel h2,
.section-heading h2,
.contact-panel h2 {
    margin: 0 0 14px;
    font-size: clamp(1.02rem, 1.35vw, 1.18rem);
    line-height: 1.1;
    font-weight: 600;
}

.about-left {
    display: grid;
    gap: 18px;
}

.portrait-panel img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    min-height: 420px;
    object-fit: cover;
    object-position: center top;
}

.about-copy p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.75;
}

.about-copy p:last-child {
    margin-bottom: 0;
}

.about-copy-right {
    margin-top: 28px;
    max-width: 42rem;
}

.about-right {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.about-meta-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 22px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.about-meta-label {
    margin: 0;
    color: var(--muted-strong);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-meta-value {
    margin: 0;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.6;
}

.section {
    margin-bottom: 140px;
}

.section-screen {
    min-height: calc(100svh - 120px);
}

.section-centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.section-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 64px;
}

.section-nav-centered {
    align-items: center;
}

.feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.feature-grid-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 360px;
}

.work-group {
    margin-top: 56px;
}

.section-heading + .work-group {
    margin-top: 0;
}

.work-group-heading {
    margin-bottom: 10px;
}

.feature-card {
    border-radius: 0;
    background: var(--panel-strong);
    transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
    overflow: visible;
}

.feature-card-image {
    position: relative;
    overflow: visible;
    z-index: 0;
}

.feature-card img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 250ms ease, box-shadow 250ms ease, filter 250ms ease;
    transform-origin: center center;
    will-change: transform;
}

.feature-card:hover img {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    filter: saturate(1.02);
}

.feature-card:hover .feature-copy h3 {
    color: #67b7ff;
    text-shadow: none;
}

.feature-copy {
    padding: 16px;
}

.feature-copy h3,
.capability-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    transition: color 200ms ease, text-shadow 200ms ease;
}

.feature-copy p,
.capability-card p,
.contact-panel p,
.panel p,
.stat-label {
    font-size: 0.92rem;
}

.feature-copy a {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent);
    font-weight: 700;
}

.capability-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-card {
    padding: 18px;
    border-radius: 0;
}

.capability-link {
    transition: background 180ms ease, border-color 180ms ease;
}

.capability-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.gallery-item {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    transition: border-color 220ms ease, background 220ms ease;
}

.gallery-item img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transition: transform 250ms ease, box-shadow 250ms ease;
    transform-origin: center center;
    will-change: transform;
}

.gallery-item:hover img {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.lightbox-trigger img {
    display: block;
    width: 100%;
}

.contact-panel {
    padding: 24px;
    border-radius: 0;
    text-align: center;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 110px;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.text-link {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 0;
    border: 1px solid var(--line);
    font-weight: 700;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #101114;
    background: #f2f1ed;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 460ms ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 460ms ease;
}

.lightbox.is-open .lightbox-backdrop {
    opacity: 1;
}

.lightbox-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(28, 28, 28, 0.92);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(22px) scale(0.965);
    transition: opacity 460ms ease, transform 460ms ease;
}

.lightbox.is-open .lightbox-figure {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(88vh - 44px);
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
}

.lightbox-caption {
    margin-top: 12px;
    color: rgba(242, 241, 237, 0.78);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 500ms ease, transform 500ms ease;
}

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

@media (max-width: 980px) {
    .hero,
    .about-grid,
    .capability-grid {
        grid-template-columns: 1fr;
    }

    .about-meta-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .feature-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .panel,
    .contact-panel {
        padding: 28px;
    }

    .section-screen {
        min-height: auto;
    }

    .hero {
        min-height: auto;
    }

    .hero-copy {
        padding: 24px 0 16px;
    }

    .site-header {
        border-radius: 0;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 16px;
    }

    .site-header {
        position: static;
        padding: 16px;
    }

    .site-nav {
        gap: 14px;
    }

    .hero h1 {
        font-size: clamp(4rem, 20vw, 6.2rem);
    }

    .hero-summary {
        font-size: 1.22rem;
    }

    .button {
        width: 100%;
    }

    .contact-actions {
        align-items: stretch;
    }

    .hero-links {
        gap: 18px;
    }

    .hero-link,
    .hero-link-primary {
        width: 100%;
    }
}
