/* ZooQie — portfolio (zooqie.com) */

:root {
    --bg: #1e1d1c;
    --bg-header: rgba(28, 27, 26, 0.95);
    --bg-section: rgba(32, 31, 30, 0.85);
    --bg-card: rgba(36, 35, 34, 0.9);
    --text: #e8e6e3;
    --text-muted: #a39f99;
    --accent: #a78bfa;
    --accent-hover: #c4b5fd;
    --accent-soft: rgba(167, 139, 250, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --border-project: rgba(255, 255, 255, 0.1);
    --radius: 6px;
    --radius-lg: 12px;
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Sans', system-ui, sans-serif;
    --max: 52rem;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.15);
    --shadow-hero: 0 2px 20px rgba(167, 139, 250, 0.12);
}

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

.site-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: transparent;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow-x: clip;
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
    background-color: var(--bg);
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background-color: transparent;
}

/* Symbol layers — full viewport coverage; tile size scales so no 2/3 cutoff */
.symbols-bg-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: visible;
}

.symbols-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100vw;
    min-height: 100vh;
    overflow: hidden;
    opacity: 0.45;
}

.symbols-tile {
    position: absolute;
    left: 0;
    top: 0;
    width: 5200px;
    height: 5200px;
}

.symbols-tile canvas {
    display: block;
    width: 5200px;
    height: 5200px;
}

.symbols-layer-1 .symbols-tile { animation: symbols-drift-1 18s linear infinite; animation-delay: 0s; }
.symbols-layer-2 .symbols-tile { animation: symbols-drift-2 18s linear infinite; animation-delay: -4.5s; }
.symbols-layer-3 .symbols-tile { animation: symbols-drift-3 18s linear infinite; animation-delay: -9s; }
.symbols-layer-4 .symbols-tile { animation: symbols-drift-4 18s linear infinite; animation-delay: -13.5s; }

