/*
Theme Name: Jatin Mathew Template
Theme URI: https://jatin.tv/
Author: Jatin Gupta
Description: A refined portfolio theme for art direction, CG, VFX, and motion work.
Version: 2.1.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: jatin-mathew-template
*/

:root {
    --background: #0f0f0f;
    --foreground: #f2f2f0;
    --muted: #858585;
    --soft: #181818;
    --line: rgba(242, 242, 240, 0.14);
    --pill: rgba(30, 30, 30, 0.78);
    --accent: #7887ff;
    --accent-ink: #0c102b;
    --canvas: 1024px;
    --copy: 800px;
    --radius: 18px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
    --background: #f2f2ef;
    --foreground: #101010;
    --muted: #696969;
    --soft: #e7e7e3;
    --line: rgba(16, 16, 16, 0.14);
    --pill: rgba(235, 235, 231, 0.8);
    --accent-ink: #f3f5ff;
}

html {
    background: var(--background);
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--background);
    color: var(--foreground);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    transition: background-color 260ms ease, color 260ms ease;
}

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

::selection {
    background: var(--accent);
    color: #0b0d1c;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

figure {
    margin: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--foreground);
    color: var(--background);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-140%);
}

.skip-link:focus {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.site-shell {
    min-height: 100vh;
    overflow: clip;
}

.site-header {
    position: relative;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: min(var(--canvas), calc(100% - 48px));
    margin: 0 auto;
    padding-top: 40px;
}

.site-mark {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--foreground);
    color: var(--background);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.04em;
    transition: transform 380ms var(--ease);
}

.site-mark:hover,
.site-mark:focus-visible {
    outline: none;
    transform: rotate(-5deg) scale(1.04);
}

.site-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.primary-nav {
    position: fixed;
    top: 40px;
    left: 50%;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 48px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--pill);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(18px) saturate(140%);
    transform: translateX(-50%);
}

.primary-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    transition: background-color 180ms ease, color 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a[aria-current="page"] {
    background: var(--foreground);
    color: var(--background);
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
}

.theme-toggle,
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 999px;
    transition: background-color 180ms ease, color 180ms ease, transform 260ms var(--ease), box-shadow 260ms ease;
}

.contact-button svg {
    display: none;
    width: 18px;
    height: 18px;
}

.theme-toggle {
    width: 48px;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: var(--foreground);
    color: var(--background);
    outline: none;
    transform: rotate(12deg);
}

.theme-icon {
    width: 18px;
    height: 18px;
}

.theme-icon-moon {
    display: none;
}

html[data-theme="light"] .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-icon-moon {
    display: block;
}

.contact-button {
    padding: 0 20px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 500;
}

.contact-button:hover,
.contact-button:focus-visible {
    box-shadow: 0 14px 34px rgba(120, 135, 255, 0.3);
    outline: none;
    transform: translateY(-2px);
}

.hero {
    width: min(var(--copy), calc(100% - 48px));
    margin: 112px auto 0;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: clamp(54px, 4.9vw, 72px);
    font-weight: 500;
    letter-spacing: -0.072em;
    line-height: 1;
}

.hero-copy {
    max-width: 620px;
    margin: 30px auto 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.hero-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
    color: var(--foreground);
    font-size: 13px;
}

.hero-links a,
.text-link,
.about-email {
    position: relative;
    display: inline-block;
}

.hero-links a::after,
.text-link::after,
.about-email::after {
    position: absolute;
    right: 0;
    bottom: -2px;
    left: 0;
    height: 1px;
    background: currentColor;
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 300ms var(--ease);
}

.hero-links a:hover::after,
.hero-links a:focus-visible::after,
.text-link:hover::after,
.text-link:focus-visible::after,
.about-email:hover::after,
.about-email:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

