/*
Theme Name: Origin Forward Slash
Theme URI: https://originforwardslash.com
Author: Jan Hopkins
Description: Light, quiet theme in the spirit of the original ORIGIN/FORWARD\SLASH site, with the bespoke p5.js door and room kept as interactive pages.
Version: 2.0.0
Text Domain: originforwardslash
*/

:root {
    --text: #303030;
    --muted: #787878;
    --teal: rgb(52, 139, 139);
    --soft: rgba(131, 122, 122, 0.07);
    --line: #e4e1e1;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Barlow', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text);
    background: #fff;
}

a { color: rgb(50, 50, 50); text-decoration-color: var(--teal); text-underline-offset: 3px; }
a:visited { color: rgb(120, 116, 116); }
a:hover, a:focus { color: var(--teal); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }

/* header */
.site-header {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 2rem;
}
.site-brand, .site-brand:visited {
    font-weight: 600;
    letter-spacing: .08em;
    text-decoration: none;
    color: var(--teal);
    font-size: 1.05rem;
}
.site-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.site-nav-list a {
    display: inline-block;
    padding: .3rem 1.1rem;
    border-radius: 999px;
    background: var(--soft);
    text-decoration: none;
    font-size: .95rem;
}
.site-nav-list a:hover, .site-nav-list a:focus,
.site-nav-list .current-menu-item a, .site-nav-list .current_page_item a { background: var(--teal); color: #fff; }

/* layout */
.site-main { max-width: 760px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.page-title {
    color: var(--teal);
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    line-height: 1.25;
    text-align: center;
    margin: 1rem 0 .5rem;
}
.pencil-lines {
    height: 40px;
    margin: .5rem auto 1.5rem;
    background: url('legacy/archive/lines.jpg') center / contain no-repeat;
}
.back-link { margin: 0; font-size: .95rem; }
.back-link-bottom { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.back-link a { text-decoration: none; padding: .25rem .9rem; border-radius: 999px; background: var(--soft); display: inline-block; }
.back-link a:hover { background: var(--teal); color: #fff; }

/* content */
.page-content { color: #444; }
.page-content > * { max-width: 100%; }
.page-content p { margin: 0 0 1.1em; }
.page-content h2, .page-content h3 { color: var(--teal); line-height: 1.3; margin: 2em 0 .5em; }
.page-content img { max-width: 100%; height: auto; }
.page-content figure { margin: 2rem 0; text-align: center; }
.page-content figcaption { font-size: .85rem; color: var(--muted); }
.page-content blockquote { margin: 1.5em 0; padding-left: 1.25rem; border-left: 3px solid var(--teal); color: var(--muted); }
.page-content iframe, .page-content embed { display: block; width: 100%; max-width: 100%; border: 0; }
.page-content iframe { aspect-ratio: 16 / 9; height: auto; }
.page-content embed { height: 80vh; min-height: 480px; }
.page-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.tiny { font-size: .85rem; color: var(--muted); }

.profile-image { text-align: center; margin: 0 0 1.5rem; }
.profile-image img { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; }

/* section lists (archive, group) */
.child-list { list-style: none; margin: 0; padding: 0; }
.child-item { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.child-item h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 .25rem; line-height: 1.35; }
.child-item h2 a, .child-item h2 a:visited { color: var(--teal); text-decoration: none; }
.child-item h2 a:hover { text-decoration: underline; }
.child-item p { margin: 0; color: var(--muted); font-size: 1rem; }
.child-list:has(.has-image) { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2rem; }
.child-item.has-image { text-align: center; border: 0; }
.child-image img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; display: block; margin: 0 auto .75rem; }

/* interactive sketches */
.front-main, .room-main { max-width: 1100px; }
.sketch-frame { margin: 0 auto; width: 100%; background: #fff; }
.sketch-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.sketch-door { max-width: min(800px, calc(100vh - 160px)); aspect-ratio: 1 / 1; }
.sketch-room { max-width: 1024px; height: clamp(560px, 88vw, 920px); }
.front-links { text-align: center; margin: 1rem 0 0; }
.room-hint { text-align: center; color: var(--muted); font-size: .95rem; }
.room-main .doc { max-width: 760px; margin: 1rem auto 0; }

/* footer */
.site-footer { max-width: 760px; margin: 2rem auto 0; padding: 0 1.25rem 2.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
    body { font-size: 1.05rem; }
    .site-header { justify-content: center; text-align: center; }
    .site-nav-list { justify-content: center; }
}
