/* |---------|---------|---------|---------|---------|---------|---------|---------|---------|--------- */

/* ========= Steve Smith CSS v13 ====================================================================== */

/* --------- DESIGN TOKENS ---------------------------------------------------------------------------- */

:root {
    /* Layout */
    --container:        1280px;
    --gap:              32px;
    --row-gap:          40px;
    --nav-gap:          1.5rem;
    --meta-gap:         0.75rem;

    /* Colour */
    --bg:               #171717;
    --text:             rgba(255,255,255,0.5);  /* body text, inactive nav links */
    --text-emphasis:    #fff;                   /* headings, hover, active links, body hyperlinks */
    --rule:             rgba(255,255,255,0.5);  /* header/footer rules */
    --lightbox-bg:      rgba(10,9,8,0.92);
    --lightbox-caption: rgba(255,255,255,0.3);  /* slightly dimmer than body text */
    --thumb-bg:         #111;
    --placeholder-bg:   #1a1a1a;
    --placeholder-text: #444;
    --nav-border:       #444;

    /* Typography */
    --font-stack:       input-mono-condensed, monospace;
    --font-size:        1rem;
    --font-size-alt:    0.8rem;                 /* footer meta, copyright, cookies link */
    --font-size-h1:     1.5rem;
    --font-weight:      100;
    --line-height:      1.5;
    --line-height-body: 1.7;                    /* longer prose passages */
    --letter-spacing:   0;
    }



/* --------- RESET ------------------------------------------------------------------------------------ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    }



/* --------- BASE ------------------------------------------------------------------------------------- */

body {
    background: var(--bg);
    color: var(--text);
    display: flex;
    font: var(--font-weight) var(--font-size)/var(--line-height) var(--font-stack);
    letter-spacing: var(--letter-spacing);
    justify-content: center;
    animation: fade-in 1s ease;
    }

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
    }

@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
    }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-emphasis);
    font-weight: var(--font-weight);
    }

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size); }

a {
    color: var(--text);
    text-decoration: none;
    }

img {
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    width: 100%;
    }

figure { margin: 0 0 7.5rem 0; }

figcaption { padding: 2.5rem 33% 0 0; }



/* --------- INNER PAGES ------------------------------------------------------------------------------ */

body.inner {
    flex-direction: column;
    min-height: 100vh;
    }

body.inner main {
    margin: 0 auto;
    width: var(--container);
    max-width: 90vw;
    padding-bottom: 6rem;
    }



/* --------- HEADER ----------------------------------------------------------------------------------- */

header {
    display: flex;
    justify-content: center;
    width: 100%;
    }

body.inner header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 0;
    width: var(--container);
    max-width: 90vw;
    margin: 0 auto 3rem;
    border-bottom: 1px solid var(--rule);
    }

body.inner header svg {
    height: 50px;
    width: auto;
    }

/* artifax header */
body.artifax header {
    flex-direction: row;
    align-items: center;
    padding: 3rem 0;
    gap: 0;
    }

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    }

body.artifax header .header-top svg {
    height: 50px;
    width: auto;
    }

.header-subheadline {
    font-size: var(--font-size);
    letter-spacing: 0.08em;                     /* explicit override — not global */
    color: var(--text-emphasis);
    width: 50%;
    margin-bottom: 1rem;
    }

.header-intro {
    font-size: var(--font-size);
    line-height: var(--line-height-body);
    width: 50%;
    margin-bottom: var(--row-gap);
    }



/* --------- PRIMARY NAV ------------------------------------------------------------------------------ */

.primary-nav {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    font-size: var(--font-size);
    }

.primary-nav a {
    padding-bottom: 4px;
    border-bottom: 0.5px solid transparent;
    }

.primary-nav a:hover,
.footer-nav a:hover {
    color: var(--text-emphasis);
    }

.footer-nav a.active,
.primary-nav a.active {
    color: var(--text-emphasis);
    border-bottom: 0.5px solid var(--text-emphasis);
    }



/* --------- FOOTER ----------------------------------------------------------------------------------- */

footer {
    padding: 3rem 0 6rem;
    width: var(--container);
    max-width: 90vw;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--rule);
    }

.footer-nav {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    }

.footer-nav a {
    padding-bottom: 4px;
    border-bottom: 0.5px solid transparent;
    }

.footer-nav a.active {
    color: var(--text-emphasis);
    border-bottom-color: var(--text-emphasis);
    }

.footer-meta {
    display: flex;
    align-items: baseline;
    gap: var(--meta-gap);
    font-size: var(--font-size-alt);
    }

.footer-meta a:hover { color: var(--text-emphasis); }

.footer-meta a.active {
    color: var(--text-emphasis);
    border-bottom: 0.5px solid var(--text-emphasis);
    }

.copyright-notice {
    font-size: var(--font-size-alt);
    }



/* --------- UTILITIES -------------------------------------------------------------------------------- */

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



/* --------- ABOUT / COOKIES PAGE --------------------------------------------------------------------- */

body.about main {
    padding: 0 0 3rem;
    }

.about-text {
    width: 50%;
    }

.about-text p {
    margin-bottom: 1.5rem;
    line-height: var(--line-height-body);
    }

.about-text strong {
    color: var(--text-emphasis);
    font-weight: 700;
    }

.about-text code {
    font-family: var(--font-stack);
    color: var(--text-emphasis);
    font-size: 0.9rem;
    }

h1.about-heading {
    font-size: var(--font-size-h1);
    margin-bottom: 2rem;
    }

h2.about-heading {
    margin-top: 2rem;
    margin-bottom: 1rem;
    }

.about-text a {
    color: var(--text-emphasis);
    border-bottom: 0.5px solid var(--text-emphasis);
    }