.work-section {
    width: min(var(--canvas), calc(100% - 48px));
    margin: 176px auto 0;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.section-heading h2,
.section-heading a {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.section-heading a {
    color: var(--muted);
    transition: color 180ms ease;
}

.section-heading a:hover,
.section-heading a:focus-visible {
    color: var(--foreground);
    outline: none;
}

.project-masonry {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.project-column {
    display: flex;
    flex-direction: column;
    gap: 54px;
    min-width: 0;
}

.project-card {
    min-width: 0;
    break-inside: avoid;
    transition: opacity 300ms ease, transform 600ms var(--ease);
}

.project-card.is-filtered-out {
    display: none;
}

.project-media {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft);
    isolation: isolate;
}

.project-media::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 50%);
    content: "";
    pointer-events: none;
}

.project-media img,
.project-media video {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: filter 620ms var(--ease), opacity 620ms var(--ease);
}

.project-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(244, 244, 241, 0.94);
    color: #101010;
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.82);
    transition: opacity 300ms ease, transform 460ms var(--ease);
}

.project-arrow svg {
    width: 24px;
    height: 24px;
}

.project-card a:hover .project-media img,
.project-card a:focus-visible .project-media img {
    filter: grayscale(1);
    opacity: 0.72;
}

.project-card a:hover .project-arrow,
.project-card a:focus-visible .project-arrow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.project-card a:focus-visible {
    outline: none;
}

.project-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-top: 14px;
}

.project-title,
.project-meta {
    margin: 0;
}

.project-title {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.project-meta {
    max-width: 44%;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
}

.project-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    font-size: 52px;
    font-weight: 500;
}

.page-heading {
    width: min(var(--canvas), calc(100% - 48px));
    margin: 144px auto 0;
}

.page-heading h1,
.project-page-header h1 {
    margin: 0;
    font-size: clamp(62px, 6.1vw, 88px);
    font-weight: 500;
    letter-spacing: -0.078em;
    line-height: 0.96;
}

.page-heading > p {
    max-width: 560px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.page-content {
    max-width: 680px;
    margin-top: 36px;
    color: var(--muted);
    font-size: 17px;
}

.work-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}

.filter-button {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
    border-color: var(--foreground);
    background: var(--foreground);
    color: var(--background);
    outline: none;
}

.work-masonry {
    columns: 2;
    column-gap: 24px;
}

.work-masonry .project-card {
    margin: 0 0 54px;
}

.project-page-header {
    width: min(var(--copy), calc(100% - 48px));
    margin: 144px auto 0;
    text-align: center;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
    margin-top: 36px;
}

.project-detail {
    min-width: 100px;
}

.project-detail span,
.project-detail strong {
    display: block;
    font-size: 12px;
    font-weight: 400;
}

.project-detail span {
    margin-bottom: 4px;
    color: var(--muted);
}

.project-hero-media,
.project-gallery,
.reel-player {
    width: min(var(--canvas), calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
}

.project-hero-media {
    margin-top: 112px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #080808;
}

.project-hero-media > img,
.project-film,
.project-hero-media iframe {
    width: 100%;
}

.project-film {
    height: auto;
    border: 0;
    object-fit: contain;
}

.project-hero-media iframe {
    aspect-ratio: 16 / 9;
    border: 0;
}

.project-hero-media > img {
    max-height: 88vh;
    object-fit: contain;
}

.project-story {
    width: min(680px, calc(100% - 48px));
    margin: 92px auto 0;
}

.project-content {
    color: var(--foreground);
    font-size: clamp(24px, 2.3vw, 32px);
    letter-spacing: -0.04em;
    line-height: 1.3;
}

.project-content p {
    margin: 0;
}

.project-story .text-link {
    margin-top: 30px;
    color: var(--muted);
    font-size: 13px;
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 100px;
}

.project-gallery-item {
    display: grid;
    place-items: center;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #121212;
}

.project-gallery-item img {
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.project-gallery-item video {
    width: 100%;
    height: auto;
}

.project-gallery-video {
    position: relative;
}

.project-gallery-video figcaption {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.72);
    color: #f2f2f0;
    font-size: 11px;
    backdrop-filter: blur(12px);
}

.related-work {
    margin-top: 160px;
}

.about-page,
.reel-page {
    min-height: 60vh;
}

.about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 112px;
    align-items: start;
    width: min(var(--canvas), calc(100% - 48px));
    margin: 92px auto 0;
}

