/* ==========================================================================
   Marc Kerstein — style3.css (2026 refresh)
   Replaces: style2.css + style2_dark.css + margins.css
   ========================================================================== */

/* ---- Reset ---- */
a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote::after, blockquote::before, q::after, q::before {
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ---- Design tokens ---- */
:root {
    --accent: rgb(238, 104, 108);
    --accent-strong: rgb(224, 82, 87);
    --accent-soft: rgba(238, 104, 108, 0.09);
    --accent-softer: rgba(238, 104, 108, 0.18);

    /* Dark, site-wide — matches the portfolio page */
    --bg: rgb(10, 10, 12);
    --text: rgb(242, 242, 244);
    --text-soft: rgba(242, 242, 244, 0.62);
    --surface: rgb(22, 22, 25);
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --header-bg: rgba(20, 20, 23, 0.72);
    --accent-soft: rgba(238, 104, 108, 0.14);
    --accent-softer: rgba(238, 104, 108, 0.26);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.5);
    --shadow-header: 0 6px 30px rgba(0, 0, 0, 0.4);

    --font-display: "Space Grotesk", "Exo 2", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "DM Sans", "Inter", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;

    --radius-card: 18px;
    --radius-hero: 28px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    box-sizing: border-box;
    font-style: normal;
    font-size: 1em;
    line-height: 1.62;
    font-family: var(--font-body);
    font-kerning: auto;
    font-optical-sizing: auto;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    /* faint portfolio-style glow behind the top of every page */
    background-image: radial-gradient(90% 42rem at 50% -10rem, rgba(238, 104, 108, 0.07), transparent 70%);
    background-repeat: no-repeat;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    padding-bottom: 0;
}

@view-transition {
    navigation: auto;
}

#container {
    width: 90%;
    margin: 100px 5px 0;
}

/* ---- Typography ---- */
p, footer li {
    margin: 20px auto 0;
    width: 100%;
    font-weight: 400;
    font-family: var(--font-body);
    letter-spacing: 0.005em;
}

#desc p {
    max-width: 70ch;
}

p a {
    letter-spacing: 0.005em;
    font-weight: 480;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(238, 104, 108, 0.4);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.3s var(--ease-out), text-decoration-color 0.3s var(--ease-out);
}

p a:hover {
    color: var(--accent-strong);
    text-decoration-color: var(--accent);
}

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

strong, b {
    font-weight: 600;
}

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

i {
    font-style: italic;
}

u {
    text-decoration: underline;
}

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

h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.3;
}

h2 {
    font-weight: 600;
    text-align: center;
    padding-top: 12px;
    font-size: clamp(1.4em, 1.2em + 1vw, 1.7em);
    letter-spacing: -0.015em;
}

h4 {
    font-weight: 600;
    text-align: left;
    padding-top: 25px;
    font-size: 1.2em;
    letter-spacing: -0.01em;
    margin-bottom: -12px;
}

h3 {
    text-align: center;
    padding-top: 8px;
}

a:hover {
    text-decoration: none;
}

.noline, .noline:hover {
    text-decoration: none;
    font-style: normal;
    cursor: text;
    border: medium;
    transition: none;
    color: inherit;
    font-weight: inherit;
    display: inline;
    background: none;
    padding: inherit !important;
}

.url {
    display: block;
    margin: 10px auto;
    text-align: center;
}

.explainimg {
    display: block;
    width: 300px;
    max-width: 95%;
    margin: 10px auto;
    border-radius: 12px;
}

.appstore {
    display: block;
    width: 200px;
    max-width: 95%;
    margin: 10px auto;
    text-decoration: none;
}

.appstore img {
    width: 100%;
}

.flip {
    transform: scaleX(-1);
}

.indent {
    padding-left: 30px;
}

/* ---- Header ---- */
#header-container {
    height: auto;
    width: calc(90% - 50px);
    padding: 16px 0;
    z-index: 999;
    top: 12px;
    border-radius: 100px;
    overflow: hidden;
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
    position: fixed;
    background-color: var(--header-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-header);
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    width: calc(100% - 44px);
}

h1 {
    display: block;
    font-size: 1.55em;
    font-family: var(--font-display);
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

h1 a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.03em;
    border-radius: 100px;
}

#menu li {
    display: inline-block;
    font-size: 0.95em;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-left: 4px;
}

#menu li a {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.88em;
    letter-spacing: 0.1em;
    margin-left: 14px;
    padding-bottom: 3px;
    position: relative;
    transition: color 0.3s var(--ease-out);
}

#menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: calc(100% - 0.1em);
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s var(--ease-out);
}

#menu li a:hover {
    color: var(--text-soft);
}

#menu li a:hover::after,
#menu li a.active::after {
    transform: scaleX(1);
}

#menu li a.active {
    color: var(--text);
    font-weight: 600;
}

/* Contact CTA in the header */
#menu li a.cta {
    background-color: var(--accent);
    color: #fff;
    padding: 8px 16px 7px;
    border-radius: 100px;
    transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

#menu li a.cta::after {
    content: none;
}

#menu li a.cta:hover {
    background-color: var(--accent-strong);
    color: #fff;
    transform: translateY(-1px);
}

/* ---- Heroes / images ---- */
#rollingimage {
    width: 90%;
}

#rollingimage, #rollingimage img, #staticimage, #staticimage img, #heros, .app_hero {
    display: block;
}

#staticimage, #staticimage img {
    width: 100%;
}

#rollingimage, #rollingimage img, #staticimage, #staticimage img {
    max-width: 960px;
    margin: 0 auto;
    border-radius: var(--radius-hero);
    box-shadow: var(--shadow-card);
}

.app_hero_half a, .app_hero_full a, .app_hero a {
    font-size: 0;
}

.app_hero_half {
    width: calc(50% - 20px);
    display: inline-block;
    vertical-align: top;
    height: 42.6vw;
    margin: 0 20px 40px 0;
    overflow: hidden;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    max-height: 92vh;
    background-size: auto 100%;
    transition: background-size 0.5s var(--ease-out);
    border-radius: var(--radius-hero);
}

.app_hero_half:nth-child(2n) {
    margin-right: 0;
    margin-left: 20px;
}

.app_hero_full {
    width: calc(100% - 10px);
    display: inline-block;
    vertical-align: top;
    height: 67.6vw;
    margin: 0 5px 5px;
    overflow: hidden;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    background-size: 100% auto;
    transition: background-size 0.5s var(--ease-out);
    max-height: calc(-35px + 87vh);
    border-radius: var(--radius-hero);
}

.app_hero {
    height: 77.6vw;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    max-height: 92vh;
}

.amalgam_hero { background-image: url("../images/heros2/amalgam.jpg?1"); }
.wikitest_hero { background-image: url("../images/heros2/wikitest.jpg?1"); }
.onyx_hero { background-image: url("../images/heros2/onyx.jpg?1"); }
.dfbx_hero { background-image: url("../images/heros2/dfbx.jpg?1"); }
.earworm_hero { background-image: url("../images/heros2/earworm.jpg"); }
.xeno_hero { background-image: url("../images/heros2/xeno.jpg"); }
.webfx_hero { background-image: url("../images/heros2/webfx.jpg"); }
.bioswap_hero { background-image: url("../images/heros/bioswap.jpg"); }
.cardtrack_hero { background-image: url("../images/heros/cardtrack.jpg"); }
.streetspro_hero { background-image: url("../images/heros2/streets-pro.jpg"); }
.pluma_hero { background-image: url("../images/heros2/pluma.jpg"); }
.bridge_hero { background-image: url("../images/heros2/bridge.jpg"); }
.inertiapro_hero { background-image: url("../images/heros2/inertia-pro.jpg?4"); }
.timedout_hero { background-image: url("../images/heros2/timedout.jpg?2"); }
.iso_hero { background-image: url("../images/heros2/iso.jpg?2"); }
.diverter_hero { background-image: url("../images/heros2/diverter.jpg?1"); }
.astral_hero { background-image: url("../images/heros2/astral.jpg?1"); }
.subliminal_hero { background-image: url("../images/heros2/subliminal.jpg?1"); }
.timeline_hero { background-image: url("../images/heros/timeline.jpg?1"); }
.dfb_hero { background-image: url("../images/heros/dfb.jpg?1"); }

.hero_icon {
    position: absolute;
    right: 30px;
    bottom: 30px;
    width: 90px;
    text-align: center;
}

.hero_icon img {
    filter: drop-shadow(rgba(0, 0, 0, 0.25) 0 0 25px);
    width: 65px;
}

.app_hero_half a, .app_hero_full a {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 99;
    background-color: rgba(0, 0, 0, 0);
    transition: 0.4s;
}

.app_hero_half a:hover, .app_hero_full a:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.app_hero_half:hover {
    background-size: auto 108%;
}

