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

:root {
    --black: #000000;
    --dark: #0a0a0a;
    --gray-dark: #1a1a1a;
    --gray: #888888;
    --gray-light: #e5e5e5;
    --white: #ffffff;
    --border: #f0f0f0;
}

body {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    background: var(--white);
    color: var(--black);
    height: 100vh;
    overflow: hidden;
}

/* Layout Grid - Single column layout */
.app-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 80px 50px 1fr;
    height: 100vh;
    column-gap: 1px;
    row-gap: 0;
    background: var(--gray-light);
}

/* Header */
.header {
    grid-column: 1 / -1;
    background: var(--white);
    /*border-bottom: 2px solid var(--black);*/
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /*align-items: center;
    gap: 30px;*/
}

.logo-section {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--black);
}

.tagline {
    font-size: 12px;
    color: var(--gray);
    letter-spacing: 0.5px;
}

.grid-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.grid-title {
    font-size: 14px;
    font-weight: 600;
}

.progress-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
}

.progress-track {
    width: 200px;
    height: 4px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--black);
    width: 7.5%;
    transition: width 0.3s ease;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--black);
}

.stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    display: block;
}

.stat-label {
    font-size: 10px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Projects Panel - Now horizontal below header */
.projects-panel {
    grid-column: 1 / -1;
    background: var(--white);
    border-bottom: 2px solid var(--black);
    padding: 10px 40px;
    overflow-x: auto;
    overflow-y: hidden;
}

.panel-header {
    display: none; /* Hide the header since it's now inline */
}

.projects-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.projects-view {
    width: 100%;
    height: 100%;
    background: var(--white);
    overflow-y: auto;
}

.projects-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray);
    font-weight: 600;
    white-space: nowrap;
    margin-right: 10px;
}

.projects-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.project-card {
    border: 1px solid var(--black);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
    white-space: nowrap;
    min-width: fit-content;
}

.project-card:hover,
.project-card.active {
    background: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}

.project-card.highlighted {
    background: var(--gray-dark);
    color: var(--white);
    border-color: var(--gray-dark);
}

.project-status {
    display: none;
    /*display: inline-block;*/
    /*font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 4px;
    background: var(--gray-light);
    margin-bottom: 3px;*/
}

.project-card:hover .project-status,
.project-card.active .project-status,
.project-card.highlighted .project-status {
    background: rgba(255,255,255,0.2);
}

.project-name {
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 2px;
}

.project-description {
    display: none; /* Hide description in compact view */
}

.project-metrics {
    display: none;
    /*display: flex;
    gap: 8px;
    font-size: 9px;
    margin-top: 3px;
    opacity: 0.8;*/
}

.project-card:hover .project-metrics,
.project-card.active .project-metrics,
.project-card.highlighted .project-metrics {
    opacity: 1;
}

.metric {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Grid Views for Tab Content */
.grid-views {
    position: relative;
    width: 100%;
    height: 100%;
}

.grid-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
}

.grid-view.active {
    opacity: 1;
    visibility: visible;
}

/* Main Grid Section */
.grid-section {
    background: var(--white);
    padding: 20px;
    overflow: auto;
    grid-column: 1 / -1;
    grid-row: 3;
}

/* The Grid */
.grid-container {
    position: relative;
}

.grid {
    display: grid;
    grid-template-columns: repeat(25, 50px);
    grid-template-rows: repeat(16, 50px);
    width: 1250px;
}

.box {
    background: var(--white);
    border: 0.5px solid var(--gray-light);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.box:hover {
    background: var(--border);
    z-index: 10;
    transform: scale(1.05);
    border-color: var(--black);
}

.box.sold {
    background: var(--black);
    color: var(--white);
}

.box.sold:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.box.selected {
    background: var(--black);
    color: var(--white);
    transform: scale(1.1);
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.box.highlighted {
    background: var(--gray-dark);
    color: var(--white);
    transform: scale(1.05);
}

.box-number {
    font-size: 10px;
    color: var(--gray);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border: 2px solid var(--black);
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--black);
    background: var(--white);
}

.modal-title {
    font-size: 24px;
    font-weight: 900;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--black);
    color: var(--white);
}

.modal-body {
    padding: 30px;
}

/* Welcome Modal Specific Styles */
.welcome-modal .modal-body {
    text-align: center;
}

.welcome-description {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 14px;
}

.welcome-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

/* Detail Views */
.detail-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.detail-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--black);
}

.detail-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray);
    margin-bottom: 15px;
}

.detail-name {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 10px;
}

.detail-description {
    color: var(--gray);
    line-height: 1.6;
    font-size: 14px;
}

.detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.detail-stat {
    padding: 15px;
    background: var(--border);
}

.detail-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
}

.detail-stat-value {
    font-size: 20px;
    font-weight: 900;
    margin-top: 5px;
}

/* Lists in details */
.detail-section {
    margin: 30px 0;
}

