@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url(fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(fonts/inter-latin-wght-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --deep: #0a0e1a;
    --ink: #0f1c2e;
    --dark-blue: #26476d;
    --blue: #6fa3d1;
    --pale: #e8f1fa;

    /* A softer step of the palette for secondary text, and a warm red kept only for errors. */
    --muted: #a6bdd6;
    --line: rgba(111, 163, 209, .28);
    --error: #ff9d92;
    --error-bg: #351a22;

    --mono: "JetBrains Mono", Consolas, monospace;
    --sans: "Inter", "Segoe UI", system-ui, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    background: var(--deep);
    color: var(--pale);
    font: 400 16px/1.65 var(--sans);
    counter-reset: section;
}

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--pale); }

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

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.1; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; }

/* Header */

.site-header-bar { position: sticky; top: 0; z-index: 10; background: rgba(10, 14, 26, .86); backdrop-filter: blur(12px); }

.site-header {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 32px;
    align-items: center;
    justify-content: space-between;
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px clamp(16px, 3vw, 36px);
}

.brand { color: var(--pale); font-family: var(--mono); font-weight: 500; letter-spacing: .3em; text-decoration: none; text-transform: uppercase; }
.brand:hover { color: var(--blue); }

nav { display: flex; flex-wrap: wrap; gap: 2px 22px; align-items: center; font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
nav a { color: var(--pale); text-decoration: none; }
nav a:hover { color: var(--blue); }
nav form { margin: 0; }

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--blue);
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.link-button:hover { color: var(--pale); }
nav .link-button { color: var(--pale); text-decoration: none; }
nav .link-button:hover { color: var(--blue); }

main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 48px clamp(16px, 3vw, 36px) 88px; }
main.home { max-width: none; padding: 0; }
section { margin-bottom: 64px; }

/* Hero: the close-up */

.hero {
    --h: clamp(680px, 88vh, 900px);
    --img: calc(var(--h) * 1.9);
    --hero-gap: clamp(0px, 2.2vw, 32px);
    position: relative;
    width: calc(100% - 2 * var(--hero-gap));
    height: var(--h);
    margin: 0 auto calc(32px + 72px);
}

.hero-art { position: absolute; inset: 0; isolation: isolate; overflow: hidden; background: var(--blue); }

/* Multiply over the blue turns the photo into a duotone, as on a printed poster. */
.hero-art img {
    position: absolute;
    top: calc(var(--h) * -.12);
    left: calc(28% - var(--img) * .52);
    width: var(--img);
    height: var(--img);
    max-width: none;
    filter: grayscale(1) brightness(1.16) contrast(1.24);
    mix-blend-mode: multiply;
    animation: settle 1.4s cubic-bezier(.2, .8, .2, 1) both;
}

/* Darkens the blue behind the big name. */
.hero-art::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, transparent 34%, rgba(10, 14, 26, .62) 58%);
}

/* Print grain. */
.hero-art::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-panel {
    position: absolute;
    inset: 0 0 -32px 0;
    background: var(--ink);
    clip-path: polygon(58% 0, 100% 0, 100% 100%, 71% 100%);
}

.hero-copy {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: clamp(24px, 5vh, 52px) clamp(20px, 4vw, 64px) clamp(28px, 5vh, 52px);
    text-align: right;
    animation: rise 1s .15s cubic-bezier(.2, .8, .2, 1) both;
}

