/* ============================================================
   CSS VARIABLES — light & dark
   ============================================================ */
:root {
    --bg: #ffffff;
    --text: #000000;
    --text-secondary: rgba(0,0,0,0.65);
    --text-muted: rgba(0,0,0,0.45);
    --text-dim: rgba(0,0,0,0.40);
    --text-placeholder: rgba(0,0,0,0.28);
    --border: rgba(0,0,0,0.07);
    --placeholder-bg: rgba(0,0,0,0.04);
    --cursor-shadow: 0 2px 10px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.20);
    --shadow-sm: rgba(0,0,0,0.07);
    --shadow-md: rgba(0,0,0,0.10);
    --shadow-lg: rgba(0,0,0,0.13);
    --blend-name: multiply;

    /* Neumorphism */
    --neu-bg: #e4e4e4;
    --neu-shadow-a: #c2c2c2;
    --neu-shadow-b: #ffffff;
    --neu-border: rgba(200,200,200,0.7);
    --neu-color: #4d4d4d;
}

[data-theme="dark"] {
    --bg: #111111;
    --text: #ebebeb;
    --text-secondary: rgba(255,255,255,0.62);
    --text-muted: rgba(255,255,255,0.42);
    --text-dim: rgba(255,255,255,0.35);
    --text-placeholder: rgba(255,255,255,0.25);
    --border: rgba(255,255,255,0.09);
    --placeholder-bg: rgba(255,255,255,0.06);
    --cursor-shadow: 0 2px 14px rgba(255,255,255,0.30), 0 1px 5px rgba(255,255,255,0.15);
    --shadow-sm: rgba(0,0,0,0.35);
    --shadow-md: rgba(0,0,0,0.45);
    --shadow-lg: rgba(0,0,0,0.55);
    --blend-name: screen;

    /* Neumorphism — dark */
    --neu-bg: #1e1e1e;
    --neu-shadow-a: #111111;
    --neu-shadow-b: #2c2c2c;
    --neu-border: rgba(255,255,255,0.06);
    --neu-color: #a0a0a0;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.45s ease, color 0.45s ease;
}

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

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

/* ============================================================
   LOADER
   ============================================================ */
.loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease;
}

.loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Line-wobble loader */
.line-wobble {
    --uib-size: 80px;
    --uib-speed: 1.55s;
    --uib-color: #ffffff;
    --uib-line-weight: 5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--uib-line-weight);
    width: var(--uib-size);
    border-radius: calc(var(--uib-line-weight) / 2);
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.line-wobble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--uib-color);
    opacity: 0.1;
}

.line-wobble::after {
    content: '';
    height: 100%;
    width: 100%;
    border-radius: calc(var(--uib-line-weight) / 2);
    animation: wobble var(--uib-speed) ease-in-out infinite;
    transform: translateX(-90%);
    background-color: var(--uib-color);
}

@keyframes wobble {
    0%, 100% { transform: translateX(-90%); }
    50%       { transform: translateX(90%); }
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text);
    box-shadow: var(--cursor-shadow);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.15s ease, height 0.15s ease,
                background 0.45s ease, box-shadow 0.45s ease;
    will-change: transform;
}