.about-text a:hover {
    border-bottom-color: var(--text-emphasis);
    }



/* --------- WORK PAGE -------------------------------------------------------------------------------- */

body.work main {
    padding: 0 0 3rem;
    }

.work-grid {
    display: flex;
    flex-direction: column;
    gap: calc(var(--row-gap) * 2);
    }

.work-project {
    display: flex;
    flex-direction: column;
    gap: 0;
    }

.work-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--gap);
    align-items: start;
    }

.work-caption {
    padding: 0.55rem 0 0;
    line-height: var(--line-height-body);
    }

.work-caption .cd-title {
    display: block;
    color: var(--text-emphasis);
    margin-bottom: 0.4rem;
    }

.work-caption .cd-commentary {
    margin-bottom: 0.4rem;
    }

.work-caption .cd-category {
    font-size: var(--font-size-alt);
    }



/* --------- ARTIFAX PAGE ----------------------------------------------------------------------------- */

body.artifax main {
    padding: 0 0 3rem;
    }

.row-section { margin-bottom: var(--row-gap); }

.row-section + .row-section { margin-top: calc(var(--row-gap) * 2); }

.row-subheadline {
    letter-spacing: 0.18em;                     /* explicit override — not global */
    text-transform: uppercase;
    font-weight: 400;
    color: var(--text-emphasis);
    margin-bottom: 1rem;
    }

.cd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--gap);
    align-items: start;
    }

.cd-card { display: contents; }

.cd-card figure {
    display: grid;
    grid-template-rows: auto 1fr;
    margin: 0;
    }

.cd-card figcaption {
    padding: 0.55rem 0 1.5rem;
    line-height: var(--line-height);
    align-self: start;
    }

.cd-thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--thumb-bg);
    }

.cd-thumb img {
    aspect-ratio: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    opacity: 0;
    }

.cd-thumb img.loaded { opacity: 1; }

.cd-thumb:hover img { transform: scale(1.12); }

.cd-thumb::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Ccircle cx='6.5' cy='6.5' r='4'/%3E%3Cline x1='10' y1='10' x2='14' y2='14'/%3E%3C/svg%3E") center/14px no-repeat;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 2;
    }

.cd-thumb:hover::after { opacity: 1; }

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--lightbox-bg);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    }

#lightbox.open { display: flex; }

#lightbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: min(90vw, 1200px);
    max-height: 90vh;
    }

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    animation: lb-in 0.25s ease;
    cursor: zoom-out;
    }

@keyframes lb-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
    }

#lightbox-caption {
    font-size: var(--font-size);
    letter-spacing: 0.05em;                     /* explicit override — not global */
    color: var(--lightbox-caption);
    text-align: center;
    padding-top: 0.5rem;
    }

#lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: 0.5px solid var(--nav-border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.15s;
    }

#lightbox-close:hover { opacity: 1; color: var(--text-emphasis); }

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0.5px solid var(--nav-border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.15s;
    }

.lightbox-nav:hover { opacity: 1; color: var(--text-emphasis); }
#lightbox-prev { left: 1.25rem; }
#lightbox-next { right: 1.25rem; }
.lightbox-nav:disabled { opacity: 0.2; cursor: default; }

.placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--placeholder-bg);
    font-size: 0.65rem;
    color: var(--placeholder-text);
    letter-spacing: 0.06em;                     /* explicit override — not global */
    }



.secret {
    font-size: var(--font-size-alt);
    color: var(--bg);
    user-select: text;
    }



/* --------- HOME PAGE -------------------------------------------------------------------------------- */

body.home {
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
    }

.home-logo {
    height: 80px;
    width: auto;
    margin-bottom: 0.75rem;
    }

.name {
    position: relative;
    cursor: pointer;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    }

/* Strip default link styling from name wrapper */
a:has(.name) {
    text-decoration: none;
    color: inherit;
    display: contents;
    }

.name svg {
    display: block;
    height: 145px !important;
    width: auto !important;
    max-width: 90vw;
    }

.name .short-name,
.name .full-name {
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    }

.name .full-name {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    }

.name .short-name { opacity: 1; }
.name:hover .short-name { opacity: 0; }
.name:hover .full-name { opacity: 1; }

/* Glitch forced states — override hover with higher specificity */
.name.show-full .short-name,
.name.show-full:hover .short-name { opacity: 0; }
.name.show-full .full-name,
.name.show-full:hover .full-name  { opacity: 1; }
.name.show-short .short-name,
.name.show-short:hover .short-name { opacity: 1; }
.name.show-short .full-name,
.name.show-short:hover .full-name  { opacity: 0; }

.copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-align: center;
    margin-top: 2rem;
    padding: 0 2.5rem;
    }



/* --------- RESPONSIVE ------------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    figure { margin-bottom: 7.5rem; }
    .caption { padding-right: 0; }
    }

@media (max-width: 768px) {
    .cd-grid { grid-template-columns: repeat(2, 1fr); }
    .work-images { grid-template-columns: repeat(2, 1fr); }
    .about-text { width: 100%; }
    .header-subheadline,
    .header-intro { width: 100%; }
    }

@media (max-width: 600px) {
    .cd-grid { grid-template-columns: 1fr; }
    .work-images { grid-template-columns: 1fr; }
    .copyright-notice { display: block; margin-top: 0.25rem; }
    .name svg {
        height: auto !important;
        width: 90vw !important;
        }
    .name { height: auto; }
    .copyright { gap: 0.5rem; }
    body.inner header {
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        width: 90vw;
        }
    body.artifax header { padding: 2rem 0; }
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        }
    .header-subheadline,
    .header-intro { width: 100%; }
    }



/* ========= Steve Smith CSS v13 ====================================================================== */
