:root {
    /* Colors */
    --bg-color: #f3f4f6;
    --primary-text: #020202;
    --secondary-text: #808080;
    --muted-text: #cccccc;
    --contact-bg: #507af3;
    --white: #ffffff;

    /* Spacing Scale */
    --s1: 16px;
    --s2: 32px;
    --s3: 64px;
    --s4: 120px;

    /* Layout */
    --max-width: 2200px;
    --gutter: 24px;
    --margin: 64px;

    /* Transitions */
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Side Navbar Styles */
.side-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 100vh;
    border-right: 0.25px solid #cccccc;
    background-color: var(--bg-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-contact {
    position: absolute;
    top: 120px;
    width: 80px;
}

.nav-location {
    position: absolute;
    top: 0;
    left: 40px;
    font-size: 18px;
    color: #020202;
    text-transform: none;
    font-weight: 400;
    transform: rotate(270deg) translateY(-96px);
    /* 40px - 2px = 38px from edge */
    white-space: nowrap;
}

.nav-email {
    position: absolute;
    top: 0;
    left: 40px;
    font-size: 16px;
    color: #808080;
    font-weight: 400;
    transform: rotate(270deg) translateY(-74px) translateX(2px);
    /* 40px + 15px = 55px */
    white-space: nowrap;
}

.nav-avatar {
    position: absolute;
    bottom: 100px;
    /* 80px margin + 45px button + 30px gap */
    width: 45px;
    height: 45px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.75px solid #e6e6e6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

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

.nav-info-btn {
    position: absolute;
    bottom: 40px;
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 0.75px solid #e6e6e6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: background-color var(--transition), transform var(--transition);
    padding: 0;
}

.nav-info-btn:hover {
    background-color: #f9f9f9;
}

.info-icon {
    scale: 0.8;
    width: 15px;
    /* Proportional to the 14.85x34.92 viewbox */
    height: auto;
    filter: brightness(0);
    /* Ensure icon is black */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Figtree', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-left: 80px;
    /* Offset for side navbar */
}

/* Layout Containers */
/* Info Overlay Styles */
.info-overlay {
    position: fixed;
    /* Aligns with the bottom of the info button */
    bottom: 40px;
    left: 80px;
    width: 480px;
    height: 260px;
    background-color: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.06);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    transform: translateX(-10px);
}

.info-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(0);
}

/* Connecting dot between button and overlay */
.info-overlay::before {
    content: '';
    position: absolute;
    left: -15px;
    /* Centered in the 17.5px gap */
    bottom: 0;
    width: 10px;
    height: 10px;
    background-color: #cccccc;
    border-radius: 50%;
}

.info-overlay-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 25px;
    position: relative;
}

.info-description {
    color: #808080;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
}

.info-socials {
    position: absolute;
    bottom: 15px;
    left: 25px;
    display: flex;
    gap: 35px;
}

.info-link {
    color: #808080;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    transition: color var(--transition);
}

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

/* Existing styles below */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--margin);
}

.section {
    padding: var(--s3) 0;
}

.section-label {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.04em;
    /* -40px tracking equivalent */
    color: #020202;
    margin-bottom: 0;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 60px;
    /* Exact spacing from top */
}

.hero-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: clamp(60px, 8vw, 110px);
    /* Script font needs to be larger */
    letter-spacing: -0.054em;
    margin-bottom: 30px;
    /* Space to visual blocks */
    color: var(--primary-text);
}

.visual-blocks {
    display: flex;
    gap: -60px;
    margin-bottom: 40px;
    justify-content: center;
}