.cursor.expanded {
    width: 16px;
    height: 16px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1080px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px;
    background: var(--neu-bg);
    border: 1px solid var(--neu-border);
    border-radius: 50px;
    box-shadow: inset 4px 4px 10px var(--neu-shadow-a), inset -4px -4px 10px var(--neu-shadow-b);
    z-index: 1000;
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.nav-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.logo-img {
    height: 11px;
    width: auto;
}

.logo-dark { display: none; }

[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: block; }

.nav-cta {
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.09em;
    color: var(--neu-color);
    padding: 8px 16px;
    border: 1px solid var(--neu-border);
    border-radius: 50px;
    background: var(--neu-bg);
    box-shadow: inset 2px 2px 6px var(--neu-shadow-a), inset -2px -2px 6px var(--neu-shadow-b);
    transition: box-shadow 0.2s ease, color 0.2s ease, background 0.45s ease, border-color 0.45s ease;
    white-space: nowrap;
}

.nav-cta:hover {
    color: var(--text);
    box-shadow: inset 1px 1px 3px var(--neu-shadow-a), inset -1px -1px 3px var(--neu-shadow-b),
                2px 2px 5px var(--neu-shadow-a), -2px -2px 5px var(--neu-shadow-b);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.09em;
    color: var(--neu-color);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    font-weight: 700;
}

/* Theme toggle — sun / moon */
.theme-toggle {
    background-color: var(--neu-bg);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: inset 3px 3px 8px var(--neu-shadow-a), inset -3px -3px 8px var(--neu-shadow-b);
    line-height: 1;
    flex-shrink: 0;
    border: 1px solid var(--neu-border);
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.theme-toggle input[type="checkbox"] {
    display: none;
}

.theme-toggle .icon {
    grid-column: 1 / 1;
    grid-row: 1 / 1;
    transition: transform 500ms;
    line-height: 0;
    color: var(--neu-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle .icon--moon {
    transition-delay: 200ms;
}

.theme-toggle .icon--sun {
    transform: scale(0);
}

.theme-toggle input[type="checkbox"]:checked + .icon--moon {
    transform: rotate(360deg) scale(0);
    transition-delay: 0ms;
}

.theme-toggle input[type="checkbox"]:checked ~ .icon--sun {
    transition-delay: 200ms;
    transform: scale(1) rotate(360deg);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, background 0.45s;
    transform-origin: center;
}

.hamburger.open span:first-child {
    transform: translateY(3.25px) rotate(45deg);
}

.hamburger.open span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 76px;
    left: 20px;
    right: 20px;
    background: var(--neu-bg);
    border-radius: 20px;
    border: 1px solid var(--neu-border);
    padding: 24px 28px;
    display: none;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
    box-shadow: inset 4px 4px 10px var(--neu-shadow-a), inset -4px -4px 10px var(--neu-shadow-b);
    transition: background 0.45s ease, box-shadow 0.45s ease;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--neu-color);
    transition: color 0.2s;
}

.mobile-link:hover {
    color: var(--text);
}

/* ============================================================
   LANDING
   ============================================================ */
.landing {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    transition: background 0.45s ease;
}

.landing-images {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.landing-img {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 6px 28px var(--shadow-lg);
    object-fit: cover;
    will-change: transform;
}

.hero-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(22px, 3.6vw, 52px);
    font-weight: 100;
    letter-spacing: 0.16em;
    white-space: nowrap;
    z-index: 10;
    color: var(--text);
    mix-blend-mode: var(--blend-name);
}

/* OPEN FOR WORK pill */
.ofw-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--neu-bg);
    border: 1px solid var(--neu-border);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--neu-color);
    box-shadow: inset 3px 3px 8px var(--neu-shadow-a), inset -3px -3px 8px var(--neu-shadow-b);
    transition: box-shadow 0.2s ease, background 0.45s ease;
}

.landing-ofw {
    position: absolute;
    bottom: 28px;
    right: 28px;
    z-index: 10;
}

.landing-ofw:hover {
    box-shadow: inset 2px 2px 5px var(--neu-shadow-a), inset -2px -2px 5px var(--neu-shadow-b),
                2px 2px 5px var(--neu-shadow-a), -2px -2px 5px var(--neu-shadow-b);
}

.ofw-dot {
    width: 7px;
    height: 7px;
    background: #34C759;
    border-radius: 50%;
    flex-shrink: 0;
    animation: dotpulse 2.4s ease-in-out infinite;
}

@keyframes dotpulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.82); }
}

/* ============================================================
   WORK SECTION
   ============================================================ */
.work-section {
    background: var(--bg);
    transition: background 0.45s ease;
    padding-bottom: 80px; /* space for sticky subnav */
}

.work-category {
    position: relative;
    /* height set dynamically by JS */
}

.work-sticky {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    background: var(--bg);
    transition: background 0.45s ease;
}

.work-header {
    flex-shrink: 0;
    padding: 0 60px 24px;
}

.category-title {
    font-size: clamp(28px, 4.5vw, 60px);
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1;
    margin-bottom: 10px;
}

.category-desc {
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    line-height: 1.6;
}

.desc-more-btn {
    display: inline;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-left: 10px;
    padding: 0;
    transition: color 0.2s;
    vertical-align: baseline;
}

.desc-more-btn:hover { color: var(--text); }

.desc-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

.desc-collapse.open {
    grid-template-rows: 1fr;
}

.desc-inner {
    overflow: hidden;
    min-height: 0;
    padding-top: 0;
    transition: padding-top 0.4s ease;
}

.desc-collapse.open .desc-inner {
    padding-top: 8px;
}

/* ============================================================
   CARD STRIP GALLERY — horizontal scroll via vertical scrub
   ============================================================ */
.card-strip {
    display: flex;
    gap: 14px;
    padding: 0 60px;
    overflow: visible;
    align-items: flex-end;
    will-change: transform;
    flex-shrink: 0;
}

