/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: text;
}

/* Mobile Warning Banner */
.mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    z-index: 1000;
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s ease-out;
}

.warning-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.warning-text {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.warning-close {
    background: rgba(220, 38, 38, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.warning-close:hover {
    background: rgba(220, 38, 38, 0.5);
    transform: scale(1.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Show warning on mobile devices */
@media (max-width: 1024px) {
    .mobile-warning {
        display: block;
    }
    
    .container {
        margin-top: 60px; /* Add space for the warning banner */
    }
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Left Panel - Navigation Bar */
.left-panel {
    width: 35%;
    height: 100vh;
    background-color: #111111;
    padding: 2rem 0;
    border-right: 2px solid #ffffff;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.header {
    margin-bottom: 1.5rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid #ffffff;
    flex-shrink: 0;
}

.navigation {
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid #333333;
    position: relative;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.2s ease-in-out;
    z-index: -1;
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: translateX(0);
}

.nav-item:hover,
.nav-item.active {
    color: #000000;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-toggle {
    font-size: 1.2rem;
    font-weight: 300;
}

.nav-item.expanded .nav-toggle {
    transform: rotate(45deg);
}

.content-section {
    flex: 1;
    padding: 0 1.5rem;
    overflow-y: auto;
}

.content-section.collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-in-out;
}

.content-section:not(.collapsed) {
    max-height: 1000px;
    transition: max-height 0.25s ease-in-out;
}

.content-section h2 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.content-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cccccc;
    margin-bottom: 1rem;
}

.resume-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.resume-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.resume-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.resume-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.resume-contact {
    border-top: 1px solid #333333;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.resume-contact p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #cccccc;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.skills-list .skill {
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.4;
}

.resume-section h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.resume-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.job-company {
    font-size: 1rem;
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 0.3rem;
}

.job-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.job-location {
    font-size: 0.9rem;
    color: #999999;
    font-weight: 400;
}

.job-duration {
    font-size: 0.9rem;
    color: #999999;
    font-weight: 400;
}

.resume-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.resume-item strong {
    color: #ffffff;
    font-weight: 500;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border: 1px solid #333333;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: #222222;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem 1rem 1rem 1rem;
    color: #ffffff;
    transform: translateY(100%);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.3rem 0;
    color: #ffffff;
}

.gallery-overlay p {
    font-size: 0.85rem;
    margin: 0;
    color: #cccccc;
}

.resume-item p {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.skill {
    font-size: 0.85rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.skills-category {
    margin-bottom: 1.5rem;
}

.skills-category h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.resume-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: #cccccc;
    font-weight: 500;
    letter-spacing: 0.5rem;
}

.contact-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: #cccccc;
    font-weight: 500;
    letter-spacing: 0.5rem;
}

.contact-form {
    max-width: 600px;
}

.contact-form h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: #222222;
    border: 1px solid #333333;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffffff;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.submit-btn:hover {
    background-color: #000000;
    color: #ffffff;
}

/* Project Gallery within project details */
.project-gallery {
    margin: 2rem 0;
}

.project-gallery h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Interactive Page Gallery */
.page-gallery {
    background: #111111;
    border: 2px solid #333333;
    border-radius: 0;
    padding: 1.5rem;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333333;
}

.gallery-btn {
    background: #111111;
    border: 1px solid #333333;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #cccccc;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gallery-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.gallery-btn:active {
    background: #cccccc;
    color: #000000;
}

.gallery-btn:disabled {
    background: #111111;
    color: #333333;
    border-color: #333333;
    cursor: not-allowed;
}

.page-counter {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.page-viewer {
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-container {
    display: inline-block;
    border: 2px solid #333333;
    border-radius: 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.page-container img {
    max-width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: #333333 #111111;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #111111;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border: 1px solid #333333;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    background: #111111;
}

.thumbnail:hover {
    background: #ffffff;
    border-color: #ffffff;
}

.thumbnail.active {
    background: #ffffff;
    border-color: #ffffff;
    border-width: 2px;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.subtitle {
    font-size: 1rem;
    color: #cccccc;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    position: relative;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

.mobile-menu-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: #ffffff;
    transform-origin: center;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

.mobile-menu-toggle:hover {
    color: #cccccc;
}

/* Active state: Plus rotated 45 degrees (like work tab) */
.mobile-menu-toggle.active {
    transform: rotate(45deg);
    color: #ffffff;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow-y: auto;
}

.project-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333333;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
    flex-shrink: 0;
    margin: 0;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.project-item:last-child {
    border-bottom: none;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.2s ease-in-out;
    z-index: -1;
}

.project-item:hover::before,
.project-item.selected::before {
    transform: translateX(0);
}

.project-item:hover,
.project-item.selected {
    color: #000000;
    border-left-color: #000000;
}

.project-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.project-info {
    flex: 1;
}

.project-title {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.year {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 400;
    min-width: 50px;
}

.project-item:hover .year,
.project-item.selected .year {
    color: #000000;
}

.title {
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: -0.2px;
    color: #ffffff;
}

.project-item:hover .title,
.project-item.selected .title {
    color: #000000;
}

.project-subtitle {
    font-size: 0.95rem;
    color: #cccccc;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.project-item:hover .project-subtitle,
.project-item.selected .project-subtitle {
    color: #000000;
}

.project-keywords {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-end;
    min-width: 120px;
}

.keyword {
    font-size: 0.75rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border: 1px solid #333333;
    border-radius: 4px;
    background-color: #111111;
}

.project-item:hover .keyword,
.project-item.selected .keyword {
    color: #000000;
    border-color: #000000;
    background-color: #ffffff;
}

/* Right Panel - Project Details */
.right-panel {
    width: 65%;
    height: 100vh;
    background-color: #111111;
    padding: 3rem 4rem;
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 0;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    border-top: 2px solid #ffffff;
}

.project-details-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.return-button {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    z-index: 10;
}

.return-button button {
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    transition: all 0.3s ease;
}

.return-button button:hover {
    background-color: #ffffff;
    color: #000000;
}

.project-detail {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.project-detail .detail-header,
.project-detail .detail-content {
    padding: 0 3rem 0 0;
}

.project-detail.active {
    opacity: 1;
    visibility: visible;
}


.detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ffffff;
}

.detail-header h2 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.3px;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.detail-subtitle {
    font-size: 1rem;
    color: #cccccc;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.detail-content {
    max-width: 900px;
}

.project-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ffffff;
    max-width: 900px;
}

.project-image img,
.project-image video {
    width: 100%;
    height: auto;
    display: block;
}


.small-video {
    width: 100% !important;
    height: auto;
    margin: 0;
    display: block;
}

#motion .detail-content {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#motion .project-image {
    flex: 1;
    min-width: 45%;
    width: 50%;
    border: 1px solid #ffffff;
    box-sizing: border-box;
}

/* VCU Advisor images side by side */
#vcu .advisor-images {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

#vcu .advisor-images .project-image {
    flex: 1;
    border: 1px solid #ffffff;
    box-sizing: border-box;
}

/* Blah Blah Manifesto side-by-side images */
#blahblah .advisor-images {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

#blahblah .advisor-images .project-image {
    flex: 1;
    border: 1px solid #ffffff;
    box-sizing: border-box;
}

.detail-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #cccccc;
}

.project-link {
    margin: 2rem 0;
}

.link-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid #ffffff;
}

.link-button:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.project-meta {
    background-color: #111111;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ffffff;
    border: 1px solid #333333;
}

.meta-item {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: #cccccc;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item strong {
    color: #ffffff;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .left-panel {
        width: 100%;
        height: auto;
        padding: 0;
        position: relative;
        border-right: none;
        border-bottom: 2px solid #ffffff;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header {
        margin-bottom: 0;
        padding: 1rem;
        border-bottom: 1px solid #333333;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navigation {
        display: none;
        position: relative;
        background: #111111;
        border-top: 1px solid #333333;
        z-index: 1000;
        padding: 0;
        width: 100%;
    }
    
    .navigation.active {
        display: block;
    }
    
    .navigation .nav-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #333333;
    }
    
    .navigation .nav-item:last-child {
        border-bottom: none;
    }
    
    .content-section {
        display: block !important;
        padding: 1rem;
    }
    
    .content-section.collapsed {
        max-height: 0 !important;
        overflow: hidden;
        transition: max-height 0.25s ease-in-out;
    }
    
    .content-section:not(.collapsed) {
        max-height: 1000px;
        transition: max-height 0.25s ease-in-out;
    }
    
    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .project-list {
        flex: 1;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 1rem;
        padding: 0.5rem 0;
    }
    
    .project-item {
        padding: 0.8rem 1rem;
        border-bottom: none;
        border-right: 1px solid #ffffff;
        min-width: 200px;
        flex-shrink: 0;
    }
    
    .project-item:last-child {
        border-right: none;
    }
    
                .project-item:hover {
                margin: 0;
                padding: 0.8rem 1rem;
                width: auto;
            }
    
    .project-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-keywords {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        min-width: auto;
    }
    
    .right-panel {
        width: 100%;
        height: auto;
        padding: 2rem;
        position: relative;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 0.8rem;
        gap: 1rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 0.7rem;
    }
    
    .project-list {
        gap: 0.5rem;
    }
    
    .project-item {
        padding: 0.6rem 0.8rem;
        min-width: 150px;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .project-subtitle {
        font-size: 0.8rem;
        margin-left: 0;
    }
    
    .right-panel {
        padding: 1.5rem;
    }
    
    .detail-header h2 {
        font-size: 1.6rem;
    }
    
    .project-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-keywords {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        min-width: auto;
    }
    
    .project-title {
        flex-direction: column;
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .left-panel {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header {
        margin-bottom: 0;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #333333;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .navigation {
        position: relative;
        background: #111111;
        border-top: 1px solid #333333;
        z-index: 1000;
        padding: 0;
        width: 100%;
    }
    
    .navigation .nav-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #333333;
    }
    
    .navigation .nav-item:last-child {
        border-bottom: none;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 0.7rem;
    }
    
    .project-list {
        width: 100%;
        gap: 0.3rem;
        padding: 0.5rem 0;
    }
    
    .project-item {
        padding: 0.8rem 1rem;
        min-width: 140px;
        border-right: 1px solid #333333;
        border-bottom: none;
    }
    
    .project-item:last-child {
        border-right: none;
    }
    
    .title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .project-subtitle {
        font-size: 0.7rem;
        margin-left: 0;
        margin-top: 0.2rem;
    }
    
    .project-keywords {
        margin-top: 0.5rem;
        gap: 0.2rem;
    }
    
    .keyword {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .right-panel {
        padding: 1rem;
    }
    
    .detail-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .detail-header h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .detail-subtitle {
        font-size: 0.8rem;
    }
    
    .detail-content p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .project-image {
        margin-bottom: 1.5rem;
    }
    
    .project-meta {
        padding: 1rem;
    }
    
    .meta-item {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }
    
    /* Gallery optimizations for mobile */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .gallery-overlay h3 {
        font-size: 1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.75rem;
    }
    
    /* Page gallery mobile optimizations */
    .page-gallery {
        padding: 1rem;
    }
    
    .gallery-controls {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .gallery-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .page-counter {
        font-size: 0.8rem;
    }
    
    .page-container img {
        max-height: 50vh;
    }
    
    .thumbnail {
        width: 50px;
        height: 38px;
    }
    
    /* Skills grid mobile optimization */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .skill {
        font-size: 0.75rem;
    }
    
    /* Resume mobile optimization */
    .resume-arrow {
        font-size: 2rem;
        letter-spacing: 0.3rem;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 360px) {
    .left-panel {
        padding: 0.3rem;
    }
    
    .header h1 {
        font-size: 1rem;
    }
    
    .subtitle {
        font-size: 0.6rem;
    }
    
    .project-item {
        padding: 0.6rem 0.8rem;
        min-width: 120px;
    }
    
    .title {
        font-size: 0.9rem;
    }
    
    .project-subtitle {
        font-size: 0.65rem;
    }
    
    .keyword {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
    
    .right-panel {
        padding: 0.8rem;
    }
    
    .detail-header h2 {
        font-size: 1.3rem;
    }
    
    .detail-content p {
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.8rem;
    }
    
    .page-gallery {
        padding: 0.8rem;
    }
    
    .gallery-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .thumbnail {
        width: 45px;
        height: 34px;
    }
}

/* Landscape phone optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .left-panel {
        flex-direction: row;
        height: auto;
        padding: 0.5rem 1rem;
    }
    
    .header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        flex-shrink: 0;
    }
    
    .project-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .project-item {
        min-width: 160px;
        border-right: 1px solid #333333;
        border-bottom: none;
    }
    
    .right-panel {
        padding: 1rem;
    }
    
    .detail-header h2 {
        font-size: 1.4rem;
    }
    
    .page-container img {
        max-height: 60vh;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}

/* Terminal Effects */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Screen flicker effect */
body {
    animation: flicker 0.15s infinite linear;
}


/* Terminal cursor effect */
.header h1::after {
    content: '_';
    animation: blink 1s infinite;
    color: #ffffff;
}

/* Matrix background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}