.about-copy {
    padding-top: 6px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.62;
}

.about-copy p {
    margin: 0 0 22px;
}

.about-copy .about-role {
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.55;
    text-transform: uppercase;
}

.about-copy .about-lead {
    color: var(--foreground);
    font-size: 30px;
    letter-spacing: -0.045em;
    line-height: 1.22;
}

.about-copy .text-link {
    margin-top: 8px;
    color: var(--foreground);
    font-size: 13px;
}

.about-portrait {
    justify-self: end;
    width: 100%;
    max-width: 368px;
    padding-top: 18px;
}

.about-portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: var(--radius);
    object-fit: cover;
    object-position: center;
}

.about-email {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

.about-thinking,
.clients-section {
    width: min(var(--canvas), calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
    border-top: 1px solid var(--line);
}

.about-thinking {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-top: 148px;
    padding-top: 34px;
}

.about-thinking > p:last-child {
    max-width: 620px;
    margin: 0;
    font-size: clamp(24px, 2.5vw, 34px);
    letter-spacing: -0.045em;
    line-height: 1.3;
}

.clients-section {
    margin-top: 132px;
    padding-top: 34px;
}

.client-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 42px 24px;
    margin: 46px 0 0;
    padding: 0;
    list-style: none;
}

.client-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 0;
    border: 0;
    font-size: 15px;
    letter-spacing: -0.025em;
    text-align: center;
}

.client-list img {
    width: 150px;
    height: 46px;
    max-width: 100%;
    object-fit: contain;
    filter: invert(1) brightness(1.55);
    opacity: 0.9;
}

html[data-theme="light"] .client-list img {
    filter: none;
    opacity: 0.72;
}

.contact-cta {
    width: min(var(--canvas), calc(100% - 48px));
    margin: 150px auto 0;
    padding: 80px 24px;
    border-radius: var(--radius);
    background: var(--soft);
    text-align: center;
}

.contact-cta h2 {
    max-width: 680px;
    margin: 0 auto;
    font-size: clamp(44px, 5vw, 70px);
    font-weight: 500;
    letter-spacing: -0.068em;
    line-height: 1;
}

.contact-cta .contact-button {
    width: auto;
    min-width: 140px;
    margin-top: 34px;
    padding: 0 24px;
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 12px;
}

.contact-options a {
    transition: color 180ms ease;
}

.contact-options a:hover,
.contact-options a:focus-visible {
    color: var(--foreground);
    outline: none;
}

.reel-player {
    margin-top: 92px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #080808;
}

.reel-player video {
    width: 100%;
    height: auto;
}

.empty-state {
    margin: 0;
    padding: 72px 24px;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(var(--canvas), calc(100% - 48px));
    margin: 168px auto 0;
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer p {
    margin: 0;
    font-size: 12px;
}

.site-footer .social-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-footer .social-links a {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: var(--muted);
    transition: color 180ms ease, transform 260ms var(--ease);
}

.site-footer .social-links a:hover,
.site-footer .social-links a:focus-visible {
    color: var(--foreground);
    outline: none;
    transform: translateY(-2px);
}

.site-footer .social-links svg {
    width: 18px;
    height: 18px;
}

html.motion-ready .reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(30px);
}

.blur-heading-word {
    display: inline-block;
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    transition: opacity 720ms ease, filter 920ms var(--ease), transform 920ms var(--ease);
    will-change: opacity, filter, transform;
}

html.motion-ready .blur-heading:not(.is-prepared) {
    opacity: 0.12;
    filter: blur(14px);
    transform: translateY(10px);
}

