:root {
    --bg: #070707;
    --rail: #0c0c0c;
    --text: #f6f3ec;
    --muted: #a7a197;
    --line: rgba(246, 243, 236, 0.12);
    --accent: #ff4d1c;
    --accent-ink: #1a0904;
    --display: "Playfair Display", Georgia, serif;
    --sans: "Manrope", "Segoe UI", sans-serif;
    --rail-w: 320px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(700px 380px at 100% 0%, rgba(255, 77, 28, 0.18), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
}

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 40;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 8px 12px;
    font-weight: 700;
}

.skip:focus { top: 12px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.shell {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    min-height: 100vh;
}

.rail {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 36px 28px 28px;
    background: rgba(12, 12, 12, 0.92);
    border-right: 1px solid var(--line);
    overflow: auto;
}

.rail-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.portrait {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    border: 2px solid var(--accent);
}

.brand {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 42px;
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand span { color: var(--accent); }

.rail-role {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle i {
    display: block;
    width: 16px;
    height: 1.5px;
    margin: 5px auto;
    background: var(--text);
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rail-nav a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 1px solid transparent;
}

.rail-nav a span {
    font-family: var(--display);
    font-size: 13px;
    color: var(--accent);
}

.rail-nav a:hover,
.rail-nav a.is-active {
    color: var(--text);
}

.rail-nav a.is-active { padding-left: 10px; }

.rail-foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.rail-foot p { margin: 0 0 6px; color: var(--muted); }

.rail-foot a {
    text-decoration: none;
    font-weight: 600;
}

.rail-foot a:hover { color: var(--accent); }

.stage {
    position: relative;
    padding: 48px 64px 32px;
}

.hero {
    position: relative;
    min-height: calc(100vh - 28px);
    margin: -48px -64px 0;
    padding: 56px 64px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 36px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 8%;
    left: 28%;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 28, 0.42), transparent 68%);
    filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}

.hero-copy { max-width: 860px; position: relative; z-index: 1; }

.avail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 6px 12px 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.35);
}

.avail i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3dff8a;
    box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.7);
    animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 8px rgba(61, 255, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}

.kicker,
.index {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }

.line {  overflow: hidden; }

.line-inner { display: block; }

.hero h1 {
    margin: 0;
    max-width: none;
    font-size: clamp(76px, 10vw, 148px);
    line-height: 0.84;
    font-weight: 800;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

h2 {
    margin: 0 0 22px;
    max-width: 16ch;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 0.96;
}

h3 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1; }

