* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: seq-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    color: #333;
    background-color: #fff;
    line-height: 1.6;
}

/* Layout Structure */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Side Navigation - Fixed width */
.side-nav {
    position: fixed;
    width: 15rem;
    height: 100vh;
    background-color: #fff;
    border-right: 1px solid #eee;
    z-index: 1000;
    
}

.nav-content {
    height: 100%;
    
    flex-direction: column;
    justify-content: space-between;
}





/* Logo Box */
.logo-box {
    display: flex;
    color: #000;
    font-family: "Samarkan";
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: 32px; /* 123.077% */
    letter-spacing: 2.6px;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    background-color: #f3f2f2;
    text-decoration: none; /* Remove underlines */
    width: fit-content;
    height: fit-content;
    padding-left: 24px;
    padding-right: 24px;
}

.logo-box a {
    text-decoration: none; /* Remove underlines */
    outline: none; /* Remove the focus outline */
}

/* Site Navigation */
.site-nav {
    padding: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #eee;
}

.site-nav ul {
    padding-top: 1.25rem;
    list-style: none;
    font-family: "Sequelsans_heavy_disp";
    font-size: 20px;
    line-height: 28px;
    color: #3b3d41;
}

.site-nav a {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: #3b3d41;
    transition: color 0.3s ease;
    letter-spacing: -0.2px;
}

.site-nav a:hover {
    color: #a0a5ac;
}

/* Case Studies Navigation */
.case-studies {
    padding: 0rem 2rem;
    font-family: "SequelSans";
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #eee;
        gap: 1.5rem;


}

.section{
    padding-top: 2.5rem;    
}

.case-studies h3 {
    font-family: "inter";
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.116rem;
    line-height: 1.2em;
    color: #a0a5ac;
    margin-bottom: .5rem;
    text-transform: uppercase;
}

.case-studies ul {
    list-style: none;
}

.case-studies a {
    font-family: "Sequelsans_light_disp";
    line-height: 1.5rem;
    display: block;
    padding-bottom: 0.5rem;
    text-decoration: none;
    color: #3b3d41;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.case-studies a:hover {
    color: #666;
}

/* Contact Navigation */
.contact-nav {
    padding: 0rem 2rem;
    margin-top: 2.5rem;
    gap: 1.5rem;

}

.contact-nav h3 {
    font-family: "inter";
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: .116rem;
    color: #a0a5ac;
    line-height: 1.2em;
    margin-bottom: .5rem;
    text-transform: uppercase;
}

.contact-nav ul {
    list-style: none;
}

.contact-nav a {
    font-family: "Sequelsans_light_disp";
    line-height: 1.5rem;
    display: block;
    padding-bottom: 0.5rem;
    text-decoration: none;
    color: #3b3d41;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.contact-nav a:hover {
    color: #666;
}

/* Main Content Area */
.content {
    margin-left: 15rem;
    padding: 2rem 4rem;
    width: calc(100% - 15rem);
    flex-grow: 1;
    flex-direction: row;
    display: flex;
    flex-direction: column;
}


.cs_content {
    margin-left: 15rem;
    width: calc(100% - 15rem);
    flex-grow: 1;
    flex-direction: row;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    flex-direction: row;
    display: flex;
}