.square {
    width: 382px;
    height: 435px;
    position: absolute;
    background-color: var(--white);
    /* EXACT path from Asset 1.svg for identical shapes */
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 382.55 435.18'%3E%3Cpath d='M373.85,409.07c0-4.81,3.9-8.7,8.7-8.7,0,0,0,0,0,0v-17.41s0,0,0,0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7c0,0,0,0,0,0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41s0,0,0,0h0c-3.73,0-7.14-2.33-8.26-5.89-1.89-6,2.54-11.52,8.26-11.52h0v-17.41s0,0,0,0h0c-3.73,0-7.14-2.33-8.26-5.89-1.89-6,2.54-11.52,8.26-11.52h0v-17.41s0,0,0,0h0c-3.73,0-7.14-2.33-8.26-5.89-1.89-6,2.54-11.52,8.26-11.52h0V0s0,0,0,0h-25.91s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S339.24,4.81,339.24,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S304.42,4.81,304.42,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S269.61,4.81,269.61,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S234.79,4.81,234.79,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S199.98,4.81,199.98,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S165.16,4.81,165.16,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S130.35,4.81,130.35,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S95.54,4.81,95.54,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S60.72,4.81,60.72,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S25.91,4.81,25.91,0c0,0,0,0,0,0H0s0,0,0,0v17.41H0c4.81,0,8.7,3.9,8.7,8.7S4.81,34.81,0,34.81H0v17.41H0c4.81,0,8.7,3.9,8.7,8.7S4.81,69.63,0,69.63H0v17.41H0c4.81,0,8.7,3.9,8.7,8.7S4.81,104.44,0,104.44H0v17.41H0c5.72,0,10.15,5.52,8.26,11.52-1.12,3.56-4.53,5.89-8.26,5.89h0s0,0,0,0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h25.91s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.9-8.7,8.7-8.7s8.7,3.9,8.7,8.7c0,0,0,0,0,0h25.91s0,0,0,0v-17.41s0,0,0,0c-4.81,0-8.7-3.9-8.7-8.7Z'/%3E%3C/svg%3E");
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 382.55 435.18'%3E%3Cpath d='M373.85,409.07c0-4.81,3.9-8.7,8.7-8.7,0,0,0,0,0,0v-17.41s0,0,0,0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7c0,0,0,0,0,0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41h0c-4.81,0-8.7-3.9-8.7-8.7s3.9-8.7,8.7-8.7h0v-17.41s0,0,0,0h0c-3.73,0-7.14-2.33-8.26-5.89-1.89-6,2.54-11.52,8.26-11.52h0v-17.41s0,0,0,0h0c-3.73,0-7.14-2.33-8.26-5.89-1.89-6,2.54-11.52,8.26-11.52h0v-17.41s0,0,0,0h0c-3.73,0-7.14-2.33-8.26-5.89-1.89-6,2.54-11.52,8.26-11.52h0V0s0,0,0,0h-25.91s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S339.24,4.81,339.24,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S304.42,4.81,304.42,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S269.61,4.81,269.61,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S234.79,4.81,234.79,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S199.98,4.81,199.98,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S165.16,4.81,165.16,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S130.35,4.81,130.35,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S95.54,4.81,95.54,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S60.72,4.81,60.72,0c0,0,0,0,0,0h-17.41s0,0,0,0c0,4.81-3.9,8.7-8.7,8.7S25.91,4.81,25.91,0c0,0,0,0,0,0H0s0,0,0,0v17.41H0c4.81,0,8.7,3.9,8.7,8.7S4.81,34.81,0,34.81H0v17.41H0c4.81,0,8.7,3.9,8.7,8.7S4.81,69.63,0,69.63H0v17.41H0c4.81,0,8.7,3.9,8.7,8.7S4.81,104.44,0,104.44H0v17.41H0c5.72,0,10.15,5.52,8.26,11.52-1.12,3.56-4.53,5.89-8.26,5.89h0s0,0,0,0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h0c3.73,0,7.14,2.33,8.26,5.89,1.89,6-2.54,11.52-8.26,11.52h0v17.41s0,0,0,0h25.91s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h17.41s0,0,0,0c0-4.81,3.90-8.70,8.70-8.70s8.7,3.9,8.7,8.7c0,0,0,0,0,0h25.91s0,0,0,0v-17.41s0,0,0,0c-4.81,0-8.70-3.90-8.70-8.70Z'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
    transition: transform 600ms var(--ease-out-expo), transform-origin 600ms var(--ease-out-expo);
}