.app_hero_full:hover {
    background-size: 108% auto;
}

.hero_icon p {
    line-height: initial;
    margin-top: -5px;
    font-weight: 600;
    color: black;
    transition: 0.4s;
    opacity: 1;
}

.white p {
    color: white;
}

#mwfximage, #mwfximage img {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

#desc {
    max-width: 90%;
    width: 960px;
    margin: 0 auto;
}

sup {
    vertical-align: super;
    font-size: 0.8em;
}

sup a {
    font-style: normal;
    text-decoration: none;
}

footer {
    margin-top: 2em;
    border-top: 1px solid var(--border);
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--text-soft);
}

footer ol {
    list-style: inside decimal;
}

footer ol li {
    margin-top: 8px;
}

/* ---- Section headings ---- */
.appheader, .year {
    display: block;
    margin: 28px auto 10px;
    max-width: 90%;
    width: 960px;
}

.appheader h3, .year h3 {
    font-family: var(--font-display);
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text);
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 16px;
}

.appheader h3::after, .year h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---- App grids ---- */
.apps {
    margin: 0 auto;
    max-width: 90%;
    width: 960px;
    padding: 5px 0 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px 10px;
    align-items: start;
}

.shortcuts {
    max-width: 90%;
    width: 960px;
}

.app {
    width: auto;
    text-align: center;
    transition: opacity 0.4s;
    margin: 10px 0;
}

.center {
    display: block;
    margin: 0 auto;
}

.textcenter {
    text-align: center;
}

.title p {
    text-align: center;
}

.smallapp, .timelineapp {
    width: auto;
}

.app img {
    will-change: filter, transform;
    transition: filter 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    margin: 0 auto;
    display: block;
    width: 76%;
    max-width: 150px;
    filter: drop-shadow(rgba(0, 0, 0, 0.18) 0 8px 20px);
}

.app:hover img {
    filter: drop-shadow(rgba(0, 0, 0, 0.35) 0 10px 22px);
    transform: translateY(-3px) scale(1.02);
}

.app p {
    font-family: var(--font-display);
    font-size: 17px;
    margin: 10px 0 0;
    width: 100%;
    word-break: break-word;
    hyphens: auto;
    font-weight: 500;
}

.app a {
    text-decoration: none;
    font-weight: 300;
    color: var(--text);
}

.comingsoon, .comingsoon:hover {
    opacity: 0.2 !important;
}

/* ---- Clients ---- */
#clients {
    text-align: center;
    width: 100%;
    box-sizing: content-box;
    position: relative;
    height: auto;
    padding-bottom: 0;
}

.client {
    display: inline-block;
    width: 28%;
    position: relative;
    margin: 10px 12px;
    text-align: center;
    vertical-align: top;
    transition: opacity 0.4s;
}

.client:hover {
    opacity: 0.75;
}

.client img {
    margin: 0 auto;
    display: block;
    width: 100%;
}

.client p {
    font-size: 0.84em;
    margin: 10px 0 0;
    width: 100%;
}

.client a {
    text-decoration: none;
    font-weight: 300;
    color: rgb(255, 255, 255);
}

.subyear {
    display: block;
    width: 90%;
    margin: 0 auto;
}

.portfolioapps {
    width: 92%;
    max-width: 960px;
}

.portfolioapps .timelineapp {
    width: auto;
    padding: 10px 15px;
}

.timelineapp p {
    margin-top: 5px;
    line-height: normal;
}

p .detail {
    display: block;
    font-size: 15px;
    line-height: 18px;
    margin-top: 3px;
    color: var(--text-soft);
    opacity: 1;
}

/* ---- Poster cards (work page) ---- */
.posters {
    margin: 0 auto;
    height: auto;
    padding-top: 5px;
    max-width: 95%;
    width: 960px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 24px;
    align-items: stretch;
    position: relative;
}

