/* ==========================================================================
RESET & SYSTEM FONTS
========================================================================== */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../assets/fonts/subset-JetBrainsMono-Bold.woff2') format('woff2'),
        url('../assets/fonts/subset-JetBrainsMono-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../assets/fonts/subset-JetBrainsMono-Regular.woff2') format('woff2'),
        url('../assets/fonts/subset-JetBrainsMono-Regular.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: #fff;
    color: #111111;
    font-family: "JetBrains Mono", "Courier New", Courier, Monaco, "Liberation Mono", "Lucida Console", monospace;
    font-size: 12px;
    line-height: 1.5;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 24px 60px 24px;
    -webkit-font-smoothing: antialiased;
    overflow-y: auto; 
}

/* High quality selection color */
::selection {
    background: #111111;
    color: #ffffff;
}

/* ==========================================================================
LAYOUT & CONTAINER STRUCTURE
========================================================================== */
.page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e2de;
    flex-shrink: 0;
}

.brand-logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #111111;
    text-decoration: none;
}

.top-nav {
    display: flex;
    gap: 20px;
}

.nav-tab {
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888888;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-tab:hover, .nav-tab.active {
    color: #111111;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* MAIN CONTENT GRID */
main.main-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    flex: 1;
}

/* ==========================================================================
LEFT SIDEBAR (ITEMS LIST)
========================================================================== */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #111111;
    margin-bottom: 16px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.project-item {
    display: block;
    font-size: 12px;
    color: #777777;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
    transition: color 0.15s ease;
}

.project-item:hover {
    color: #111111;
    text-decoration: underline;
}

.project-item.active {
    color: #111111;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sidebar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-row .project-item {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.free-label {
    font-size: 10px;
    color: #fff;
    background-color: #ddd;
    margin-left: 5px;
    white-space: nowrap;
    border-radius: 3px;
    padding: 0px 3px;
    text-transform: uppercase;
}

/* Sidebar responsive display toggles */
.sidebar-desktop-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-mobile-select {
    display: none; /* Hidden by default on desktop */
    width: 100%;
    padding: 8px;
    font-family: inherit;
    font-size: 12px;
    background: #fff;
    border: 1px solid #a0a0a0;
}

@media (max-width: 768px) {
    .sidebar-desktop-list {
        display: none; /* Hide regular sidebar links on mobile */
    }
    .sidebar-mobile-select {
        display: block; /* Show select dropdown on mobile */
        margin-bottom: 20px;
    }
}
/* ==========================================================================
RIGHT CONTENT AREA (SHOWCASE)
========================================================================== */
.showcase-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #111111;
}

.project-description {
    font-size: 12px;
    color: #444444;
    max-width: 580px;
    line-height: 1.4;
}

.showcase-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-view, .btn-paypal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #111111;
    text-decoration: none;
    border: 1px solid #a0a0a0;
    padding: 4px 10px;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    font-family: "JetBrains Mono", "Courier New", Courier, Monaco, "Liberation Mono", "Lucida Console", monospace;
}

.btn-view:hover, .btn-paypal:hover {
    background-color: #111111;
    color: #ffffff;
    border-color: #111111;
}

.btn-view svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

/* ==========================================================================
           FONT HOMEPAGE
========================================================================== */
.font-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.font-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: #fff;
    transition: border-color 0.2s;
}

.font-card:hover .font-card-title {
    text-decoration: underline;
    text-underline-offset: 4px;
    color: #777;
}

.font-card-img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    display: block;
    background: #fff;
    padding: 0 15px;
    box-sizing: border-box;
}

.font-card-title {
    padding: 12px;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    color: #999;
    transition: text-decoration 0.15s ease;
}

/* Responsive grid changes */
@media (max-width: 1200px) {
    .font-overview-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 fonts per line under 1200px */
    }
}

@media (max-width: 768px) {
    .font-overview-grid {
        grid-template-columns: 1fr; /* 1 font per line under 768px */
    }
}

/* ==========================================================================
           FONT DETAIL VIEW (Side-by-Side Layout & Action Buttons)
========================================================================== */
.font-detail-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
}

.font-images-col {
    width: 800px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.font-info-col {
    flex: 1;
    min-width: 0;
}

.font-images-col .image-gallery img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.font-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.paypal-form-inline, .paypal-btn-input {
    margin: 0;
}

.homepage-link {
    text-decoration: none;
    color: inherit;
}

.overview-no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

/* ==========================================================================
           ABOUT
========================================================================== */
.about-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    line-height: 1.6;
}

.about-container img {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 30px;
}

.about-text a {
    color: #777777;
    text-decoration: underline;
    transition: color 0.15s ease;
}

/* ==========================================================================
           PHOTO HOMEPAGE (Editorial Hero Layout)
========================================================================== */
.photo-overview-grid-editorial {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

.hero-gallery-card {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.hero-gallery-card .gallery-card-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.hero-gallery-card .gallery-card-title {
    padding-top: 10px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.portrait-gallery-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.portrait-gallery-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.portrait-gallery-card .gallery-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.portrait-gallery-card .gallery-card-title {
    padding-top: 10px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
           PHOTO GRID & LIGHTBOX
========================================================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.photo-grid img, .image-gallery img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    user-select: none;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10000;
    font-family: monospace;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    padding: 16px 14px;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.2s;
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ==========================================================================
           ADMIN & LABELS
========================================================================== */
.admin-edit-badge {
    font-size: 10px;
    margin-left: 6px;
    color: #666;
    text-decoration: none;
}

.admin-edit-badge:hover {
    color: #000;
    text-decoration: underline;
}

.inactive-label {
    color: #cc0000;
    font-size: 10px;
    margin-left: 5px;
}

/* ==========================================================================
    FOOTER
========================================================================== */
footer {
    width: 100%;
    max-width: 1400px;
    padding: 12px 0;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-top: 1px solid #e2e2de;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.social-links {
    display: flex;
    gap: 16px; /* Increase this value (e.g., from 16px to 24px or 32px) for more space */
}

footer a {
    color: #777777;
    text-decoration: none;
    transition: color 0.15s ease;
}

footer a:hover {
    color: #111111;
    text-decoration: underline;
}

/* ==========================================================================
           RESPONSIVE BREAKPOINTS
========================================================================== */
@media (max-width: 1200px) {
    .font-detail-layout {
        flex-direction: column;
    }
    .font-images-col {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 16px;
        padding-bottom: 24px;
        min-height: auto;
    }

    main.main-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .top-nav {
        gap: 6px;
    }

    .showcase-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .font-overview-grid,
    .portrait-gallery-row,
    .photo-grid {
        grid-template-columns: 1fr;
    }

    footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        max-width: 100%;
        margin-top: 30px;
        border-top: 1px solid #eee;
    }
}