:root {
    --bg: #08090d;
    --bg-soft: #11131a;
    --panel: #151820;
    --panel-2: #1c202a;
    --text: #f5f7fb;
    --muted: #aab0bf;
    --line: rgba(255, 255, 255, 0.11);
    --accent: #22d3ee;
    --accent-2: #f5c542;
    --danger: #ff6b6b;
    --success: #57d68d;
    --max: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a {
    color: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 48px);
    background: rgba(8, 9, 13, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand,
.site-nav {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--accent);
}

.site-nav {
    gap: 8px;
}

.site-nav a {
    padding: 9px 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text);
    background: var(--panel);
    border-color: var(--line);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

.hero {
    min-height: 86vh;
    display: grid;
    align-items: end;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95) contrast(1.05);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 9, 13, 0.96), rgba(8, 9, 13, 0.64) 48%, rgba(8, 9, 13, 0.15)), linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-content {
    position: relative;
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
    padding: 96px 0 112px;
}

.eyebrow,
.section-kicker,
.meta,
.status {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 800;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 820px;
    margin-bottom: 20px;
    font-size: clamp(48px, 8vw, 112px);
    line-height: 0.94;
}

.hero-copy {
    max-width: 620px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.button.primary {
    background: var(--text);
    color: var(--bg);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.intro-band,
.section-grid,
.feature-section,
.page-hero,
.content-rows,
.project-list,
.skills-grid,
.project-detail-layout,
.project-gallery-section,
.contact-layout,
.legal-copy {
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
}

.intro-band {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    padding: 76px 0;
    border-bottom: 1px solid var(--line);
}

.intro-band h2,
.page-hero h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1;
    margin-bottom: 18px;
}

.intro-band p,
.page-hero p {
    color: var(--muted);
    font-size: 18px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    padding: 0 0 80px;
}

.section-grid article,
.project-card,
.skill-card,
.project-story,
.project-sidebar,
.contact-form,
.contact-note,
.feature-panel {
    background: var(--panel);
    border: 1px solid var(--line);
}

.section-grid article {
    padding: 28px;
}

.section-grid span {
    color: var(--accent-2);
    font-weight: 900;
}

.section-grid p,
.project-card p,
.skill-card p,
.project-story p,
.project-sidebar p,
.feature-panel p,
.content-rows p,
.legal-copy p,
.contact-note p {
    color: var(--muted);
}

.feature-section {
    padding: 0 0 96px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1;
    margin-bottom: 0;
}

.feature-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 28px;
}

.featured-projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.feature-card {
    min-height: 430px;
}

.feature-card h3 {
    font-size: 34px;
    line-height: 1;
}

.page-hero.compact {
    padding: 96px 0 54px;
}

.content-rows,
.legal-copy {
    display: grid;
    gap: 18px;
    padding-bottom: 90px;
}

.content-rows article,
.legal-copy {
    border-top: 1px solid var(--line);
    padding-top: 26px;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding-bottom: 90px;
}

.project-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
    padding: 26px;
}

.project-banner {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    background: var(--bg-soft);
    border: 1px solid var(--line);
}

.project-card h2 {
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 12px;
}

.project-card .button {
    align-self: flex-start;
}

.project-description {
    margin-top: 18px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding-bottom: 90px;
}

.skill-card {
    display: grid;
    gap: 18px;
    justify-items: center;
    text-align: center;
    padding: 26px;
}

.skill-card h2 {
    margin-bottom: 0;
    font-size: 28px;
    line-height: 1.1;
}

.skill-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--accent);
    background: var(--bg-soft);
    border: 1px solid var(--line);
}

.skill-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-detail-hero {
    padding: 82px 0 42px;
}

.project-detail-banner {
    width: 100%;
    max-height: 430px;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    margin-bottom: 30px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
}

.back-link {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.project-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 18px;
    padding-bottom: 90px;
}

.project-story,
.project-sidebar {
    padding: 26px;
}

.project-story {
    font-size: 18px;
}

.project-sidebar {
    align-self: start;
    display: grid;
    gap: 18px;
}

.project-sidebar .button {
    width: 100%;
}

.project-gallery-section {
    padding-bottom: 90px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.project-gallery figure {
    margin: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 12px;
}

.project-gallery img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: contain;
    background: var(--bg-soft);
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 18px;
    padding-bottom: 90px;
}

.contact-note,
.contact-form {
    padding: 26px;
}

.social-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.icon-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
}

textarea {
    resize: vertical;
}

.check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.check span {
    display: inline;
}

.hidden-field {
    position: absolute;
    left: -9999px;
}

.notice {
    padding: 14px 16px;
    border: 1px solid var(--line);
}

.notice p {
    margin-bottom: 0;
}

.notice.success {
    color: var(--success);
    background: rgba(87, 214, 141, 0.08);
}

.notice.error {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.08);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px clamp(18px, 4vw, 48px);
    color: var(--muted);
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin-bottom: 0;
}

.site-footer a {
    text-decoration: none;
}

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 18px 18px;
        background: rgba(8, 9, 13, 0.98);
        border-bottom: 1px solid var(--line);
    }

    .site-nav.open {
        display: flex;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-media::after {
        background: linear-gradient(0deg, var(--bg), rgba(8, 9, 13, 0.56) 70%);
    }

    .intro-band,
    .section-grid,
    .featured-projects,
    .project-list,
    .skills-grid,
    .project-detail-layout,
    .project-gallery,
    .contact-layout,
    .two-col {
        grid-template-columns: 1fr;
    }

    .feature-panel,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
