/*
Theme Name: JoyceVerse Portfolio
Theme URI: https://joyceverse.com
Author: Joyce Jelagat
Description: A modern, responsive portfolio theme for animators and creative professionals. Features a single-page design with smooth scrolling, animated galleries, and contact form integration. Perfect for showcasing 3D animations, motion graphics, and creative work.
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: joyce-portfolio
Tags: portfolio, animation, creative, responsive, one-page, dark-theme, custom-post-types
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

:root {
    --bg: #0f1115;
    /* base background */
    --panel: #141821;
    /* card/nav background */
    --muted: #8e97a3;
    /* subdued text */
    --text: #eef2f8;
    /* primary text */
    --brand: #9b87f5;
    /* accent */
    --brand-2: #5eead4;
    /* secondary accent */
    --ring: 0 0 0 3px rgba(155, 135, 245, .25);
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: linear-gradient(180deg, #0d0f13, #0f1115 40%, #0b0e12 100%);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

img,
video {
    max-width: 100%;
    display: block
}

.container {
    width: min(1200px, 95vw);
    margin-inline: auto;
    padding-inline: clamp(1rem, 2.5vw, 2rem);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid #2a2f3a;
    color: var(--text);
    background: linear-gradient(180deg, #1b2030, #121827);
    padding: .9rem 1.2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: .2s transform, .2s box-shadow;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45)
}

.btn.primary {
    background: linear-gradient(180deg, #7c6ff1, #6ee7d2);
    color: #0c1020;
    border: none;
    font-weight: 700
}

/* NAV */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(120%) blur(8px);
    background: rgba(10, 12, 18, .6);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700
}

.brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: #2a2f3a
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0
}

/* Hide regular nav on mobile by default */
@media (max-width: 768px) {
    .nav-menu ul {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }
}

nav a {
    padding: .6rem .9rem;
    border-radius: 10px;
    color: var(--muted)
}

nav a:hover,
nav a.active {
    color: var(--text);
    background: #1a2030
}

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

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    position: relative;
}

/* Style View Reel button when inline with nav items */
.nav-menu li .btn.primary {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
    display: block;
}

.mobile-menu-toggle:hover span {
    background: var(--brand);
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        background: rgba(20, 24, 33, 0.95);
        backdrop-filter: saturate(120%) blur(20px);
        border-left: 1px solid rgba(155, 135, 245, 0.2);
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
        z-index: 100;
        padding: 70px 0 30px;
        box-shadow: -8px 0 25px rgba(0, 0, 0, 0.4);
        overflow-y: auto;
    }

    .nav-menu.mobile-open {
        display: block;
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0 24px;
        list-style: none;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        position: relative;
    }

    .nav-menu li:last-child {
        border-bottom: none;
        margin-top: 8px;
    }

    .nav-menu a {
        display: block;
        padding: 16px 0;
        font-size: 1rem;
        font-weight: 500;
        border-radius: 0;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        color: var(--muted);
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: transparent;
        color: var(--brand);
        padding-left: 12px;
        transform: translateX(4px);
    }

    .nav-menu a:hover::before,
    .nav-menu a.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 20px;
        background: linear-gradient(180deg, var(--brand), var(--brand-2));
        border-radius: 2px;
        opacity: 0;
        animation: slideIn 0.3s ease forwards;
    }

    @keyframes slideIn {
        to {
            opacity: 1;
        }
    }

    /* Hamburger animation */
    .mobile-menu-toggle[aria-expanded="true"] span:first-child {
        transform: rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .mobile-menu-toggle[aria-expanded="true"] span:last-child {
        transform: rotate(-45deg);
    }

    /* Style View Reel button in mobile menu */
    .nav-menu li .btn.primary {
        margin: 0;
        margin-top: 12px;
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
        padding: 12px 20px;
        border-radius: 10px;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(155, 135, 245, 0.3);
        transition: all 0.3s ease;
    }

    .nav-menu li .btn.primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(155, 135, 245, 0.4);
    }
}

/* HERO */
.hero {
    position: relative;
    padding: clamp(60px, 8vw, 100px) 0 clamp(40px, 6vw, 60px);
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    width: 100%;
}

.hero h1 {
    font-family: Poppins, Inter, sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1.1;
    margin: 0 0 12px
}