.square::before {
    /* Colored background for the stamp */
    content: '';
    position: absolute;
    inset: 0;
    background-color: currentColor;
}

.square::after {
    /* White center to reveal the border */
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background-color: var(--white);
    pointer-events: none;
    border-radius: 20px;
    /* Slightly rounded inner content */
    z-index: 0;
}

.square-video {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    width: calc(100% - 60px);
    height: calc(100% - 60px);
    object-fit: cover;
    border-radius: 20px;
    z-index: 2;
}

.red-square.square::after,
.green-square.square::after,
.blue-square.square::after {
    display: none;
}

.visual-blocks {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 45px;
    /* Space to subtitle */
    position: relative;
    height: 500px;
}

.red-square {
    color: #ed1c24;
    transform: rotate(-5deg) translateX(-260px) scale(0.9) translateY(-13px);
    z-index: 1;
    transform-origin: center center;
}

.red-square:hover {
    transform-origin: right bottom;
    transform: rotate(-7deg) translateX(-280px) scale(1.01) translateY(-13px);
}

.green-square {
    color: #10b981;
    /* Refining to a more premium green than pure #00ff00 */
    transform: rotate(0deg);
    z-index: 3;
    transform-origin: center center;
}

.green-square:hover {
    transform: scale(1.1);
}

.blue-square {
    color: #507af3;
    transform: rotate(5deg) translateX(260px) scale(0.9) translateY(-15px);
    z-index: 2;
    transform-origin: center center;
}

.blue-square:hover {
    transform-origin: left bottom;
    transform: rotate(7deg) translateX(280px) scale(1.01) translateY(-15px);
}

.hero-floating-pill {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    padding: 10px 24px;
    border-radius: 40px;
    background-color: var(--primary-text);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 200ms var(--ease-out-expo);
    transform: translate(15px, 10px);
    /* Tighter and aligned to the right */
    white-space: nowrap;
}

.hero-floating-pill.active {
    opacity: 1;
}

.hero-floating-pill.red {
    background-color: #ed1c24;
}

.hero-floating-pill.green {
    background-color: #10b981;
}

.hero-floating-pill.blue {
    background-color: #507af3;
}

.hero-subtitle {
    font-family: 'Dr Sugiyama', cursive;
    font-size: 90px;
    max-width: 5000px;
    line-height: 1.2;
    color: var(--muted-text);
    margin-top: 0;
    margin-bottom: 80px;
    /* Space to Featured Work */
}

/* Section Header Layout */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centered at all times */
    gap: 20px;
    margin-bottom: 60px;
    width: 100%;
}

.header-line {
    width: 130px;
    height: 0.25px;
    background-color: var(--muted-text);
}

.header-subtitle {
    font-family: 'Dr Sugiyama', cursive;
    font-size: 32px;
    color: var(--muted-text);
}

/* Featured Work Section */
.featured-work {
    padding-top: 0;
    /* Aligns exactly with the right edge of the 80px side navbar */
    margin-left: calc(-50vw + 50% + 40px);
    width: calc(100vw - 80px);
}

.project-grid-wrapper {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 0;
    /* Alignment handled by section margin */
}

.project-grid-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.project-grid {
    display: flex;
    gap: 80px;
    width: max-content;
    padding-bottom: 40px;
}

.project-grid::before {
    content: '';
    display: block;
    /* Start scroll with 80px margin from navbar */
    flex-shrink: 0;
}

.project-grid::after {
    content: '';
    display: block;
    /* Finish scroll with 80px margin */
    flex-shrink: 0;
}

.project-card {
    width: 580px;
    height: 435px;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform var(--transition);
    border-radius: 30px;
}


/* Featured Project Cards - Hover State */
.project-item:hover .project-image {
    transition: transform 0.6s var(--ease-out-expo), filter 0.6s var(--ease-out-expo);
}

.project-card::after,
.project-card::before {
    display: none;
}



.orange-border {
    border-color: #ff9c6e;
}

.teal-border {
    border-color: #81c7bc;
}

