/* Typography and theme */
@font-face {
    font-family: mainFont;
    src: url("assets/motomangucode.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #10120f;
    --text: #f0efe7;
    --muted: #a4a89d;
    --accent: #b8c9a2;
    --line: #34382e;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: mainFont, monospace;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}

::selection {
    color: var(--bg);
    background: var(--accent);
}

h1, h2, p, figure {
    margin: 0;
}

h1, h2 {
    font-weight: 400;
}

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

/* Page layout and navigation */
.site-shell {
    width: min(100% - 112px, 1328px);
    margin-inline: auto;
}

.site-header {
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    font-size: 23px;
    letter-spacing: -1.2px;
    white-space: nowrap;
}

.domain {
    color: var(--muted);
}

nav {
    display: flex;
    gap: 34px;
    font-size: 13px;
}

nav a {
    padding-block: 12px;
}

nav a:hover, .hero-bottom a:hover, .site-footer a:hover {
    color: var(--accent);
}

/* Introduction and rose */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: 5%;
    padding-top: 58px;
}

.hero-copy {
    padding-block: 36px 50px;
    align-self: center;
}

.eyebrow {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 9px;
    vertical-align: 2px;
    box-shadow: 0 0 0 4px #b8c9a20b;
}

.intro {
    margin-top: 47px;
    font-size: 16px;
}

h1 {
    font-size: clamp(40px, 4.9vw, 70px);
    line-height: 1.13;
    letter-spacing: -3px;
    margin-top: 18px;
}

.hero-description {
    color: var(--muted);
    max-width: 410px;
    margin-top: 27px;
    font-size: 14px;
    line-height: 1.9;
}

.button {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 36px;
    min-height: 52px;
    padding: 13px 22px;
    margin-top: 32px;
    background: var(--accent);
    color: var(--bg);
    font-size: 12px;
    transition: background .2s, transform .2s;
}

.button:hover {
    background: #d0debe;
    transform: translateY(-2px);
}

.hero-art {
    min-width: 0;
}

.art-frame {
    position: relative;
    height: 550px;
    border: 1px solid var(--line);
    background: #050605;
    overflow: hidden;
}

.art-frame::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid #d4dcc918;
    pointer-events: none;
}

.art-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.art-cross {
    position: absolute;
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
    z-index: 1;
}

.cross-top {
    top: 7px;
    left: 10px;
}

.cross-bottom {
    bottom: 8px;
    right: 10px;
}

.art-label {
    position: absolute;
    right: 30px;
    top: 33px;
    writing-mode: vertical-rl;
    font-size: 9px;
    letter-spacing: 2px;
    color: #e1e7d1;
}

figcaption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .9px;
    margin-top: 13px;
    text-transform: uppercase;
}

.hero-bottom {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 35px 27px;
    color: var(--muted);
    font-size: 10px;
}

.hero-bottom a span {
    margin-left: 18px;
    color: var(--accent);
}

/* Content sections */
.section {
    border-top: 1px solid var(--line);
    padding-block: 63px;
    scroll-margin-top: 20px;
}

.about-section,
.connect-section {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 35px;
}

.section-index {
    padding-top: 7px;
}

.section-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 46px;
}

h2 {
    font-size: clamp(27px, 2.7vw, 39px);
    letter-spacing: -1.3px;
    line-height: 1.25;
}

.about-copy {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

.about-copy p + p {
    margin-top: 18px;
}

.work-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 27px;
}

.small-status {
    font-size: 10px;
    color: var(--muted);
}