.poster {
    width: auto;
    position: relative;
    margin: 0;
    text-align: center;
    display: flex;
    flex-flow: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.poster img {
    margin: 0 auto;
    display: block;
    width: 100%;
    aspect-ratio: 27 / 40;
    object-fit: cover;
}

.poster:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.posterdetails {
    background-color: transparent;
    padding: 14px 4px;
    vertical-align: bottom;
    display: flex;
    align-self: end;
    width: 100%;
    flex: 1 1 0%;
    justify-content: space-between;
    flex-direction: column;
}

.poster p {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 5px;
    width: 100%;
    text-align: left;
    padding: 3px 12px;
    height: auto;
    color: var(--text);
    line-height: 1.3;
}

.posterinfo, .posterlocation, .posterdate {
    font-weight: 400;
    display: block;
    font-size: 14px;
    line-height: 18px;
    margin-top: 2px;
    color: var(--text-soft);
    text-align: left;
    padding: 3px 12px;
}

.posterinfo::before, .posterlocation::before, .posterdate::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 7px;
    vertical-align: -1.5px;
    background-color: currentColor;
    -webkit-mask: var(--icon) no-repeat center / contain;
    mask: var(--icon) no-repeat center / contain;
}

.posterinfo::before {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='15' rx='2'/%3E%3Cpolyline points='17 2 12 7 7 2'/%3E%3C/svg%3E");
}

.posterlocation::before {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.posterdate::before {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.poster a {
    text-decoration: none;
    font-weight: 300;
    color: rgb(255, 255, 255);
}

/* ---- Payment / buy bar ---- */
#apple-pay-button {
    background-color: white;
    display: none;
    padding: 10px 0;
    background-image: -webkit-named-image(apple-pay-logo-black);
}

#apple-pay-button:hover {
    background-color: rgb(238, 238, 238);
}

#stripe-button {
    color: white;
    background-color: rgb(42, 155, 225);
    font-size: 19px;
}

#stripe-button:hover {
    background-color: rgb(76, 168, 230);
}

#paypal-button {
    background-color: rgb(0, 112, 186);
    color: white;
    font-size: 19px;
    text-decoration: none;
    font-weight: 500;
    line-height: 200%;
}

.points {
    font-family: var(--font-body);
    list-style-position: inside;
}

.points li {
    list-style-type: disc;
    padding-left: 15px;
}

.payment-success {
    font-family: var(--font-body);
    text-align: center;
    background-color: rgb(11, 166, 16);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    border-radius: 8px;
    padding: 6px 10px;
    width: 520px;
    max-width: 100%;
    margin: 10px auto;
    text-shadow: rgba(0, 0, 0, 0.7) 0 0 2px;
}

.buybar {
    width: 100%;
    padding: 32px 0;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 0;
    bottom: 0;
    background-color: rgba(10, 10, 12, 0.78);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    flex-basis: auto;
}

.buybar button, .buybar a {
    background-size: 100% 100%;
    background-origin: content-box;
    background-repeat: no-repeat;
    width: 40%;
    max-width: 230px;
    height: 42px;
    border: medium;
    border-radius: 14px;
    margin: 9px 3%;
    display: inline-block;
    padding: 0;
    cursor: pointer;
    transition: transform 0.25s var(--ease-out), opacity 0.25s;
}

.buybar button:hover, .buybar a:hover {
    transform: translateY(-1px);
}

.buybarsub {
    display: flex;
    flex-direction: row;
    text-align: center;
    align-content: center;
    align-items: center;
    width: 500px;
    max-width: 100%;
}

.buybarsub button {
    margin: 10px auto auto !important;
    font-size: 0.9em !important;
}

.downloadpdflink {
    width: 100%;
    display: block;
    margin: 10px auto;
}

.downloadpdflink, .downloadpdflink:hover {
    text-decoration: none;
    border-bottom: none;
}

.downloadpdflink img {
    width: 270px;
    margin: 0 auto;
    max-width: 90%;
    display: block;
}

.shortcutAppLink {
    border: medium;
    display: block;
    margin: 3px auto;
    border-radius: 12px;
    color: rgb(28, 30, 32);
    padding: 6px 8px;
    max-width: 90%;
    width: 410px;
    font-style: normal;
    background-color: rgb(186, 188, 202);
}

.shortcutAppLink:hover {
    background-color: rgba(186, 188, 202, 0.9);
    border: medium;
    padding: 6px 8px;
}

.smallprint {
    font-style: italic;
    font-size: 0.85em;
    line-height: 1.2em;
    opacity: 0.85;
}