html.motion-ready .blur-heading:not(.is-sharp) .blur-heading-word {
    opacity: 0.12;
    filter: blur(14px);
    transform: translateY(10px);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal {
    transition: opacity 700ms ease, transform 850ms var(--ease);
}

@media (max-width: 760px) {
    .site-header {
        width: calc(100% - 32px);
        padding-top: 20px;
    }

    .site-mark,
    .theme-toggle,
    .header-actions .contact-button {
        height: 44px;
    }

    .site-mark,
    .theme-toggle {
        width: 44px;
    }

    .header-actions .contact-button {
        padding: 0 15px;
    }

    .primary-nav {
        top: auto;
        bottom: 18px;
        min-height: 48px;
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
    }

    .hero {
        width: calc(100% - 32px);
        margin-top: 88px;
    }

    .hero h1 {
        font-size: clamp(42px, 12.5vw, 60px);
        letter-spacing: -0.068em;
    }

    .hero-copy {
        max-width: 460px;
        margin-top: 24px;
        font-size: 14px;
    }

    .work-section,
    .page-heading,
    .project-hero-media,
    .project-gallery,
    .about-intro,
    .about-thinking,
    .clients-section,
    .contact-cta,
    .reel-player,
    .site-footer {
        width: calc(100% - 32px);
    }

    .work-section {
        margin-top: 112px;
    }

    .project-masonry {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .project-column {
        display: contents;
    }

    .project-masonry .project-card {
        order: var(--mobile-order, 0);
    }

    .project-arrow {
        width: 56px;
        height: 56px;
    }

    .page-heading,
    .project-page-header {
        width: calc(100% - 32px);
        margin-top: 102px;
    }

    .page-heading h1,
    .project-page-header h1 {
        font-size: clamp(50px, 15vw, 72px);
    }

    .work-toolbar {
        flex-wrap: nowrap;
        margin-right: -16px;
        padding-right: 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .work-toolbar::-webkit-scrollbar {
        display: none;
    }

    .filter-button {
        flex: 0 0 auto;
    }

    .work-masonry {
        columns: 1;
    }

    .project-details {
        gap: 20px 16px;
    }

    .project-detail {
        min-width: calc(50% - 16px);
    }

    .project-hero-media {
        margin-top: 72px;
        border-radius: 12px;
    }

    .project-story {
        width: calc(100% - 32px);
        margin-top: 70px;
    }

    .project-content {
        font-size: 24px;
    }

    .project-gallery {
        gap: 16px;
        margin-top: 72px;
    }

    .project-gallery-item {
        border-radius: 12px;
    }

    .about-intro {
        grid-template-columns: 1fr;
        gap: 54px;
        margin-top: 64px;
    }

    .about-copy {
        max-width: 540px;
    }

    .about-portrait img {
        border-radius: 12px;
    }

    .about-portrait {
        justify-self: center;
        max-width: 316px;
        padding-top: 0;
    }

    .about-thinking {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 104px;
    }

    .about-thinking > p:last-child {
        font-size: 25px;
    }

    .clients-section {
        margin-top: 96px;
    }

    .client-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 18px;
    }

    .client-list img {
        width: 138px;
        height: 42px;
    }

    .contact-cta {
        margin-top: 104px;
        padding: 66px 20px;
        border-radius: 12px;
    }

    .contact-options {
        flex-direction: column;
        gap: 8px;
    }

    .reel-player {
        margin-top: 64px;
        border-radius: 12px;
    }

    .site-footer {
        margin-top: 120px;
        padding-bottom: 104px;
    }
}

@media (max-width: 410px) {
    .header-actions .contact-button {
        width: 44px;
        padding: 0;
    }

    .header-actions .contact-button span {
        display: none;
    }

    .header-actions .contact-button svg {
        display: block;
    }

    .primary-nav a {
        padding: 0 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    html.motion-ready .reveal:not(.is-visible) {
        opacity: 1;
        transform: none;
    }
}