.work-card {
    flex-shrink: 0;
    height: 60vh;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: none;
    box-shadow: 0 8px 36px var(--shadow-lg);
    opacity: 0;
    will-change: transform;
    transition: opacity 0.55s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.work-card.card-visible { opacity: 1; }

.work-card img {
    height: 100%;
    width: auto;
    display: block;
    pointer-events: none;
    transition: opacity 0.22s ease, filter 0.22s ease;
}

/* Hover effects — only on pointer devices with real hover */
@media (hover: hover) {
    .work-card:is(:hover, :focus-within) {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 16px 48px var(--shadow-lg);
    }
}


/* Swipe hint — mobile only, vanishes after first swipe */
.swipe-hint {
    position: absolute;
    bottom: 24px;
    right: 24px;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.swipe-hint--hidden {
    opacity: 0;
}

/* Work sub-navigation */
.work-subnav {
    position: sticky;
    bottom: 24px;
    width: fit-content;
    margin: 0 auto;
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 13px 28px;
    background: var(--neu-bg);
    border: 1px solid var(--neu-border);
    border-radius: 50px;
    box-shadow: inset 4px 4px 10px var(--neu-shadow-a), inset -4px -4px 10px var(--neu-shadow-b);
    z-index: 100;
    transition: background 0.45s ease, box-shadow 0.45s ease;
}

.subnav-link {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    transition: color 0.2s ease;
}

.subnav-link:hover {
    color: var(--text-muted);
}

.subnav-link.active {
    color: var(--text);
    font-weight: 700;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 120px 60px;
    max-width: 1080px;
    margin: 0 auto;
    background: var(--bg);
    transition: background 0.45s ease;
}

.about-text {
    flex: 1;
}

.about-name {
    font-size: clamp(22px, 2.6vw, 38px);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.about-role {
    font-size: 12px;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.about-bio p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.about-image {
    flex: 0 0 auto;
    width: 38%;
    max-width: 400px;
    position: relative;
}

.portrait {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 40px var(--shadow-md);
}

.portrait-placeholder {
    display: none;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--placeholder-bg);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--text-placeholder);
    line-height: 1.6;
}

/* ============================================================
   PROCESS
   ============================================================ */
.process-section {
    background: var(--bg);
    transition: background 0.45s ease;
    padding: 80px 0;
}

.process-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.process-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Horizontal connecting line */
.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: var(--border);
}

.process-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--neu-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: var(--neu-bg);
    box-shadow: inset 3px 3px 7px var(--neu-shadow-a), inset -3px -3px 7px var(--neu-shadow-b);
    transition: background 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.process-circle span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--neu-color);
}

.process-content {
    text-align: center;
    margin-top: 20px;
    padding: 0 12px;
}

.process-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text);
    margin-bottom: 8px;
    transition: color 0.45s ease;
}

.process-desc {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
    transition: color 0.45s ease;
}

/* Staggered animation delays */
.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.12s; }
.process-step:nth-child(3) { transition-delay: 0.24s; }
.process-step:nth-child(4) { transition-delay: 0.36s; }

@media (max-width: 768px) {
    .process-inner {
        flex-direction: column;
        padding: 0 32px;
        gap: 0;
    }

    .process-step {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 32px;
    }

    /* Vertical connecting line */
    .process-step:not(:last-child)::after {
        top: 44px;
        left: 21px;
        width: 1px;
        height: calc(100% - 44px);
    }

    .process-content {
        text-align: left;
        margin-top: 8px;
        padding: 0;
    }

    .process-circle {
        flex-shrink: 0;
    }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 0 120px;
    background: var(--bg);
    transition: background 0.45s ease;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    animation: marquee 10s linear infinite;
}

.marquee-track span {
    font-size: clamp(36px, 5.5vw, 78px);
    font-weight: 700;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.contact-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 52px;
    padding: 0 40px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--neu-bg);
    border: 1px solid var(--neu-border);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--neu-color);
    box-shadow: inset 3px 3px 8px var(--neu-shadow-a), inset -3px -3px 8px var(--neu-shadow-b);
    transition: box-shadow 0.2s ease, color 0.2s ease, background 0.45s ease;
}

.contact-pill:hover {
    color: var(--text);
    box-shadow: inset 2px 2px 5px var(--neu-shadow-a), inset -2px -2px 5px var(--neu-shadow-b),
                2px 2px 5px var(--neu-shadow-a), -2px -2px 5px var(--neu-shadow-b);
}

.contact-ofw {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legal-link {
    display: block;
    margin-top: 40px;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.2s;
}

.legal-link:hover { color: var(--text); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor { display: none; }

    .nav-links { display: none; }
    .nav-cta { display: none; }
    .hamburger { display: flex; }

    .work-category {
        /* no extra padding — children handle their own spacing */
    }

    /* Mobile work section — native horizontal swipe */
    .work-sticky {
        position: relative;
        top: auto;
        height: auto;
        padding-top: 24px;
        overflow: visible;
    }

    .work-header {
        padding: 0 20px 16px;
    }

    .card-strip {
        gap: 10px;
        padding: 0 20px 40px;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* smooth momentum scroll on iOS */
        -webkit-overflow-scrolling: touch;
    }

    .card-strip::-webkit-scrollbar { display: none; }

    .work-card {
        height: 52vh;
    }

    .work-subnav {
        gap: 18px;
        padding: 12px 20px;
    }

    .work-section {
        padding-bottom: 24px;
    }

    .about-section {
        flex-direction: column;
        padding: 60px 24px 60px;
        gap: 40px;
    }

    .about-image {
        width: 100%;
        max-width: 100%;
    }

    .contact-links-row {
        padding: 0 20px;
    }

    .landing-ofw {
        bottom: 20px;
        right: 20px;
    }
}