h1 {
    font-family: "Sequelsans_book_disp";
    font-size: 1.25rem;
    line-height: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 400;
    background-image: linear-gradient(
        270deg,
        rgb(125, 127, 130) 0%,
        rgb(167, 167, 167) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Introduction Section */

.intro h1 {
    font-size: 3rem;
    font-family: "Sequelsans_book_disp";
    font-weight: var(--regular);
    line-height: 3.5rem;
    letter-spacing: -0.01rem;
    background-image: linear-gradient(
        285deg,
        rgb(59, 61, 65) 0%,
        rgba(61, 63, 67, 1) 1.88487%,
        rgba(61, 63, 67, 1) 1.88487%,
        hsl(220, 4%, 52%) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* divider section + craft */

.divider-section {
    margin-top: 1rem;
    position: relative;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: #eee;
    margin-bottom: 1.5rem;
}

.craft-text {
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Work Section */

.work {
   width: 100%;
   margin-top: 1rem;
}

.work-grid {
    column-count: 3;
    column-gap: 2rem;
    margin: 0 0;
}

.work-grid article {
    display: inline-block;
    width: 100%;
    margin-bottom: 2rem;
    break-inside: avoid;
}

.work-grid article a {
    text-decoration: none;
    color: inherit;
    display: block;
    user-select: none;
    -webkit-user-select: none;
}

.work-grid article a:hover {
    text-decoration: none;
}

.work-grid article a:focus {
    outline: none;
}

.tile {
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.tile img {
    width: 100%;
    height: auto;
    display: block;
}

.tile:hover img {
    transform: scale(1.02);
    transition: transform 0.75s ease-out;
}

.info {
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-details h3 {
    font-family: "Sequelsans_book_disp";
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: #3b3d41;
}

.project-details h4 {
    font-family: "Sequelsans_book_disp";
    font-size: 1.25rem;
    color: #a0a5ac;
}

.year {
    font-size: 0.875rem;
    color: #666;
}

/* For screens >= 1200px - 3 columns */
@media (min-width: 1200px) {
    .work {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* For screens between 768px and 1199px - 2 columns */
@media (min-width: 768px) and (max-width: 1199px) {
    .work {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For screens < 768px - 1 column */
@media (max-width: 767px) {
    .work {
        grid-template-columns: 1fr;
    }
}

work article {
    border-radius: 6px;
    overflow: hidden;
    opacity: 1;
}

.work article {
    width: 100%;
    margin-bottom: 2rem;
}

.work .tile {
    background-color: rgb(251, 251, 253);
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.6s ease;
    border-width: 0.5px;
    box-shadow: 0px 0.602187px 2.04744px -0.5px rgba(28, 29, 33, 0.133);
    border-color: #dfe0e1;
}

.work .tile:hover {
    box-shadow: rgba(28, 29, 33, 0.067) 0px 0.60219px 2.04744px -0.5px, 
    rgba(28, 29, 33, 0.08) 0px 2.28853px 7.78101px 1px, 
    rgba(28, 29, 33, 0.14) 0px 10px 34px -1.5px, 
    rgba(223, 224, 225, 0.3) 0px 0px 0px 0px; 
    transition: box-shadow 0.75s ease-out;
}

.work .tile img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    border-radius: 6px;
}

/* For video tiles */
.work .tile video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.work .info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #fff;
}

.work .project-details {
    flex-grow: 1;
}

.work h3 {
    font-family: "Sequelsans_book_disp";
    font-size: 1.25rem;
    color: #3b3d41;
    line-height: 1.5rem;
    font-style: normal;
    font-weight: 500;
}

.work h4 {
    font-family: "Sequelsans_book_disp";
    font-size: 1.25rem;
    color: #a0a5ac;
    line-height: 1.125rem;
    font-style: normal;
    font-weight: var(--medium);
}

.work .year {
    color: #a0a5ac;
    font-size: 0.875rem;
    margin-left: 1rem;
    font-style: normal;
}

/* Ideas Section */
.ideas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.ideas article {
    padding: 2rem;
    background-color: #f8f8f8;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.ideas article:hover {
    background-color: #f0f0f0;
}

/* Typography Styles */
p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Chinese Text Styles */
:lang(zh) {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
        sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro,
.work article,
.ideas article {
    animation: fadeIn 1s ease-out;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* CV Section Specific Styles */
.cv-section {
    max-width: 800px;
    margin: 4rem auto;
}

.cv-section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Project Tags */
.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: #f0f0f0;
    border-radius: 16px;
    font-size: 0.875rem;
}

/* Images and Media */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content {
        padding: 2rem 3rem;
    }

    .cs_content {
        padding: 2rem 3rem;
    }

    .work-grid {
        column-count: 2;
    }
}


@media (max-width: 992px) {
    .work {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 809px) {
    .layout {
        flex-direction: column;
    }

    .side-nav {
        position: fixed;
        width: 100%;
        height: 100vh;
        border-right: none;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        background-color: #fff;
    }
    
    .side-nav.active {
        transform: translateX(0);
    }

    .mobile-nav-toggle {
        display: none;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
    }
    
    .mobile-header .logo-box {
        margin: 0;
    }
    
    .content {
        margin-left: 0;
        width: 100%;
        padding: 0 1.5rem 1.5rem;
    }
    
    .cs_content {
        margin-left: 0;
        width: 100%;
        padding: 0 1.5rem 1.5rem;
    }

    /* When menu is open */
    .mobile-nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .work-grid {
        column-count: 1;
    }

    .intro h1 {
        font-size: 1.75rem !important;
        line-height: 2.25rem !important;
        letter-spacing: -0.01rem;
    }

    .site-nav {
        padding: 1rem;
    }

    .case-studies,
    .contact-nav {
        padding: 0 1rem;
    }

    .site-nav ul {
        font-size: 1.1rem !important;
    }

    /* Add padding to content to account for sticky header */
    .content {
        padding-top: 0.5rem;
    }
    
    /* Add shadow to header when scrolled */
    .mobile-header.scrolled {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        background-color: rgba(255, 255, 255, 0.98);
    }
}

@media (min-width: 810px) {
    /* Ensure desktop styles are maintained above 810px */
    .side-nav {
        position: fixed;
        width: 15rem;
        height: 100vh;
    }

    .content {
        margin-left: 15rem;
        width: calc(100% - 15rem);
    }

    .work-grid {
        column-count: 3;
    }
}

@media (min-width: 810px) and (max-width: 1199px) {
    .work-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 0 1rem 1rem !important;
    }

    .cs_content {
        padding: 0 1rem 1rem !important;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    .case-studies,
    .contact-nav {
        margin-top: 1.5rem;
    }

    .intro h1 {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    /* Adjust work grid spacing */
    .work-grid {
        gap: 1rem;
    }
    
    /* Adjust info spacing */
    .info {
        padding: 0.75rem 0;
    }
}

/* Print Styles */
@media print {
    .side-nav {
        display: none;
    }

    .content {
        margin: 0;
        width: 100%;
        padding: 0;
    }

    .cs_content {
        margin: 0;
        width: 100%;
        padding: 0;
    }
}

/* Focus States for Accessibility */
a:focus {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

/* Selection Style */
::selection {
    background-color: #007aff;
    color: white;
}

/* Add media queries for finer control */
@media (max-width: 900px) {
    .work-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

.side-nav a:focus {
    outline: none;
}

.three-ws-content {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;  /* This ensures items align at the top */
    gap: 2rem;  /* Adds some spacing between the columns */
}


.three-ws-img {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;  /* This ensures items align at the top */
    gap: 2rem;  /* Adds some spacing between the columns */
}


.three-ws-img {
    width: 100%;
    display: flex;
    justify-content: flex-end;  /* Aligns content to the right */
}

.three-ws-img img {
    width: 75%;  /* Makes the image 75% of its container width */
    height: auto;  /* Maintains aspect ratio */
}

.pill {
    display: inline-block;
    padding: .25rem 1rem;
    background-color: #212121; 
    border-radius: .25rem;  
    font-size: 0.75rem;
    font-family: "Sequelsans_med_disp";    
    color: #fff;  
    margin-bottom: .5rem;  /* Space before the heading */
    text-transform: uppercase;  
    letter-spacing: 0.5px;  
}

/* Mobile Navigation Styles */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: #333;
    transition: all 0.3s ease;
}

.mobile-header {
    display: none;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    transition: background-color 0.3s ease;
    width: 100%;
}

.mobile-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(100%);
}

/* Explicitly show mobile header at mobile breakpoint */
@media (max-width: 809px) {
    .mobile-header {
        display: flex !important; /* Force display with !important */
        align-items: center;
        justify-content: space-between;
    }
    
    .mobile-nav-toggle {
        display: none;
    }
    
    /* Adjust content padding to account for header */
    .content {
        padding-top: 1rem !important;
    }
    
    /* Ensure the header is at the top of the layout */
    .layout {
        flex-direction: column;
        padding-top: 0;
    }
}

/* Responsive Typography */
@media (max-width: 809px) {
    /* Heading sizes for mobile */
    .intro h1 {
        font-size: 1.75rem !important;
        line-height: 2.25rem !important;
        letter-spacing: -0.01rem;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.35rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    /* Project details in work grid */
    .work .project-details h3 {
        font-size: 1.1rem !important;
        line-height: 1.3rem !important;
    }
    
    .work .project-details h4 {
        font-size: 1.1rem !important;
        line-height: 1.3rem !important;
    }
    
    /* Body text */
    p, li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    /* Navigation text */
    .site-nav ul {
        font-size: 1.1rem !important;
    }
    
    .case-studies a, .contact-nav a {
        font-size: 0.95rem !important;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .intro h1 {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    /* Adjust work grid spacing */
    .work-grid {
        gap: 1rem;
    }
    
    /* Reduce padding */
    .content {
        padding: 1rem 1rem 1rem !important;
    }
    
    /* Adjust info spacing */
    .info {
        padding: 0.75rem 0;
    }
}

/* Mobile header navigation links */
.mobile-nav-links {
    display: flex;
    gap: 2rem;
    position: relative;
    z-index: 2;
    align-items: center;
}

.mobile-nav-links a {
    font-family: "Sequelsans_book_disp";
    font-size: 20px;
    line-height: 28px;
    color: #3b3d41;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.2px;
}

.mobile-nav-links a:hover {
    color: #a0a5ac;
}

/* Hide the hamburger toggle on mobile */
@media (max-width: 809px) {
    .mobile-nav-toggle {
        display: none;
    }
    
    .mobile-header {
        display: flex;
        justify-content: center;
        align-items: center;
        
        
    }
    
    /* Adjust spacing for smaller screens */
    @media (max-width: 480px) {
        .mobile-nav-links {
            gap: .5rem;
        }
        
        .mobile-nav-links a {
            font-size: 18px;
        }
        
        .mobile-header {
            padding: 0.75rem 1rem;
        }
    }
}

/* Mobile Footer */
.mobile-footer {
    display: none;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    width: 100%;
    background-color: #fff;
}

.mobile-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-footer-copyright {
    font-family: "Sequelsans_book_disp";
    font-size: 16px;
    color: #3b3d41;
}

.mobile-footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.mobile-footer-links a {
    font-family: "Sequelsans_book_disp";
    font-size: 16px;
    color: #3b3d41;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-footer-links a:hover {
    color: #a0a5ac;
}

/* Show mobile footer only on mobile devices */
@media (max-width: 809px) {
    .mobile-footer {
        display: block;
    }
}

/* Adjust spacing for smaller screens */
@media (max-width: 480px) {
    .mobile-footer {
        padding: 0.75rem 1rem;
    }
    
    .mobile-footer-links {
        gap: 1rem;
    }
    
    .mobile-footer-links a,
    .mobile-footer-copyright {
        font-size: 14px;
    }
}

/* Desktop/Mobile visibility classes */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .desktop-only {
        display: flex !important;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* Mobile About Page Sections */
.about-mobile-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-mobile-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-mobile-image {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.about-mobile-image img {
    width: 70%;
    max-width: 250px;
}

.about-mobile-content {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.about-mobile-content .pill {
    display: inline-block;
    width: max-content;
    padding: 0.25rem .5rem;
    margin-bottom: 0.5rem;
}

.about-mobile-content h3 {
    font-size: 1.25rem;
    line-height: 1.5rem;
    font-family: 'Sequelsans_book_head';
    color: #3b3d41;
    margin: 0.5rem 0;
}

.about-mobile-content p {
    font-size: 1rem;
    line-height: 1.5rem;
    font-family: 'Sequelsans_book_disp';
    color: #a0a5ac;
    margin: 0;
}