.hero-meta { margin: 0 0 auto; font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.hero-meta span { display: block; }
.hero-meta .role { color: var(--pale); font-weight: 600; }
.hero-meta .place { color: var(--muted); }

.hero h1 {
    margin: 0 -.2em 0 0;
    color: var(--pale);
    font-family: var(--mono);
    font-size: clamp(3rem, 7.6vw, 7.6rem);
    font-weight: 200;
    line-height: 1.2;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.hero h1 span { display: block; }

.tagline {
    margin: 10px -.2em auto 0;
    color: var(--pale);
    font-family: var(--mono);
    font-size: clamp(1.05rem, 2.5vw, 2.3rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.hero-detail { max-width: min(360px, max(25vw, 330px)); margin-top: 16px; }
.summary { margin: 0 0 20px; color: var(--pale); font-family: var(--mono); font-size: .84rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.hero-down {
    position: absolute;
    right: clamp(20px, 4vw, 64px);
    bottom: -68px;
    display: block;
    width: 18px;
    height: 56px;
    color: var(--blue);
}
.hero-down:hover { color: var(--pale); }
.hero-down svg { display: block; width: 100%; height: 100%; }

/* Buttons */

.button {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--blue);
    border-radius: 10px;
    background: var(--blue);
    color: var(--deep);
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.button:hover { border-color: var(--pale); background: var(--pale); color: var(--deep); }
.button-quiet { border-color: var(--line); background: var(--dark-blue); color: var(--pale); }
.button-quiet:hover { border-color: var(--blue); background: var(--dark-blue); color: var(--pale); }
.button-danger { border-color: var(--error); background: transparent; color: var(--error); }
.button-danger:hover { border-color: var(--error); background: var(--error-bg); color: var(--error); }

/* Home sections */

.band { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 36px) clamp(64px, 8vw, 104px); counter-increment: section; }

.band-label { margin: 0 0 10px; color: var(--blue); font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.band-label::before { content: counter(section, decimal-leading-zero) " / "; }

.band-title { margin-bottom: clamp(24px, 3vw, 36px); font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

.card {
    padding: 22px;
    background: linear-gradient(160deg, #1b3553, var(--ink));
    border: 1px solid var(--line);
    border-radius: 14px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
    padding: 2px 10px;
    background: rgba(10, 14, 26, .35);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
}

.tool-card { display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.tool-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.tool-card h3 { font-size: 1.3rem; letter-spacing: -.02em; }
.tool-card h3 a { color: var(--pale); text-decoration: none; }
.tool-card h3 a::after { content: " \2197"; color: var(--blue); }
.tool-card h3 a:hover { color: var(--blue); }
.tool-card p { margin: 0 0 14px; color: var(--muted); font-size: .94rem; }
.tool-card .tool-details { margin: auto 0 0; padding-top: 14px; }
.tool-tags { margin-bottom: 28px; }

.entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 4px 32px;
    padding: 22px;
    margin-bottom: 14px;
    background: linear-gradient(160deg, #1b3553, var(--ink));
    border: 1px solid var(--line);
    border-radius: 14px;
}
.entry h3 { margin: 0; font-size: 1.15rem; }
.entry p { margin: 0; }
.entry .muted { margin-top: 4px; }

.demo-frame + .muted { margin-top: 0; }
.highlights { display: grid; gap: 8px; margin: 0; padding-left: 18px; }
.highlights li::marker { color: var(--blue); }

.card .card-text { margin: 0; }

.site-footer a { margin-left: 16px; }

.muted { color: var(--muted); font-size: .92rem; }

.cta {
    max-width: calc(1320px - 2 * clamp(16px, 3vw, 36px));
    margin: 0 auto clamp(48px, 6vw, 72px);
    padding: clamp(36px, 6vw, 72px);
    width: calc(100% - 2 * clamp(16px, 3vw, 36px));
    background: linear-gradient(100deg, var(--deep) 0%, var(--ink) 28%, var(--dark-blue) 58%, var(--blue) 88%, var(--pale) 100%) border-box;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.cta h2 { max-width: 15ch; margin-bottom: 14px; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.cta p { max-width: 42ch; margin: 0 0 24px; }

.site-footer { padding: 24px 16px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-align: center; text-transform: uppercase; }

/* Reveal as you scroll. site.js adds the class, so content stays visible without JavaScript. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Forms */

.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.wide-form { max-width: 720px; }

.form { display: grid; gap: 16px; margin-bottom: 16px; }
.form label { display: block; font-size: .94rem; font-weight: 500; }
.form label .muted { font-weight: 400; }
.form input, .form select, .form textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--deep);
    color: var(--pale);
    font: inherit;
    font-weight: 400;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.form button { justify-self: start; }
.form p { margin: 0; }
.form .code-input { font-family: var(--mono); font-size: 1.5rem; letter-spacing: .3em; text-transform: uppercase; }

fieldset {
    display: grid;
    gap: 16px;
    min-width: 0;
    margin: 0;
    padding: 22px;
    background: linear-gradient(160deg, #1b3553, var(--ink));
    border: 1px solid var(--line);
    border-radius: 14px;
}
legend { padding: 0 8px; color: var(--blue); font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.demo-fields[hidden] { display: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.form .choice { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.form .choice input { width: auto; margin-top: 0; accent-color: var(--blue); }

.errors, .notice { margin: 0 0 20px; padding: 13px 18px; border-radius: 10px; }
.errors { padding-left: 34px; background: var(--error-bg); border: 1px solid var(--error); color: var(--error); }
.notice { background: var(--dark-blue); border: 1px solid var(--line); }

/* Offers and projects */

.offer { margin-bottom: 14px; }
.offer-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: start; justify-content: space-between; }
.salary { color: var(--blue); font-size: 1.3rem; font-weight: 600; }

.badge { padding: 2px 10px; background: rgba(10, 14, 26, .35); border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.badge-interested { background: var(--blue); border-color: var(--blue); color: var(--deep); }
.badge-declined { border-color: var(--error); color: var(--error); }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 14px; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-line; }

.status-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

.demo-frame {
    display: block;
    width: 100%;
    height: 72vh;
    min-height: 420px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}
@keyframes settle {
    from { transform: scale(1.04); }
    to { transform: none; }
}

@media (max-width: 860px) {
    .hero { --h: 920px; --img: 620px; width: 100%; }
    .hero-art img { top: -30px; left: calc(50% - var(--img) * .515); }
    .hero-art::before { display: none; }
    .hero-panel { clip-path: polygon(0 45%, 100% 33%, 100% 100%, 0 100%); }
    .hero-copy { justify-content: flex-end; }
    .hero-meta { margin-bottom: 12px; }
    .hero h1 { font-size: clamp(2.6rem, 15vw, 5.4rem); letter-spacing: .14em; margin-right: -.14em; }
    .tagline { margin: 8px -.14em 16px 0; letter-spacing: .14em; }
    .hero-detail { max-width: 100%; }
    .entry { grid-template-columns: 1fr; }
    .cta { background: linear-gradient(160deg, var(--deep) 0%, var(--ink) 45%, var(--dark-blue) 100%) border-box; }
}

@media (max-width: 480px) {
    dl { grid-template-columns: 1fr; gap: 0; }
    dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
