@charset "UTF-8";

:root {
    color-scheme: light;
    --bg: #f2f0e9;
    --surface: #e9e6dc;
    --text: #121212;
    --muted: #6b6963;
    --line: rgba(18, 18, 18, .18);
    --accent: #3157ff;
    --accent-text: #f7f7f2;
    --page: min(100% - 40px, 1440px);
    --ease: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11110f;
    --surface: #1b1b18;
    --text: #efeee8;
    --muted: #97958d;
    --line: rgba(239, 238, 232, .18);
    --accent: #6e87ff;
    --accent-text: #0d0d0c;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    transition: background-color .35s ease, color .35s ease;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
::selection { background: var(--accent); color: var(--accent-text); }

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header, .site-footer, .hero, .section, .contact {
    width: var(--page);
    margin-inline: auto;
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 84px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(18px);
    transition: height .3s ease, background-color .35s ease;
}

.site-header.is-compact { height: 66px; }

.logo {
    width: fit-content;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.06em;
}

.logo span { color: var(--accent); }

.nav {
    display: flex;
    gap: clamp(20px, 3vw, 48px);
    font-size: 13px;
}

.nav a, .contact-link, .site-footer a { transition: opacity .2s ease; }
.nav a:hover, .contact-link:hover, .site-footer a:hover { opacity: .55; }

.theme-toggle {
    justify-self: end;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color .2s ease, transform .3s var(--ease);
}

.theme-toggle:hover { background: var(--surface); transform: rotate(25deg); }

.hero {
    display: flex;
    min-height: calc(100svh - 84px);
    padding: clamp(34px, 5vw, 76px) 0 38px;
    flex-direction: column;
    justify-content: space-between;
}

.hero-meta, .contact-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-meta p { margin: 0; }

.hero-title {
    margin: clamp(70px, 10vh, 130px) 0;
    font-size: clamp(58px, 10.2vw, 156px);
    font-weight: 500;
    letter-spacing: -.075em;
    line-height: .78;
}

.hero-title span, .statement em, .contact h2 em {
    color: var(--accent);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -.055em;
}

.hero-bottom {
    display: grid;
    grid-template-columns: minmax(240px, 480px) auto;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
}

.hero-copy {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 1.5vw, 22px);
}

.round-link {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}

.round-link:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }

.round-link svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.section {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 3fr;
    gap: clamp(30px, 6vw, 100px);
    padding: clamp(100px, 14vw, 210px) 0;
    border-top: 1px solid var(--line);
}

.section-index {
    color: var(--muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.statement {
    max-width: 1050px;
    margin: -.13em 0 clamp(70px, 9vw, 130px);
    font-size: clamp(42px, 6.2vw, 92px);
    font-weight: 500;
    letter-spacing: -.065em;
    line-height: .98;
}

.statement em, .contact h2 em { font-style: italic; }

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(28px, 7vw, 120px);
    margin-left: 25%;
}

.about-grid p { margin: 0; color: var(--muted); font-size: 17px; }
.work { padding-bottom: clamp(120px, 16vw, 240px); }
.services { border-top: 1px solid var(--line); }

.service {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    align-items: start;
    padding: 28px 0 36px;
    border-bottom: 1px solid var(--line);
    transition: padding .35s var(--ease);
}

.service:hover { padding-right: 14px; padding-left: 14px; }

.service-number {
    padding-top: 7px;
    color: var(--muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 11px;
}

.service h3 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 46px);
    font-weight: 500;
    letter-spacing: -.045em;
}

.service p { max-width: 560px; margin: 0; color: var(--muted); }
.service-mark { color: var(--accent); font-size: 24px; }

.contact {
    padding: clamp(70px, 9vw, 130px) clamp(22px, 5vw, 76px) 42px;
    background: var(--accent);
    color: var(--accent-text);
}

.contact-meta { color: color-mix(in srgb, var(--accent-text) 60%, transparent); }

.contact h2 {
    margin: clamp(90px, 12vw, 180px) 0 clamp(80px, 10vw, 150px);
    font-size: clamp(70px, 13vw, 190px);
    font-weight: 500;
    letter-spacing: -.08em;
    line-height: .72;
}

.contact h2 em { color: inherit; }

.contact-link {
    display: flex;
    justify-content: space-between;
    padding: 22px 0 10px;
    border-top: 1px solid color-mix(in srgb, var(--accent-text) 42%, transparent);
    font-size: clamp(18px, 2vw, 30px);
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    min-height: 190px;
    padding: 50px 0 28px;
    color: var(--muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.site-footer .logo { color: var(--text); font-family: Arial, Helvetica, sans-serif; }
.footer-time { justify-self: end; }

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .85s var(--ease), transform .85s var(--ease);
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Error pages */
.error-page {
    display: grid;
    min-height: 100svh;
    grid-template-rows: auto 1fr auto;
}

.error-header, .error-main, .error-footer { width: var(--page); margin-inline: auto; }

.error-header {
    display: flex;
    height: 84px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.error-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.error-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

.error-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: end;
    padding: clamp(60px, 9vw, 140px) 0;
}

.error-code {
    margin: 0;
    color: var(--accent);
    font-size: clamp(150px, 26vw, 390px);
    font-weight: 500;
    letter-spacing: -.11em;
    line-height: .62;
}

.error-copy { max-width: 560px; justify-self: end; }

.error-copy h1 {
    margin: 0 0 26px;
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: .95;
}

.error-copy p { max-width: 430px; margin: 0 0 38px; color: var(--muted); font-size: 17px; }

.button {
    display: inline-flex;
    min-height: 52px;
    padding: 0 22px;
    align-items: center;
    gap: 34px;
    border-radius: 100px;
    background: var(--text);
    color: var(--bg);
    font-size: 14px;
    transition: transform .3s var(--ease), opacity .2s ease;
}

.button:hover { transform: translateY(-3px); }
.button:focus-visible, .theme-toggle:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.error-footer {
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 760px) {
    :root { --page: min(100% - 28px, 1440px); }
    .site-header { grid-template-columns: 1fr auto; }
    .nav { display: none; }
    .hero { min-height: calc(100svh - 84px); padding-top: 28px; }
    .hero-meta { align-items: flex-start; gap: 20px; }
    .hero-title { font-size: clamp(52px, 16.8vw, 90px); line-height: .82; }
    .hero-bottom { grid-template-columns: 1fr auto; }
    .round-link { width: 58px; height: 58px; }
    .section { grid-template-columns: 1fr; gap: 50px; }
    .about-grid { grid-template-columns: 1fr; gap: 24px; margin-left: 0; }
    .service { grid-template-columns: 40px 1fr auto; gap: 12px; }
    .contact { width: 100%; }
    .contact h2 { font-size: clamp(70px, 22vw, 110px); }
    .site-footer { grid-template-columns: 1fr auto; }
    .site-footer > p:first-of-type { display: none; }
    .error-main { grid-template-columns: 1fr; align-content: center; gap: 70px; }
    .error-code { font-size: clamp(145px, 52vw, 260px); }
    .error-copy { justify-self: start; }
}

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