* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Courier New', monospace;
    background: #f9f9f9;
    color: #333;
    font-size: 13px;
}

/* Header */
header {
    background: white;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    gap: 0.5rem;
}

.logo {
    font-size: 1rem;
    font-weight: bold;
    color: #2d5016;
    text-decoration: none;
}

.search-bar {
    flex: 1;
    max-width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 12px;
    font-family: Georgia, 'Courier New', monospace;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-actions a {
    color: #333;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
}

.header-actions a:hover {
    color: #2d5016;
}

/* Green bar */
.announcement-bar {
    background: #2d5016;
    color: white;
    padding: 0.3rem 1rem;
    text-align: center;
    font-size: 12px;
}

.announcement-bar a {
    color: white;
    text-decoration: underline;
}

/* Main layout */
.container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 0;
    min-height: auto;
}

/* Left Sidebar */
.sidebar-left {
    width: 140px;
    background: white;
    padding: 0.75rem;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    min-height: auto;
}

.sidebar-left h3 {
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    margin: 0.5rem 0 0.3rem 0;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
}

.sidebar-left h3:first-child {
    margin-top: 0;
}

.sidebar-left a {
    display: block;
    padding: 0.25rem 0.3rem;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    border-left: 2px solid transparent;
}

.sidebar-left a:hover {
    background: #f0f0f0;
    border-left-color: #2d5016;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    min-height: auto;
}

.section-title {
    font-size: 12px;
    font-weight: bold;
    margin: 0.75rem 0 0.5rem 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
}

.section-title:first-child {
    margin-top: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.portfolio-item {
    background: white;
    border: 1px solid #ddd;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.portfolio-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f0f0f0;
    overflow: hidden;
}

.portfolio-image img {
    
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease, object-fit 0.3s ease;
}

.portfolio-image:hover img {
    filter: grayscale(0%);
    object-fit: contain;
}

.portfolio-info {
    padding: 0.4rem;
}

.portfolio-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 0.15rem;
    color: #333;
}

.portfolio-category {
    font-size: 10px;
    color: #999;
}

/* Right Sidebar - Profile */
.sidebar-right {
    width: 160px;
    background: white;
    padding: 0.75rem;
    border-left: 1px solid #ddd;
    overflow-y: auto;
    min-height: auto;
}

.profile-section {
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 100%;
    aspect-ratio: 1;
    background: #e0e0e0;
    border: 1px solid #ddd;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.profile-avatar img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.profile-avatar:hover img {
    filter: grayscale(0%);
}

.profile-name {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 0.2rem;
}

.profile-title {
    font-size: 11px;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.profile-stats {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #2d5016;
}

.profile-bio {
    font-size: 11px;
    line-height: 1.4;
    color: #555;
    margin-bottom: 0.75rem;
}

.profile-links {
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}

.profile-links a {
    display: block;
    font-size: 11px;
    color: #2d5016;
    text-decoration: none;
    padding: 0.25rem 0;
}

.profile-links a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: white;
    padding: 0.5rem 1rem;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #999;
    font-size: 11px;
}

footer a {
    color: #2d5016;
    text-decoration: none;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.portfolio-modal.hidden {
    display: none;
}

.portfolio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.portfolio-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(90vw, 780px);
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.portfolio-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.portfolio-modal-image {
    width: 100%;
    max-height: 70vh;
    background: #f0f0f0;
    overflow: hidden;
}

.portfolio-modal-image img {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    background: white;
}

.portfolio-modal-body {
    padding: 1rem 1.25rem 1.25rem;
}

.portfolio-modal-category {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
}

.portfolio-modal-body h3 {
    font-size: 1.1rem;
    color: #333;
}

.portfolio-modal-actions {
    margin-top: 0.75rem;
}

.portfolio-modal-link {
    display: inline-block;
    background: #2d5016;
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    font-size: 11px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.portfolio-modal-link:hover {
    background: #1f3810;
}

.portfolio-modal-link.hidden {
    display: none;
}

body.modal-open {
    overflow: hidden;
}

.sidebar-left a.active {
    background: #f0f0f0;
    border-left-color: #2d5016;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-right {
        width: 100%;
        border-left: none;
        border-top: 1px solid #ddd;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
        overflow-y: visible;
    }

    .profile-section {
        grid-column: 1 / -1;
    }

    .profile-avatar {
        max-width: 150px;
        margin: 0 auto 0.5rem;
    }

    .profile-stats {
        grid-column: 1 / -1;
    }

    .profile-bio {
        grid-column: 1 / -1;
    }

    .profile-links {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .profile-links a {
        padding: 0.5rem;
        background: #f9f9f9;
        border: 1px solid #eee;
        text-align: center;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar-right {
        order: -1;
        width: 100%;
        border-left: none;
        border-top: none;
        border-bottom: 1px solid #ddd;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
        overflow-y: visible;
    }

    .sidebar-left {
        order: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #ddd;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .main-content {
        order: 1;
    }

    .sidebar-left h3 {
        grid-column: 1 / -1;
    }

    .profile-section {
        margin-bottom: 0.5rem;
    }

    .profile-avatar {
        width: 100%;
        max-width: 120px;
        margin: 0 auto 0.3rem;
    }

    .profile-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        border: none;
        padding: 0;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
        margin: 0;
        padding: 0.3rem;
        background: #f9f9f9;
        border: 1px solid #eee;
    }

    .profile-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        border: none;
        padding: 0;
    }

    .profile-links a {
        padding: 0.5rem;
        background: #f9f9f9;
        border: 1px solid #eee;
        text-align: center;
        font-size: 10px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-bar {
        max-width: 100%;
    }

    .sidebar-right {
        order: -1;
    }

    .sidebar-left {
        order: 0;
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        order: 1;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-links {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.3rem;
    }
}