@keyframes symbols-drift-1 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(8px, 5px); }
    40% { transform: translate(-5px, 10px); }
    60% { transform: translate(9px, -4px); }
    80% { transform: translate(12px, 8px); }
}
@keyframes symbols-drift-2 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-6px, 9px); }
    40% { transform: translate(10px, -5px); }
    60% { transform: translate(-8px, 8px); }
    80% { transform: translate(-10px, 14px); }
}
@keyframes symbols-drift-3 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(5px, -6px); }
    40% { transform: translate(-8px, 5px); }
    60% { transform: translate(4px, 8px); }
    80% { transform: translate(8px, -10px); }
}
@keyframes symbols-drift-4 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-9px, 4px); }
    40% { transform: translate(6px, -9px); }
    60% { transform: translate(-10px, -5px); }
    80% { transform: translate(-14px, 6px); }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius);
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Header — minimal */
.header {
    display: none; /* hidden for now */
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.logo {
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
}

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

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

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

/* Hero — not a card: simple block, bold type */
.hero {
    max-width: var(--max);
    margin: 0 auto 1rem;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.hero-content {
    position: relative;
}

.hero-eyebrow-wrap {
    display: block;
    text-align: center;
    margin-bottom: 0.75rem;
}

/* Wrapper sized to title so description sits below, right-aligned to title */
.hero-title-block {
    display: inline-block;
    text-align: right;
    margin-bottom: 1.5rem;
}

.hero-title-block .hero-description {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin: 0.35rem 0 0;
}

.hero-title-block .hero-title {
    margin: 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: "";
    width: 2rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

.hero-eyebrow::after {
    background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-title {
    margin: 0;
    line-height: 0;
}

.hero-logo {
    display: block;
    max-width: min(360px, 82vw);
    height: auto;
    width: 100%;
}

/* Quote — italic with marks, no card */
.hero-subtitle {
    margin: 0.75rem auto 0;
    max-width: 30ch;
    font-size: 1.05rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.65;
    letter-spacing: 0.02em;
    position: relative;
}

.hero-subtitle::before {
    content: "\201C";
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-style: normal;
    line-height: 1;
    color: var(--accent);
    opacity: 0.55;
    position: absolute;
    left: -0.08em;
    top: -0.1em;
}

.hero-subtitle::after {
    content: "\201D";
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-style: normal;
    line-height: 1;
    color: var(--accent);
    opacity: 0.55;
    position: absolute;
    right: -0.08em;
    bottom: -0.3em;
}

/* Sections */
section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

.section-title {
    margin: 0 0 0.35rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--accent);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
    color: var(--text);
}

.section-subtitle {
    margin: 0.5rem 0 1.5rem;
    padding-left: 0.75rem;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects — card: gradient fill (clip to padding-box), discrete gradient border */
#apps.projects,
#tools.projects {
    padding: 2rem 1.5rem 2.5rem;
    padding-top: 1.75rem;
    margin-bottom: 2rem;
    background: linear-gradient(
        135deg,
        var(--accent-soft) 0%,
        var(--accent-soft) 35%,
        rgba(167, 139, 250, 0.06) 50%,
        rgba(167, 139, 250, 0.02) 65%,
        transparent 85%
    );
    background-clip: padding-box;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    position: relative;
}

#apps.projects::before,
#tools.projects::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(167, 139, 250, 0.05) 50%, transparent 85%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

#apps .section-title,
#tools .section-title {
    margin-bottom: 1.25rem;
}

/* Projects — list with cards */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.project-card:last-child {
    margin-bottom: 0;
}

.project-card:hover {
    background: rgba(42, 41, 40, 0.98);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(167, 139, 250, 0.08);
}

.project-icon-wrap {
    flex-shrink: 0;
    align-self: stretch;
    width: 96px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 3px solid var(--border-project);
    padding-right: 1rem;
}

.project-card:hover .project-icon-wrap {
    border-right-color: var(--accent);
}

.project-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.project-info {
    flex: 1;
    min-width: 0;
    height: 6rem;
    display: flex;
    flex-direction: column;
    padding-left: 0;
}

.project-name {
    margin: 0 0 0.25rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
}

.project-desc {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: grid;
    grid-template-columns: 3.5rem 0.5rem 4.5rem 0.5rem 3.5rem;
    justify-items: center;
    align-items: center;
    gap: 0;
    width: 12.5rem;
    min-width: 12.5rem;
    margin-left: auto;
    margin-right: 0;
    margin-top: auto;
    flex-shrink: 0;
}

.project-year {
    grid-column: 1;
    justify-self: center;
}

.project-meta-sep {
    font-size: 0.7rem;
    color: var(--text-muted);
    user-select: none;
    justify-self: center;
    align-self: center;
}

.project-meta-sep:nth-child(2) {
    grid-column: 2;
}

.project-platform {
    grid-column: 3;
    justify-self: center;
}

.project-meta-sep:nth-child(4) {
    grid-column: 4;
}

.project-cta {
    grid-column: 5;
    justify-self: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-year,
.project-platform {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-align: center;
}

.project-cta-primary {
    color: var(--accent);
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.project-cta-primary:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.project-cta-soon {
    color: var(--text-muted);
    font-weight: 500;
    cursor: default;
    background: rgba(0, 0, 0, 0.06);
}

/* Buttons (e.g. 404) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* CTA / Contact — same card as Apps/Tools: gradient fill (clip), gradient border, no shadow */
.cta {
    padding: 2rem 1.5rem 2.5rem;
    padding-top: 1.75rem;
    margin-bottom: 2rem;
    background: linear-gradient(
        135deg,
        var(--accent-soft) 0%,
        var(--accent-soft) 35%,
        rgba(167, 139, 250, 0.06) 50%,
        rgba(167, 139, 250, 0.02) 65%,
        transparent 85%
    );
    background-clip: padding-box;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    position: relative;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(167, 139, 250, 0.05) 50%, transparent 85%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cta .section-title {
    margin-bottom: 0.5rem;
}

.cta-content {
    text-align: center;
    max-width: 36em;
    margin-left: auto;
    margin-right: auto;
}

.cta-subtitle {
    margin: 0 auto 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cta-email {
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
}

.cta-email a {
    color: var(--accent);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.cta-email a:hover {
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(167, 139, 250, 0.25);
}

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

/* Footer — gradient border on top and left, slightly darker than page */
.footer {
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    background: #1a1918;
    position: relative;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, var(--accent) 35%, var(--accent) 65%, var(--border) 100%);
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.footer a:hover {
    text-decoration: underline;
}

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

/* 404 */
.page-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    padding: 2rem 1.5rem;
}

.section-404 {
    text-align: center;
}

.title-404 {
    margin: 0 0 0.5rem;
    font-family: var(--font-heading);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted);
}

.text-404 {
    margin: 0 0 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Print */
@media print {
    .skip-link { display: none !important; }
    body { background: #fff; color: #111; }
    .header { background: #fff; border-color: #ddd; }
    .footer a, .hero-accent, .project-cta-primary { color: #333; }
}

/* Mobile nav */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    border-radius: var(--radius);
}

.nav-toggle:hover {
    background: var(--border);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 600px) {
    .hide-on-mobile {
        display: none;
    }

    #main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 1.5rem;
        background: var(--bg-header);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease;
    }

    .header.nav-open .nav {
        max-height: 200px;
        opacity: 1;
    }

    .nav a {
        display: block;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .header-inner {
        position: relative;
    }

    .hero {
        padding: 2rem 1.5rem 1.5rem;
    }

    .project-info {
        padding-left: 1rem;
        height: auto;
        min-height: 0;
    }

    .project-desc {
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .project-meta {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        justify-items: start;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        min-width: 0;
        margin-top: 0.5rem;
        margin-left: 0;
        margin-right: 0;
    }

    .project-year {
        grid-column: 1;
        justify-self: start;
    }

    .project-meta-sep {
        display: none;
    }

    .project-platform {
        grid-column: 2;
        justify-self: center;
    }

    .project-cta {
        grid-column: 3;
        justify-self: end;
    }
}

/* Ko-fi floating widget — right on desktop, left on mobile so it isn't cropped */
body .floatingchat-container-wrap,
.floatingchat-container-wrap,
body .floatingchat-container-wrap-mobi,
.floatingchat-container-wrap-mobi {
    left: auto !important;
    right: 1rem !important;
    bottom: 1.5rem !important;
}
body .floating-chat-kofi-popup-iframe,
.floating-chat-kofi-popup-iframe,
body .floating-chat-kofi-popup-iframe-mobi,
.floating-chat-kofi-popup-iframe-mobi {
    left: auto !important;
    right: 1rem !important;
    bottom: 5rem !important;
}
body .floating-chat-kofi-popup-iframe-closer-mobi,
.floating-chat-kofi-popup-iframe-closer-mobi {
    left: auto !important;
    right: 1rem !important;
}

@media (max-width: 768px) {
    body .floatingchat-container-wrap,
    .floatingchat-container-wrap,
    body .floatingchat-container-wrap-mobi,
    .floatingchat-container-wrap-mobi {
        left: 50% !important;
        right: unset !important;
        transform: translateX(-50%) !important;
    }
    body .floating-chat-kofi-popup-iframe,
    .floating-chat-kofi-popup-iframe,
    body .floating-chat-kofi-popup-iframe-mobi,
    .floating-chat-kofi-popup-iframe-mobi {
        left: 50% !important;
        right: unset !important;
        transform: translateX(-50%) !important;
    }
    body .floating-chat-kofi-popup-iframe-closer-mobi,
    .floating-chat-kofi-popup-iframe-closer-mobi {
        left: 50% !important;
        right: unset !important;
        transform: translateX(-50%) !important;
    }
}