.lede {
    max-width: 52ch;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.btn-solid { background: var(--accent); color: #fff; }

.btn-solid:hover { filter: brightness(1.08); }

.btn-line {
    border-color: var(--line);
    color: var(--text);
    background: transparent;
}

.btn-line:hover { border-color: var(--text); }

.orbit {
    position: absolute;
    top: 28px;
    right: 36px;
    width: min(240px, 28vw);
    color: var(--muted);
    pointer-events: none;
    z-index: 1;
}

.orbit text {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 2.4px;
    font-weight: 600;
}

.metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.ticker {
    margin: 0 -64px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 77, 28, 0.08);
}

.ticker-track {
    display: flex;
    gap: 42px;
    width: max-content;
    padding: 14px 0;
}

.ticker span {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

.clients { margin: 10px 0 34px; }

.clients-label {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.clients-mask { overflow: hidden; }

.clients-track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    animation: clients-move 46s linear infinite;
}

.clients-mask:hover .clients-track { animation-play-state: paused; }

@keyframes clients-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.client-logo {
    height: 84px;
    min-width: 148px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #121212;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
}

a.client-logo:hover { border-color: var(--accent); }

.client-logo img {
    height: 48px;
    width: auto;
    max-width: 132px;
    object-fit: contain;
}

.client-logo span {
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.metrics strong {
    display: block;
    font-family: var(--display);
    font-size: 48px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.metrics span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.block { padding: 96px 0 10px; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.about-grid p,
.role li,
.role-org,
.project p,
.contact-card p,
.form-help {
    color: var(--muted);
}

.about-grid p { margin: 0; font-size: 17px; }

.skill-rows { margin: 8px 0 0; }

.skill-rows > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.skill-rows > div:last-child { border-bottom: 1px solid var(--line); }

.skill-rows dt {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.skill-rows dd { margin: 0; color: var(--muted); }

.role {
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.role:last-child { border-bottom: 1px solid var(--line); }

.role-when {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.role-org { margin: 8px 0 0; }

.role ul { margin: 14px 0 0; padding-left: 18px; }

.role li { margin: 6px 0; }

.project-list { border-bottom: 1px solid var(--line); }

.project {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 28px 8px;
    border-top: 1px solid var(--line);
    position: relative;
    color: inherit;
    text-decoration: none;
}

.project-no {
    padding-top: 8px;
    font-family: var(--display);
    color: var(--accent);
    font-size: 14px;
}

.project h3 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 32px);
    transition: color 0.35s ease;
}

.project p {
    margin: 10px 0 0;
    max-width: 46ch;
    font-size: 16px;
}

.project::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.45s ease;
}

.project:hover::after { width: 100%; }

.project:hover h3 { color: var(--accent); }

.project-go {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.contact-lede { margin-bottom: 28px; }

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
    max-width: 920px;
    margin-inline: auto;
}

.contact-card,
.contact-form {
    height: 100%;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.contact-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.contact-photo {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    border: 2px solid var(--accent);
}

.contact-card a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    font-size: 18px;
}

.contact-card a:hover { color: var(--accent); }

.contact-card p { margin: 0; }

.fine { font-size: 14px; }

.contact-form {
    display: grid;
    gap: 14px;
    align-content: center;
    text-align: left;
}

.contact-form button { justify-self: start; }

.contact-form label {
    display: grid;
    justify-items: start;
    text-align: left;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #101010;
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

.form-note {
    margin: 0;
    color: #ffb199;
    font-weight: 700;
}

.form-help { margin: 0; font-size: 13px; }

.thanks-pop {
    width: min(420px, calc(100% - 32px));
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #121212;
    color: var(--text);
    padding: 28px 24px;
}

.thanks-pop::backdrop { background: rgba(0, 0, 0, 0.72); }

.thanks-pop h3 { margin: 0 0 8px; font-size: 32px; }

.thanks-pop p { margin: 0 0 18px; color: var(--muted); }

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 72px;
    padding: 22px 0 8px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.site-footer a { color: var(--text); }

@media (max-width: 980px) {
    body { overflow-x: hidden; }

    .shell { display: block; }

    .rail {
        position: sticky;
        top: 0;
        z-index: 20;
        height: auto;
        display: block;
        padding: 12px 16px;
        background: rgba(7, 7, 7, 0.96);
        backdrop-filter: blur(14px);
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .rail.is-open { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }

    .rail-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .portrait {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .brand { font-size: 26px; line-height: 0.92; }

    .rail-role { display: none; }

    .nav-toggle { display: inline-block; flex-shrink: 0; }

    .rail-nav,
    .rail-foot { display: none; }

    .rail.is-open .rail-nav,
    .rail.is-open .rail-foot {
        display: flex;
        margin-top: 14px;
    }

    .rail-nav a { min-height: 44px; padding: 8px 0; }

    .rail-foot a { overflow-wrap: anywhere; }

    .stage { padding: 8px 18px 28px; }

    .hero {
        margin: 0;
        min-height: auto;
        padding: 28px 0 4px;
        gap: 24px;
    }

    .hero h1 {
        font-size: clamp(52px, 16vw, 76px);
        font-weight: 700;
    }

    .avail {
        max-width: 100%;
        white-space: normal;
        letter-spacing: 0.04em;
        line-height: 1.45;
    }

    .lede { font-size: 16px; margin-top: 16px; }

    .hero-actions { margin-top: 20px; }

    h2 {
        max-width: none;
        font-size: clamp(32px, 8.5vw, 46px);
    }

    .orbit,
    .ticker { display: none; }

    .metrics {
        grid-template-columns: 1fr 1fr;
        gap: 18px 14px;
    }

    .metrics strong { font-size: 36px; }

    .about-grid,
    .skill-rows > div,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .block { padding: 56px 0 4px; }

    .skill-rows > div { gap: 6px; }

    .project {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 2px 10px;
        padding: 16px 0;
    }

    .project-no { padding-top: 4px; }

    .project h3 { font-size: 22px; line-height: 1.15; }

    .project-go {
        grid-column: 2;
        justify-self: start;
        font-size: 12px;
    }

    .contact-layout { max-width: none; gap: 16px; }

    .contact-card,
    .contact-form {
        height: auto;
        padding: 22px 16px;
    }

    .contact-card a {
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .contact-photo {
        width: 96px;
        height: 96px;
    }

    .site-footer { margin-top: 48px; }
}

@media (max-width: 420px) {
    .hero h1 { font-size: 48px; }

    .metrics strong { font-size: 30px; }

    .metrics span { font-size: 13px; }

    .hero-actions { display: grid; }

    .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .avail i { animation: none; }
    .clients-track { animation: none; }
    .project h3,
    .project::after { transition: none; }
}