/* ---- Pull quote ---- */
.pullquote {
    display: block;
    margin: 44px auto 12px;
    max-width: 90%;
    width: 960px;
    text-align: center;
    padding: 34px 26px 30px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.pullquote::before {
    content: "\201C";
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3em;
    line-height: 0.5;
    color: var(--accent);
    margin-bottom: 14px;
}

.pullquote p {
    font-family: var(--font-display);
    font-size: clamp(1.5em, 1.2em + 2vw, 2.1em);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
}

.pullquote cite {
    display: block;
    margin-top: 14px;
    font-style: normal;
    font-family: var(--font-body);
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8em;
}

.pullquote cite::before {
    content: "— ";
    color: var(--accent);
}

/* ---- Contact form ---- */
.contact-form {
    max-width: 90%;
    width: 560px;
    margin: 24px auto 0;
    display: grid;
    gap: 16px;
}

.contact-form label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background-color: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    justify-self: center;
    background-color: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 100px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.contact-form button:hover {
    background-color: var(--accent-strong);
    transform: translateY(-1px);
}

.contact-alt {
    text-align: center;
    margin-top: 30px;
    color: var(--text-soft);
    font-size: 0.95em;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-alert {
    max-width: 90%;
    width: 560px;
    margin: 20px auto 0;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background-color: var(--surface);
}

.form-alert.success {
    border-color: rgba(80, 200, 120, 0.5);
}

.form-alert.error {
    border-color: rgba(238, 104, 108, 0.6);
}

/* ---- Footer ---- */
#sitefooter {
    margin: 64px auto 26px;
    max-width: 90%;
    width: 960px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-name {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.15em;
    margin: 0;
    color: var(--text);
}

.footer-tag {
    color: var(--text-soft);
    margin: 6px 0 0;
    max-width: 36ch;
    line-height: 1.5;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.footer-nav li {
    margin: 0;
    width: auto;
}

.footer-nav a {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.8em;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--accent);
}

#sitefooter #footer {
    margin: 24px 0 0;
    justify-content: flex-start;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 0;
    color: var(--text-soft);
    font-size: 0.9em;
}

.footer-legal a {
    color: var(--text-soft);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--accent);
}


#footer {
    margin: 48px 0;
    text-align: center;
    font-size: 1.9em;
    display: flex;
    justify-content: center;
    gap: 4px;
}

#footer a {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-size: 0.68em;
    color: white;
    width: 44px;
    height: 44px;
    transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    background-color: var(--accent-soft);
    background-color: color-mix(in srgb, var(--text) 5%, transparent);
    line-height: 44px;
    border-radius: 22px;
    margin: 0 4px;
}

#footer a:hover {
    transform: translateY(-3px);
    background-color: color-mix(in srgb, var(--text) 9%, transparent);
}

#footer a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    vertical-align: middle;
    margin-top: -3px;
}

#footer a.twitter { color: rgb(29, 161, 242); }
#footer a.mastodon { color: rgb(99, 100, 255); }
#footer a.facebook { color: rgb(44, 99, 227); }
#footer a.instagram { color: rgb(193, 53, 132); }

#footer a.contact {
    font-size: 0.55em;
    color: var(--text);
}

/* optical centring: the plane glyph leans top-right */
#footer a.contact svg {
    transform: translate(-1.5px, 0.5px);
}

/* ---- Misc ---- */
.sss {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-hero);
    box-shadow: var(--shadow-card);
}