.work-panel {
    padding: 42px;
    border: 1px solid var(--line);
    background: linear-gradient(115deg, #1b2017, #131610 70%);
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 50px;
}

.work-panel h2 {
    margin-block: 22px 17px;
    font-size: clamp(32px, 3.4vw, 48px);
}

.work-panel p:not(.eyebrow) {
    max-width: 410px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

.repo-link {
    border-left: 1px solid var(--line);
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    transition: color .2s;
}

.link-icon {
    align-self: flex-end;
    font-size: 37px;
    color: var(--accent);
    margin-bottom: auto;
    line-height: 1;
    transition: transform .2s;
}

.repo-title {
    font-size: clamp(17px, 1.7vw, 24px);
    letter-spacing: -.6px;
    margin-top: 13px;
}

.repo-handle {
    font-size: 11px;
    color: var(--muted);
    margin-top: 7px;
    overflow-wrap: anywhere;
}

.repo-link:hover {
    color: var(--accent);
}

.repo-link:hover .link-icon {
    transform: translate(3px, -3px);
}

.connect-content {
    display: flex;
    justify-content: space-between;
    gap: 36px;
}

.connect-content h2 {
    font-size: clamp(26px, 2.4vw, 34px);
}

.connect-content p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 15px;
}

.social-links {
    min-width: 146px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    gap: 32px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.social-links a > span[aria-hidden] {
    color: var(--accent);
}

/* Footer and accessibility */
.site-footer {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-block: 26px 35px;
    color: var(--muted);
    font-size: 9px;
}

.site-footer a span {
    padding-left: 12px;
    color: var(--accent);
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    transform: translateY(-160%);
    padding: 12px 18px;
    z-index: 10;
    background: var(--accent);
    color: var(--bg);
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Not-found page */
.error-page {
    min-height: 75svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-block: 65px;
}

.error-page h1 {
    margin-bottom: 25px;
}

.error-page > p:not(.eyebrow) {
    max-width: 480px;
    color: var(--muted);
}

/* Responsive layouts */
@media (min-width: 1600px) {
    .hero {
        padding-top: 70px;
    }
    .art-frame {
        height: 610px;
    }
}

@media (max-width: 1050px) {
    .site-shell {
        width: calc(100% - 64px);
    }
    .hero {
        column-gap: 4%;
    }
    h1 {
        font-size: clamp(37px, 5.1vw, 54px);
        letter-spacing: -2px;
    }
    .art-frame {
        height: 490px;
    }
    .about-section, .connect-section {
        grid-template-columns: 1fr;
        gap: 27px;
    }
    .section-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .site-shell {
        width: calc(100% - 40px);
    }
    .site-header {
        min-height: 86px;
        gap: 15px;
    }
    .wordmark {
        font-size: 18px;
    }
    nav {
        gap: 19px;
        font-size: 11px;
    }
    .hero {
        grid-template-columns: 1fr;
        padding-top: 12px;
    }
    .hero-copy {
        padding-block: 33px 42px;
    }
    .eyebrow {
        font-size: 9px;
        letter-spacing: 1.3px;
    }
    .intro {
        margin-top: 32px;
        font-size: 14px;
    }
    h1 {
        font-size: clamp(38px, 8.9vw, 62px);
        letter-spacing: -1.8px;
    }
    .hero-description {
        font-size: 13px;
        margin-top: 22px;
        max-width: 380px;
    }
    .button {
        margin-top: 26px;
    }
    .art-frame {
        height: clamp(330px, 100vw, 500px);
    }
    .hero-bottom {
        padding-block: 25px;
        font-size: 9px;
    }
    .hero-bottom > span {
        max-width: 145px;
    }
    .hero-bottom a {
        text-align: right;
    }
    .section {
        padding-block: 38px;
    }
    .section-content {
        grid-template-columns: 1fr;
        gap: 23px;
    }
    h2 {
        font-size: 31px;
    }
    .about-copy {
        max-width: 460px;
    }
    .work-heading {
        gap: 12px;
    }
    .small-status {
        font-size: 9px;
    }
    .work-panel {
        padding: 25px;
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .work-panel h2 {
        font-size: 37px;
    }
    .repo-link {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 26px 0 0;
        position: relative;
    }
    .link-icon {
        position: absolute;
        right: 0;
        top: 26px;
        font-size: 30px;
    }
    .repo-link .eyebrow {
        padding-right: 35px;
    }
    .repo-title {
        font-size: 21px;
    }
    .connect-content {
        flex-direction: column;
        gap: 24px;
    }
    .site-footer {
        flex-direction: column;
        gap: 10px;
        padding-block: 24px;
    }
}

@media (max-width: 360px) {
    .site-shell {
        width: calc(100% - 32px);
    }
    nav {
        gap: 12px;
    }
    .wordmark {
        font-size: 16px;
    }
    h1 {
        font-size: 35px;
    }
    .work-panel {
        padding: 21px;
    }
    .work-panel h2 {
        font-size: 32px;
    }
}

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