/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 24px;
    font-weight: 440;
    color: #000000;
    background: #f9f9f9;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.work-header {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.09008px;
    font-weight: 480;
}

.work-intro {
    font-size: 14px;
    line-height: 24px;
    margin-top: 24px;
    font-weight: 440;
}

/* Container */
.container {
    max-width: 582px;
    margin: 0 auto;
    padding: 80px 16px 8px;
}

/* avatar */
.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    object-position: center;
    display: block;
    border: #ffffff 2px solid;
}

/* Typography */
h1 {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.09008px;
    font-weight: 480;
}

/* Letters list */
h2 {
    font-size: 14px;
    line-height: 24px;
    letter-spacing: -0.09008px;
    font-weight: 440;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Work Sections */
.work-section-case {
    font-size: 14px;
    line-height: 24px;
    letter-spacing: -0.09008px;
    font-weight: 600;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    padding-top: 20px;
}

.work-section-exp {
    font-size: 14px;
    line-height: 24px;
    letter-spacing: -0.09008px;
    font-weight: 600;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    padding-top: 20px;
    padding-bottom: 0;
}

.subtitle {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.4);
    font-weight: 440;
    margin-bottom: 24px;
}

p {
    margin-bottom: 24px;
}

em {
    font-style: italic;
    font-weight: 500;
}

.work-header a[href*="index"] {
    color: #000000;
    text-decoration: none;
}

a[href*="letters"] {
    color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.nav-link {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: baseline;
}

.work-header2 {
    color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

/* Sections */
.intro {
    margin-bottom: 24px;
}

.intro a[href*="work"] {
    color: rgb(0, 102, 204);
    text-decoration: underline;
    text-decoration-color: rgba(0, 102, 204, 0.4);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    font-weight: 540;
}

.intro a[href*="letters"] {
    color: #00a128;
    text-decoration: underline;
    text-decoration-color: rgba(0, 161, 40, 0.4);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    font-weight: 540;
}

.email-copy {
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.4);
    font-size: inherit;
    font-family: inherit;
    font-weight: 560;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.email-copy:hover {
    color: #000;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.4);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.email-copy.copied {
    color: rgba(0, 0, 0, 0.4);
}

/* Footer */
footer {
    padding-top: 20px;
}

/* Letters page - simple list */
.letters-simple {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 40px;
    margin-left: 20px;
}

.letter-row {
    display: list-item;
    gap: 32px;
    align-items: baseline;
    padding: 4px 0;
    padding-left: 10px;
}

.letter-row h2 {
    display: inline;
    font-size: 14px;
    font-weight: 440;
    margin: 0;
}

.letter-row h2 a {
    color: #000000;
    text-decoration: underline;
    text-decoration-thickness: 1.8px;
    text-underline-offset: 1.5px;
    text-decoration-color: #000000;
    transition: color 0.2s ease;
}

.letter-row h2 a:hover {
    color: #00a128;
    text-decoration: underline;
    text-decoration-thickness: 1.8px;
    text-underline-offset: 1.5px;
    text-decoration-color: #00a128;
}

.letter-row::marker {
        color: rgba(0, 0, 0, 0.4);
    }

/* Letter content */
.letter-content h1 {
    font-size: 20px;
    font-weight: 600;
    padding-top: 40px;
    margin-bottom: 32px;
    line-height: 1.2;
}

.letter-content p {
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

/* Work/project page */
.work-simple {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
    padding-top: 8px;
}

.work-row {
    display: flex;
    gap: 0;
    align-items: baseline;
    padding: 18px 0;
    position: relative;
    border-bottom: 0.5px solid #f0f0f0;
}

.work-row:last-child {
    border-bottom: none; /* Remove border from last item */
}

.work-row:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0.5px;
    background: #f0f0f0;
}

/* Preview stack - hidden by default */
.preview-stack {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Show on hover */
.work-row:hover .preview-stack {
    opacity: 100;
}

/* Individual preview images */
.preview-stack img {
    width: 30px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

/* Stacked effect - each image slightly offset */
.preview-stack img:nth-child(1) {
    transform: rotate(-12deg) translateY(2px);
    border: #ffffff 2px solid;
}

.preview-stack img:nth-child(2) {
    transform: rotate(0deg);
    border: #ffffff 2px solid;
    z-index: 2;
}

.preview-stack img:nth-child(3) {
    transform: rotate(12deg) translateY(2px);
    border: #ffffff 2px solid;
}


.work-row time {
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    min-width: 60px;
    font-variant-numeric: tabular-nums;
}

.work-row h2 {
    font-size: 14px;
    font-weight: 440;
    padding: 0;
}

.work-row h2 a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.work-row h2 a:hover {
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
    text-decoration-thickness: 1.8px;
    text-underline-offset: 1.5px;
    text-decoration-color: rgba(0, 0, 0, 0.1);
    transition: color 0.2s ease;
}

/* Explorations bento grid */

.explorations-wide {
    max-width: 1200px; /* Wider than your 650px container */
    margin: 0 auto;
    padding-top: 16px;
    padding-bottom: 16px;
}

.explorations-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding-top: 16px;
}

.exploration-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.exploration-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: grid;
    border: #ffffff 2px solid;
    border-radius: 24px;
}

.exploration-item.large {
    grid-column: span 2;
}

.exploration-item.large2 {
    grid-column: span 4;
}

.media-wrapper {
    grid-template-columns: repeat(6, 1fr);
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: #f0f0f0;
    border: #ffffff 2px solid;
    object-fit: fill;
}

/* Tablet: 3 columns */
@media (max-width: 1100px) {
    .explorations-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 0 32px;
    }
}


/* Mobile Responsive */
@media (max-width: 600px) {
    .container {
        padding: 44px 20px;
    }

    h1 {
        font-size: 16px;
    }

    body {
        font-size: 14px;
    }

    .letter-row {
        flex-direction: column;
        gap: 0;
        list-style: disc;
        display: list-item;
        padding-left: 10px;
    }
    
    .letter-row time {
        display: none;
    }

    .letter-row h2 {
        display: inline;
    }

    .letters-simple {
        padding-left: 0;
        margin-left: 20px;
    }

    .letter-row::marker {
        color: rgba(0, 0, 0, 0.4);
    }

    .letter-content h1 {
        font-size: 18px;
    }

    .preview-stack {
        display: none;
    }

    .explorations-grid {
        grid-template-columns: 1fr;
    }
    
    .exploration-item.large,
    .exploration-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .exploration-item.large2 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .explorations-wide {
        max-width: none;
        padding: 0;
    }
    
    .explorations-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        padding-top: 0;
    }
}