.brown-border {
    border-color: #b58c63;
}

.green-border {
    border-color: #8fbc8f;
}

.project-image-container {
    width: 100%;
    height: 100%;
    background-color: #507af3;
}

.project-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.project-title-pill {
    height: 40px;
    background-color: var(--bg-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 25px;
    transition: padding var(--transition), width var(--transition);
    overflow: hidden;
    position: relative;
}

.play-icon {
    width: 0;
    height: 12px;
    margin-right: 0;
    opacity: 0;
    background-color: #020202;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
    transition: all 400ms var(--ease-out-expo);
    flex-shrink: 0;
}

.project-item:hover .play-icon {
    width: 12px;
    margin-right: 12px;
    opacity: 1;
}

.project-item:hover .project-title-pill {
    padding-left: 20px;
}

.project-title {
    font-size: 16px;
    font-weight: 700;
    color: #020202;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
    transition: transform var(--transition);
}

/* More Work Section */
.more-work {
    padding-bottom: var(--s4);
}

.work-item {
    border-bottom: 0.25px solid #cccccc;
    transition: background-color var(--transition), border-color var(--transition);
    cursor: pointer;
    position: relative;
    /* Container for floating squares */
    display: flex;
    flex-direction: column;
}

.work-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    transition: var(--transition);
}

.work-item.active .work-item-header {
    justify-content: flex-start;
    padding-bottom: 20px;
}

.work-item:hover {
    background-color: transparent;
}

/* Hover Card Base System */
.work-hover-card {
    position: absolute;
    width: 155px;
    height: 180px;
    border-radius: 20px;
    background-color: var(--white);
    border: 0.75px solid #e6e6e6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms var(--ease-out-expo),
        transform 600ms var(--ease-out-expo),
        left 600ms var(--ease-out-expo),
        top 600ms var(--ease-out-expo);
    z-index: 5;
    overflow: hidden;
}

.work-hover-card video,
.work-hover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Remove old pseudo-element hover cards */
.work-item::before,
.work-item::after {
    display: none !important;
}

/* Hover floats turn off when active or recently closed */
.work-item.active .work-hover-card,
.work-item.no-hover .work-hover-card {
    display: none !important;
}

.work-item:hover .work-hover-card {
    opacity: 1;
}

.work-item:nth-child(1) .hover-before {
    left: 20%;
    top: -10px;
    transform: rotate(-8deg) scale(0.95);
}

.work-item .hover-after {
    left: 35%;
    top: 30px;
    transform: rotate(12deg) scale(0.95);
}

.work-item:nth-child(1):hover .hover-before {
    transform: rotate(-8deg) scale(1);
}

.work-item:nth-child(1):hover .hover-after {
    transform: rotate(12deg) scale(1);
}

.work-item:nth-child(2) .hover-before {
    left: 15%;
    top: 25px;
    transform: rotate(5deg) scale(0.95);
}

.work-item:nth-child(2) .hover-after {
    left: 25%;
    top: 5px;
    transform: rotate(-12deg) scale(0.95);
}

.work-item:nth-child(2) .hover-after {
    left: 40%;
    top: -35px;
    transform: rotate(8deg) scale(0.95);
}

.work-item:nth-child(2):hover .hover-before {
    transform: rotate(-12deg) scale(1);
}

.work-item:nth-child(2):hover .hover-after {
    transform: rotate(8deg) scale(1);
}

.work-item:first-child {
    border-top: 0.25px solid #cccccc;
}

.work-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
    text-transform: uppercase;
    padding-left: 80px;
    z-index: 6;
    transition: var(--transition);
}

.work-desc {
    font-size: 18px;
    color: var(--secondary-text);
    padding-right: 80px;
    max-width: 500px;
    text-align: left;
    line-height: 1.4;
    transition: opacity 400ms ease, transform 400ms ease, padding 400ms ease;
    /* Force exactly two lines by default */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

/* Expanded state for desc */
.work-item.active .work-desc {
    padding-left: 40px;
    padding-right: 0;
    max-width: 800px;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    height: auto;
    overflow: visible;
}

.work-item-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 600ms var(--ease-in-out);
}