.section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray);
    margin-bottom: 15px;
    font-weight: 600;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 8px 12px;
    background: var(--black);
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--black);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.link-item:hover {
    transform: translateX(5px);
}

/* Tabs Section (Binder Divider Style) */
.tabs-section {
    grid-column: 1 / -1;
    background: var(--white);
    border-bottom: 2px solid var(--black);
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 40px 0 40px;
    overflow-x: auto;
}

.tab-item {
    position: relative;
    padding: 10px 14px 12px 14px;
    background: var(--white);
    border: 1px solid var(--black);
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-item .tab-label {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.tab-item .tab-divider {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--white);
}

.tab-item:hover {
    transform: translateY(-2px);
}

.tab-item.active {
    background: var(--black);
    color: var(--white);
}

/* Ensure grid section starts after tabs */
.grid-section {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* Modal CTA Section */
.modal-cta {
    margin-top: 30px;
    padding: 25px;
    background: var(--black);
    color: var(--white);
    text-align: center;
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -30px;
}

.cta-price {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
}

.cta-button {
    background: var(--white);
    color: var(--black);
    border: none;
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
    width: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive */

@media (max-width: 1257px) {
    .grid {
        grid-template-columns: repeat(25, 48px);
        grid-template-rows: repeat(16, 48px);
        /* width: 700px; */
    }
}

@media (max-width: 1205px) {
    .grid {
        grid-template-columns: repeat(25, 46px);
        grid-template-rows: repeat(16, 46px);
        /* width: 700px; */
    }
}

@media (max-width: 1157px) {
    .grid {
        grid-template-columns: repeat(25, 44px);
        grid-template-rows: repeat(16, 44px);
        /* width: 700px; */
    }
}

@media (max-width: 1102px) {
    .app-container {
        grid-template-rows: 120px 50px 1fr;
    }
    .grid {
        grid-template-columns: repeat(25, 42px);
        grid-template-rows: repeat(16, 42px);
        /* width: 700px; */
    }
    .header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px 40px;
    }
}

@media (max-width: 1053px) {
    .grid {
        grid-template-columns: repeat(25, 40px);
        grid-template-rows: repeat(16, 40px);
        /* width: 700px; */
    }
}

@media (max-width: 1010px) {
    .grid {
        grid-template-columns: repeat(25, 38px);
        grid-template-rows: repeat(16, 38px);
        /* width: 900px; */
    }
}

@media (max-width: 953px) {
    .grid {
        grid-template-columns: repeat(25, 36px);
        grid-template-rows: repeat(16, 36px);
        /* width: 900px; */
    }
}

@media (max-width: 904px) {
    .grid {
        grid-template-columns: repeat(25, 34px);
        grid-template-rows: repeat(16, 34px);
        /* width: 900px; */
    }
}

@media (max-width: 853px) {
    .grid {
        grid-template-columns: repeat(25, 32px);
        grid-template-rows: repeat(16, 32px);
        /* width: 900px; */
    }
}

@media (max-width: 804px) {
    .grid {
        grid-template-columns: repeat(25, 30px);
        grid-template-rows: repeat(16, 30px);
        /* width: 900px; */
    }
}

@media (max-width: 754px) {
    .grid {
        grid-template-columns: repeat(25, 28px);
        grid-template-rows: repeat(16, 28px);
        /* width: 900px; */
    }
}

@media (max-width: 704px) {
    .grid {
        grid-template-columns: repeat(25, 26px);
        grid-template-rows: repeat(16, 26px);
        /* width: 900px; */
    }
}

@media (max-width: 655px) {
    .grid {
        grid-template-columns: repeat(20, 26px);
        grid-template-rows: repeat(20, 26px);
        /* width: 900px; */
    }
}

/* 
@media (max-width: 1254px) {
    .grid {
        width: 1200px;
    }
}

@media (max-width: 1204px) {
    .grid {
        width: 1150px;
    }
}

@media (max-width: 1154px) {
    .grid {
        width: 1100px;
    }
}

@media (max-width: 1111px) {
    .grid {
        width: 1050px;
    }
}

@media (max-width: 1056px) {
    .grid {
        width: 1000px;
    }
}

@media (max-width: 1011px) {
    .grid {
        grid-template-columns: repeat(20, 35px);
        grid-template-rows: repeat(20, 35px);
        width: 700px;
    }
}

@media (max-width: 800px) {
    .grid {
        grid-template-columns: repeat(15, 30px);
        grid-template-rows: repeat(15, 30px);
        width: 450px;
    }
} */

/* @media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: 80px 50px 1fr;
    }

    .grid-section {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .grid {
        grid-template-columns: repeat(20, 40px);
        grid-template-rows: repeat(20, 40px);
    }

    .stats {
        display: none;
    }

    .modal-content {
        max-width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-header {
        padding: 15px 20px;
    }
} */