.ssslide {
    display: block;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.ssslide:first-child {
    position: relative;
}

.ssslide + .ssslide {
    position: absolute;
    top: 0;
    left: 0;
}

.ssslide.active {
    opacity: 1;
}

select {
    padding: 6px 32px 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    margin: 0 5px 5px 0;
    font-family: var(--font-body);
    font-size: 0.95em;
    background-color: var(--surface);
    color: var(--text);
}

.animate-in {
    animation: 0.5s var(--ease-out) fadeIn;
}

.animate-out {
    transition: opacity 0.5s;
    opacity: 0;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Scroll-in reveal (classes applied by scripts.js; no-JS pages stay visible) */
.reveal {
    opacity: 0;
}

.reveal-in {
    opacity: 1;
    animation: revealUp 0.6s var(--ease-out) backwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Legacy compatibility for per-page markup that sets its own colours */
.container-fluid, h2, h3 {
    color: var(--text) !important;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- Responsive ---- */
@media screen and (max-width: 650px) {
    .apps {
        margin-top: 10px;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .portfolioapps, .posters, .subyear, .year {
        width: 100%;
    }

    .portfolioapps .timelineapp {
        padding: 10px;
    }

    .posters {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .smallapp p, .timelineapp p {
        font-size: 12px;
    }

    .portfolioapps .timelineapp p {
        font-size: 18px;
    }

    .client {
        width: 42%;
        margin: 8px 10px;
    }

    .app:hover, .client:hover {
        opacity: 1;
    }

    .app p {
        margin-top: 3px;
    }

    .client p {
        font-size: 0.74em;
        line-height: 1.1em;
        margin-top: 8px;
    }

    p {
        font-size: 1.05em;
    }

    .points li {
        font-size: 1.05em;
    }

    #desc {
        min-height: 0;
    }
}

@media screen and (max-width: 800px) {
    #header-container {
        width: calc(100% - 20px);
        top: 8px;
        padding: 12px 0;
        border-radius: 30px;
    }

    #header {
        width: calc(100% - 30px);
    }

    #container {
        margin-top: 90px;
    }

    h1 {
        font-size: 1.4rem;
        line-height: 1.4rem;
    }

    #menu li {
        margin: 0;
        min-width: 0;
    }

    #menu li:first-of-type {
        margin-left: 0;
    }

    #menu li:last-of-type {
        margin-right: 0;
        border-right: 0;
    }

    #menu li a {
        display: inline-block;
        line-height: 1;
        padding: 9px 8px 7px calc(8px + 0.1em);
        border-radius: 9px;
        font-size: 0.8rem;
        margin-left: 4px;
        font-weight: 500;
    }

    #menu li a::after {
        content: none;
    }

    #menu li a.active {
        color: var(--accent-strong);
        background-color: var(--accent-soft);
    }

    #menu li a.cta {
        color: #fff;
    }
}

@media screen and (max-width: 585px) {
    .sss {
        border-radius: 24px;
    }

    #container {
        width: 100%;
    }

    .app_hero_half {
        width: calc(100% - 20px);
        height: 85.6vw;
        margin: 0 10px 15px;
        border-radius: 24px;
    }

    .app_hero_half:nth-child(2n) {
        margin-right: 10px;
        margin-left: 10px;
    }

    .poster p {
        font-size: 16px;
    }

    .buybar {
        padding-bottom: 60px;
    }

    .buybar button, .buybar a {
        height: 50px;
    }

    .buybar2 {
        bottom: 80px;
    }

    #paypal-button {
        line-height: 240%;
    }

    #apple-pay-button {
        padding: 14px 0;
    }

    .hero_icon {
        right: 9px;
        bottom: 15px;
        width: 80px;
    }

    .hero_icon img {
        width: 40px;
    }

    .hero_icon p {
        font-size: 0.8em;
    }
}

@media screen and (max-width: 600px) {
    /* Single line at normal sizes; if it genuinely can't fit (e.g. large
       user font settings), the menu wraps below the name instead of clipping.
       Sizes are fluid (vw-based) so text is only as small as the width demands. */
    #header {
        width: calc(100% - 24px);
        flex-wrap: wrap;
        row-gap: 2px;
    }

    h1 {
        font-size: clamp(1.05rem, 0.2rem + 3.1vw, 1.35rem);
        line-height: 1.1;
    }

    #menu {
        text-align: right;
    }

    #menu li a {
        white-space: nowrap;
        font-size: clamp(0.7rem, 0.15rem + 1.9vw, 0.78rem);
        letter-spacing: 0.04em;
        padding: 8px 5px 6px calc(5px + 0.04em);
        margin-left: 0;
    }
}

/* Below this the nav can't share a line with the name without shrinking the
   text uncomfortably, so it becomes a deliberate centred two-row header and
   the type goes back up to a readable size. Em-based so it tracks the user's
   own text size rather than assuming 16px. */
@media screen and (max-width: 30em) {
    #header {
        justify-content: center;
        row-gap: 6px;
    }

    h1 {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    #menu {
        width: 100%;
        text-align: center;
    }

    #menu li a {
        font-size: 0.78rem;
        letter-spacing: 0.06em;
        padding: 8px 7px 6px calc(7px + 0.06em);
        margin-left: 1px;
    }

    /* A pill sitting in a centred row of plain links looks out of place, so the
       CTA drops its background and stays distinct by colour and weight instead */
    #menu li a.cta,
    #menu li a.cta:hover {
        background-color: transparent;
        color: var(--accent);
        font-weight: 700;
        transform: none;
        padding: 8px 7px 6px calc(7px + 0.06em);
    }

    #container {
        margin-top: 132px;
    }
}

@media screen and (max-width: 430px) {
    .hidetext {
        display: none;
    }
}

@media screen and (max-width: 320px) {
    .app p {
        font-size: 17px;
    }
}