.work-item.active .work-item-content {
    max-height: 800px;
    padding-bottom: 40px;
}

.work-visual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 80px;
}

.work-block {
    aspect-ratio: 1;
    /* Square blocks */
    background-color: transparent;
    border-radius: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 600ms var(--ease-out-expo), opacity 600ms var(--ease-out-expo);
    overflow: hidden;
}

.work-block img,
.work-block video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Eliminate weird gaps/borders below inline media */
    border-radius: inherit;
}

.work-item.active .work-block {
    transform: translateY(0);
    opacity: 1;
}

/* Staggered entry for blocks */
.work-item.active .work-block:nth-child(1) {
    transition-delay: 100ms;
}

.work-item.active .work-block:nth-child(2) {
    transition-delay: 150ms;
}

.work-item.active .work-block:nth-child(3) {
    transition-delay: 200ms;
}

.work-item.active .work-block:nth-child(4) {
    transition-delay: 250ms;
}

/* Site Footer */
.site-footer {
    padding: 80px 0 40px;
    display: flex;
    justify-content: flex-end;
}

.footer-copyright {
    font-size: 10px;
    color: #808080;
    letter-spacing: 0.2em;
    font-weight: 400;
    text-transform: uppercase;
    margin-right: calc(1 * var(--margin));
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
    /* Site remains interactive when modal is closed */
}

.modal.active {
    pointer-events: auto;
    /* Modal blocks and captures interactions when active */
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 2, 2, 0.3);
    /* Darken site with 020202 at 30% opacity */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 400ms ease;
}

.modal.active .modal-backdrop {
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    background-color: var(--white);
    border: 10px solid var(--white);
    border-radius: 40px;
    /* Matching your site's corner radius style */
    padding: 40px;
    /* User: 'sized with 40x padding on all sides' */
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
    transform: translateY(20px);
    opacity: 0;
}

.modal-content::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-esc-hint {
    position: absolute;
    top: 75px;
    /* Aligned 35px from the modal's top edge (40px offset + 35px) */
    left: 75px;
    /* Aligned 35px from the modal's left edge (40px offset + 35px) */
    font-size: 14px;
    color: #cccccc;
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 1001;
    pointer-events: none;
}

.modal.active .modal-esc-hint {
    opacity: 0.8;
    /* Subtle reminder */
}

.close-modal {
    position: absolute;
    top: 75px;
    /* Aligned 35px from the modal's top edge (40px offset + 35px) */
    right: 75px;
    /* Aligned 35px from the modal's right edge (40px offset + 35px) */
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 0.75px solid #e6e6e6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    transition: all 400ms ease;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.modal.active .close-modal {
    opacity: 1;
    pointer-events: auto;
}

.close-modal:hover {
    background-color: #f9f9f9;
}

.close-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0);
    /* Ensure icon is black */
}

.modal-project-title {
    font-size: 110px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.01em;
    color: #020202;
    margin-top: 60px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

.modal-statement {
    font-size: 20px;
    font-weight: 400;
    text-align: center;
    color: #808080;
    max-width: 700px;
    margin: 40px auto 100px auto;
    line-height: 1.4;
}

.modal-visuals-container {
    width: 100%;
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.modal-visuals {
    --grid-unit: min(5px, calc((100vw - 120px) / 242));
    /* Precision fluid cells */
    display: grid;
    grid-template-columns: repeat(242, var(--grid-unit));
    grid-auto-rows: var(--grid-unit);
    grid-gap: 0;
    width: fit-content;
    margin: 0 auto;
    padding-bottom: 80px;
}

.bento-block {
    background-color: #507af3;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-body {
    transition: opacity 300ms ease;
}

.modal-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 40px;
}

.next-project-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #808080;
    cursor: pointer;
    text-transform: uppercase;
    padding: 10px 20px;
    position: relative;
    outline: none;
    transition: transform 300ms ease;
}

.next-project-btn::after {
    content: '→';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    transition: opacity 300ms ease, transform 300ms ease;
    font-size: 16px;
}

