@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wdth,wght@0,75..100,400..700;1,75..100,400..700&display=swap');

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

body {
    font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #000024;
    font-size: 17px;
    font-weight: 400;
    line-height: 160%;
}

.container {
    display: grid;
    grid-template-columns: 1fr 20px 1fr 20px 1fr;
    min-height: 100vh;
    padding: 0 20px;
}

/* Left section */
.left-section {
    grid-column: 1;
    padding-top: 40px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 40px;
    align-self: start;
}

.header {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 56px;
    font-style: normal;
    font-weight: 700;
    font-stretch: 75%;
    line-height: 100%;
    letter-spacing: -2.24px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.intro-text {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 26px;
    font-style: normal;
    font-weight: 600;
    font-stretch: 85%;
    line-height: 120%;
    letter-spacing: -0.52px;
}

.intro-container {
    position: relative;
}

.name-portrait-trigger {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.portrait-blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
    transition: opacity 0.3s ease-out, transform 0.5s cubic-bezier(0.34, 1.7, 0.64, 1);
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 36, 0.2);
    border: 4px solid #ffffff;
    background: #ffffff;
}

.portrait-blob-container.active {
    opacity: 1;
}

.portrait-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #000024;
    background: rgba(0, 0, 36, 0.05);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.social-link:hover {
    background: rgba(0, 0, 36, 0.1);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Right section */
.right-section {
    grid-column: 3 / 6;
    padding-top: 72px;
    padding-bottom: 80px;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 23px;
}

/* Project tiles */
.project-tile {
    cursor: pointer;
    transition: opacity 0.2s ease;
    width: 100%;
    max-width: 600px;
}

.project-tile:hover {
    opacity: 0.8;
}

.project-tile .project-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    margin-bottom: 4px;
}

.project-name {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 17px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%;
}

/* Project detail page */
.project-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 36, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 100;
    padding: 80px;
    will-change: opacity, backdrop-filter;
}

.project-page.active {
    opacity: 1;
    pointer-events: auto;
}

.project-page-wrapper {
    width: 100%;
    height: 100%;
    background: #ffffff;
    overflow: hidden;
    transform: translateY(100%) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    backface-visibility: hidden;
}

.project-page.active .project-page-wrapper {
    transform: translateY(0) translateZ(0);
}

.project-page-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}


.project-page-content {
    display: grid;
    grid-template-columns: 1fr 20px 1fr 20px 1fr;
    min-height: 100%;
    padding: 40px;
    row-gap: 20px;
}

.project-text-column {
    grid-column: 1;
    grid-row: 1;
    position: relative;
}

.project-content-column {
    grid-column: 3 / 6;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 52px;
}

.back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    margin-bottom: 20px;
    width: 60px;
    height: 60px;
    display: block;
    position: sticky;
    top: 40px;
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    overflow: hidden;
}

.back-button:hover {
    opacity: 0.7;
}

.back-button svg {
    display: block;
    width: 60px;
    height: 60px;
}

.project-page-title {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 56px;
    font-style: normal;
    font-weight: 700;
    font-stretch: 75%;
    line-height: 100%;
    letter-spacing: -2.24px;
    text-transform: uppercase;
    margin: 0;
    margin-bottom: 24px;
}

.project-text-content h2 {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 26px;
    font-style: normal;
    font-weight: 700;
    font-stretch: 85%;
    line-height: 100%;
    letter-spacing: -0.52px;
    margin-bottom: 12px;
    margin-top: 40px;
    text-transform: uppercase;
}

.project-text-content h2:first-of-type {
    margin-top: 0;
}

.project-text-content .project-intro-text {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 26px;
    font-style: normal;
    font-weight: 600;
    font-stretch: 85%;
    line-height: 120%;
    letter-spacing: -0.52px;
    margin-bottom: 40px;
}

.project-text-content p {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 17px;
    font-style: normal;
    font-weight: 400;
    line-height: 160%;
    margin-bottom: 16px;
}

.project-image-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 600px;
}

.project-image-wrapper {
    width: 100%;
}

.project-image-wrapper .project-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
}

.project-caption-box {
    width: 100%;
    padding: 0;
    padding-top: 4px;
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 17px;
    font-style: normal;
    font-weight: 400;
    line-height: 160%;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column;
        padding: 0 20px;
        gap: 20px;
    }
    
    .left-section {
        position: static;
        grid-column: unset;
        padding-top: 20px;
        padding-bottom: 0;
        width: 100%;
        height: auto;
        display: block;
        align-self: auto;
    }
    
    .intro-text {
        margin-bottom: 24px;
    }
    
    .social-links {
        margin-bottom: 40px;
    }
    
    .right-section {
        grid-column: unset;
        padding-top: 20px;
        width: 100%;
    }
    
    .projects-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 23px;
    }
    
    .project-tile {
        max-width: 100%;
    }
    
    .project-tile .project-image {
        margin-bottom: 4px;
    }
    
    .project-page {
        padding: 0;
        background: #ffffff;
        align-items: stretch;
        justify-content: stretch;
    }
    
    .project-page-wrapper {
        width: 100%;
        height: 100%;
    }
    
    .back-button {
        position: fixed;
        top: 20px;
        left: 20px;
        margin-bottom: 0;
        z-index: 1000;
    }
    
    .project-page-content {
        display: flex;
        flex-direction: column;
        padding: 0 20px;
        padding-top: 20px;
        padding-bottom: 40px;
        gap: 20px;
    }
    
    .project-text-column,
    .project-content-column {
        grid-column: unset;
        grid-row: unset;
    }
    
    .project-content-column {
        align-items: stretch;
    }
    
    .project-text-column {
        padding-top: 110px;
    }
    
    .project-image-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 100%;
    }
    
    .project-image-wrapper,
    .project-caption-box {
        width: 100%;
    }
}

/* Password Lock Screen */
.password-lock {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.password-lock.unlocked {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.password-container {
    text-align: center;
    max-width: 400px;
    width: 100%;
    padding: 40px;
}

.password-title {
    color: #000024;
    font-family: "Instrument Sans";
    font-size: 42px;
    font-weight: 700;
    font-stretch: 75%;
    line-height: 100%;
    letter-spacing: -1.68px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.password-input {
    width: 100%;
    padding: 16px 20px;
    font-family: "Instrument Sans";
    font-size: 17px;
    font-weight: 400;
    color: #000024;
    background: #ffffff;
    border: 2px solid #000024;
    border-radius: 0;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.password-input:focus {
    border-color: #000024;
    box-shadow: 0 0 0 3px rgba(0, 0, 36, 0.1);
}

.password-input::placeholder {
    color: rgba(0, 0, 36, 0.4);
}

.password-submit {
    width: 100%;
    padding: 16px 20px;
    font-family: "Instrument Sans";
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    background: #000024;
    border: 2px solid #000024;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-submit:hover {
    background: #000010;
    border-color: #000010;
}

.password-submit:active {
    transform: scale(0.98);
}

.password-error {
    color: #ff0033;
    font-family: "Instrument Sans";
    font-size: 15px;
    font-weight: 500;
    margin-top: 12px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-error.show {
    opacity: 1;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@media (max-width: 768px) {
    .password-container {
        padding: 20px;
    }
    
    .password-title {
        font-size: 32px;
        margin-bottom: 24px;
    }
}