.hero p {
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.1rem);
    margin: 0 0 clamp(16px, 3vw, 24px);
    line-height: 1.7;
    max-width: 65ch;
}

.hero .cta {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #0c1020;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    padding: .4rem .7rem;
    border-radius: 999px;
    font-weight: 700
}

.reel {
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    border: 1px solid #263042;
    background: #0b0e12;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
}

.reel .placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: .95rem
}

/* SECTIONS */
section {
    padding: clamp(50px, 8vw, 80px) 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    width: 100%;
}

section h2 {
    font-family: Poppins, Inter, sans-serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    margin: 0 0 10px
}

.sub {
    color: var(--muted);
    margin: 0 0 clamp(20px, 3vw, 28px);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.6;
    max-width: 70ch;
}

/* ABOUT */
.about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
}

.card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 28px);
    box-shadow: var(--shadow);
    width: 100%;
    height: fit-content;
}

.skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem
}

.chip {
    background: #1a2030;
    border: 1px solid #2a3346;
    border-radius: 999px;
    padding: .5rem .8rem;
    font-size: .9rem;
    color: #dbe4f3
}

/* WORK */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
}

.work-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    width: 100%;
    height: 100%;
}

.work-thumb {
    aspect-ratio: 16/9;
    background: #0b0e12;
    display: grid;
    place-items: center;
    color: var(--muted);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.work-body {
    padding: clamp(14px, 2vw, 20px);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-title {
    font-weight: 700;
    margin: 0 0 6px
}

.work-meta {
    font-size: .9rem;
    color: var(--muted)
}

/* WORK IN PROGRESS */
.wip-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.wip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
    margin-top: clamp(1.25rem, 2.8vw, 2rem);
}

.wip-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wip-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
}

s .wip-media {
    aspect-ratio: 4 / 3;
    background: #0b0e12;
    display: block;
    overflow: hidden;
}

.wip-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.05) contrast(1.02);
    transition: transform 0.5s ease;
}

.wip-card:hover .wip-media img {
    transform: scale(1.03);
}

.wip-body {
    padding: clamp(14px, 2vw, 20px);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wip-body h3 {
    margin: 0;
    font-size: 1.05rem;
}

.wip-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* PROCESS */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
}

.step {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    padding: clamp(16px, 2.5vw, 22px);
    width: 100%;
    height: fit-content;
}

.step h3 {
    margin: 0 0 6px;
    font-size: 1.05rem
}

.step p {
    margin: 0;
    color: var(--muted)
}

/* JOURNAL */
.posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
}

.post {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    padding: clamp(16px, 2.5vw, 22px);
    width: 100%;
    height: fit-content;
}

.post h3 {
    margin: 0 0 6px
}

.post p {
    margin: 0;
    color: var(--muted)
}

/* CONTACT */
form {
    display: grid;
    gap: clamp(12px, 2vw, 16px);
    max-width: min(720px, 100%);
    width: 100%;
}

label {
    font-size: .95rem;
    color: #dbe4f3
}

input,
textarea {
    width: 100%;
    background: #0e1422;
    color: var(--text);
    border: 1px solid #2a3346;
    border-radius: 12px;
    padding: 12px
}

input:focus,
textarea:focus {
    outline: none;
    box-shadow: var(--ring);
    border-color: #54608a
}

/* FOOTER */
footer {
    padding: 36px 0;
    color: var(--muted);
    text-align: center
}

/* UTIL */
.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.center {
    display: grid;
    place-items: center
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .container {
        width: min(1000px, 95vw);
    }
}

@media (max-width: 960px) {
    .container {
        width: min(900px, 95vw);
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts {
        grid-template-columns: 1fr 1fr;
    }

    .work-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        width: 95vw;
        padding-inline: 1rem;
    }

    .hero {
        min-height: 50vh;
        padding: clamp(40px, 6vw, 60px) 0;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .hero .cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero .cta .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 620px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu:not(.mobile-open) ul {
        display: none
    }

    .container {
        padding-inline: 0.75rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .posts {
        grid-template-columns: 1fr;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .about {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 16px;
    }

    .work-body {
        padding: 12px;
    }

    .step,
    .post {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .container {
        padding-inline: 0.5rem;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .hero .cta {
        gap: 0.5rem;
    }

    .card,
    .step,
    .post {
        padding: 12px;
    }

    .work-body {
        padding: 10px;
    }
}