.next-project-btn:hover {
    transform: translateX(-10px);
}

.next-project-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(20px);
}

/* Precise CSS Grid Masonry (Units of 5px) 
   Gap (20px) = 4 units
*/

/* Line 1: 1210x700 */
.block-1 {
    grid-column: 1 / 243;
    grid-row: 1 / 141;
}

/* Line 2 & 3 (Mixed Column Heights) 
   Column A (530px wide): Block 2 (530h) -> Gap -> Block 4 (485h)
   Column B (660px wide): Block 3 (355h) -> Gap -> Block 5 (660h)
*/
.block-2 {
    grid-column: 1 / 107;
    grid-row: 145 / 251;
}

.block-4 {
    grid-column: 1 / 107;
    grid-row: 255 / 352;
}

.block-3 {
    grid-column: 111 / 243;
    grid-row: 145 / 216;
}

.block-5 {
    grid-column: 111 / 243;
    grid-row: 220 / 352;
}

/* Line 4 & 5 (Zigzag Pattern 760/430) */
.block-6 {
    grid-column: 1 / 153;
    grid-row: 356 / 442;
}

.block-7 {
    grid-column: 157 / 243;
    grid-row: 356 / 442;
}

.block-8 {
    grid-column: 1 / 87;
    grid-row: 446 / 532;
}

.block-9 {
    grid-column: 91 / 243;
    grid-row: 446 / 532;
}

/* Line 6: 1210x700 */
.block-10 {
    grid-column: 1 / 243;
    grid-row: 536 / 676;
}

/* Intermediate Laptop/Large Tablet Breakpoint */
@media (max-width: 1280px) {
    .hero-title {
        font-size: 90px;
    }

    .modal-project-title {
        font-size: 90px;
    }
}

/* Responsive Scaling */
@media (max-width: 1024px) {
    :root {
        --margin: 32px;
    }

    body {
        padding-left: 0;
    }

    .side-navbar {
        width: 100%;
        height: 70px;
        flex-direction: row;
        border-right: none;
        border-top: 0.5px solid rgba(0, 0, 0, 0.1);
        padding: 0 var(--margin);
        justify-content: space-between;
        background-color: var(--bg-color);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        top: auto;
        bottom: 0;
    }

    .nav-contact,
    .nav-location,
    .nav-email {
        display: none;
    }

    .nav-avatar,
    .nav-info-btn {
        position: static;
        width: 44px;
        height: 44px;
    }

    .info-overlay {
        left: var(--margin);
        right: var(--margin);
        width: auto;
        bottom: 74px;
        /* Perfectly seated above the 70px nav + 4px gap */
        height: auto;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
        transform: none;
    }

    .info-overlay.active {
        transform: translateY(0);
    }

    .info-overlay::before {
        display: none;
    }

    .info-overlay-content {
        padding: 40px var(--margin);
    }

    .info-socials {
        position: static;
        margin-top: 40px;
        padding-bottom: 20px;
    }

    .main-container {
        padding: 0 var(--margin);
    }

    .hero {
        padding-top: 100px;
        min-height: 60vh;
    }

    .hero-title {
        font-size: 80px;
    }

    .hero-subtitle {
        font-size: 60px;
    }

    .modal-project-title {
        font-size: 70px;
        margin-top: 60px;
    }

    .footer-copyright {
        margin-right: 0;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --margin: 24px;
    }

    .side-navbar {
        height: 64px;
        padding: 0 var(--margin);
    }

    .nav-avatar,
    .nav-info-btn {
        width: 40px;
        height: 40px;
    }

    .hero {
        padding-top: 60px;
        padding-bottom: 100px;
        min-height: 55vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-title {
        font-size: 38px;
        letter-spacing: -0.04em;
        line-height: 1.1;
        margin-bottom: 30px;
    }

    .hero-subtitle {
        font-size: 22px;
        /* Precision sized for 2-line fit */
        margin-bottom: 40px;
        margin-top: 20px;
        line-height: 1.4;
        max-width: 100%;
        /* Removes the wrap constraint causing the 3rd line */
        margin-left: auto;
        margin-right: auto;
    }

    .visual-blocks {
        height: 220px;
        margin-bottom: 40px;
        transform: scale(0.85);
        /* Slightly smaller cluster */
    }

    .square {
        width: 160px;
        height: 185px;
    }

    .square::after {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
        border-radius: 8px;
    }

    .red-square {
        transform: rotate(-5deg) translateX(-60px);
    }

    .blue-square {
        transform: rotate(5deg) translateX(60px);
    }

    /* Targeted mobile hover reveals (triggered on tap) */
    .red-square:hover {
        transform: rotate(-8deg) translateX(-75px) scale(1.02);
    }

    .green-square:hover {
        transform: scale(1.05);
        /* Substantial zoom but no scale-down */
    }

    .blue-square:hover {
        transform: rotate(8deg) translateX(75px) scale(1.02);
    }

    .hero-floating-pill {
        display: block;
        /* Allow on touch */
        transform: translate(-50%, -130%);
        /* Centered above point of touch */
        font-size: 13px;
        /* Slightly tighter on mobile */
        padding: 8px 16px;
    }

    .featured-work {
        margin-left: calc(-1 * var(--margin));
        width: calc(100% + (2 * var(--margin)));
    }

    .project-grid {
        gap: 32px;
        padding: 0 var(--margin);
    }

    .project-grid::before,
    .project-grid::after {
        width: var(--margin);
        display: none;
        /* Better native scroll feel */
    }

    .project-card {
        width: 427px;
        height: 320px;
    }

    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        margin-bottom: 40px;
    }

    .section-label {
        font-size: 22px;
    }

    .header-subtitle {
        font-size: 18px;
    }

    .header-line {
        display: none;
    }

    /* Accordion Refinement */
    .work-item-header {
        padding: 32px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .work-title {
        font-size: 20px;
        padding-left: 0;
    }

    .work-desc {
        display: block;
        /* Show desc by default but styled differently */
        font-size: 14px;
        padding-right: 0;
        max-width: 100%;
        color: var(--secondary-text);
        line-height: 1.5;
        height: auto;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .work-item.active .work-desc {
        display: block;
        padding-left: 0;
        margin-top: 0;
        /* Already has gap from header */
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    .work-visual-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
        gap: 12px;
        margin-top: 24px;
    }

    .work-block {
        border-radius: 12px;
    }

    .footer-copyright {
        font-size: 9px;
        letter-spacing: 0.1em;
        padding-bottom: 50px;
        /* Shifted up by 30px from previous 20px */
    }

    .site-footer {
        padding: 40px 0;
        /* Reduced top padding to pull it closer to 'More Work' */
    }

    /* Modal Mobile High-End Refinement */
    .modal-content {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 80px 24px 40px;
        border-radius: 0;
        /* Full screen on mobile */
    }

    .modal-esc-hint {
        display: none !important;
    }

    .close-modal {
        top: 24px;
        right: 24px;
        width: 44px;
        /* Better touch target */
        height: 44px;
        border-radius: 15px;
        /* Reverted to match site standard */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        opacity: 0;
        /* Hidden by default */
        pointer-events: none;
    }

    .modal.active .close-modal {
        opacity: 1;
        /* Revealed only when modal is open */
        pointer-events: auto;
    }

    .modal-project-title {
        font-size: 34px;
        margin-top: 0;
        text-align: left;
    }

    .modal-statement {
        font-size: 17px;
        text-align: left;
        margin: 24px 0 48px;
        line-height: 1.6;
    }

    .modal-visuals-container {
        margin-top: 0;
    }

    .modal-visuals {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
        padding-bottom: 40px;
    }

    .bento-block {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
        border-radius: 20px;
        overflow: hidden;
    }
}
 
 .bento-block {
     opacity: 0;
     transition: opacity 600ms var(--ease-out-expo);
 }
 
 .bento-block.loaded, .bento-block:has(video) {
     opacity: 1;
 }