/* ==========================================
   Cable - Projects Portfolio
   Professional Science Portfolio Styles
   ========================================== */

/* CSS Variables - Color Scheme */
:root {
    /* Primary Colors - Scientific Blues */
    --primary-dark: #1a365d;
    --primary-medium: #2c5282;
    --primary-light: #3182ce;
    --primary-lighter: #63b3ed;

    /* Neutral Colors - Grays */
    --gray-900: #1a202c;
    --gray-800: #2d3748;
    --gray-700: #4a5568;
    --gray-600: #718096;
    --gray-500: #a0aec0;
    --gray-400: #cbd5e0;
    --gray-300: #e2e8f0;
    --gray-200: #edf2f7;
    --gray-100: #f7fafc;

    /* Accent Colors */
    --white: #ffffff;
    --accent-teal: #319795;
    --accent-green: #38a169;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Navigation Bar
   ========================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
    transition: opacity var(--transition-fast);
}

.nav-logo:hover {
    opacity: 0.9;
}

/* ==========================================
   Header Section
   ========================================== */
.header {
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-light) 100%);
    padding: 2rem 0;
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.header-description {
    font-size: 1rem;
    color: var(--gray-200);
    line-height: 1.8;
}

/* ==========================================
   Main Content
   ========================================== */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

/* ==========================================
   Projects Grid
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Project Card */
.project-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--gray-200);
}

.project-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.project-card-description {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 1.25rem;
    flex: 1;
    line-height: 1.6;
}

.view-project-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-medium) 100%);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.view-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Placeholder Image Styling */
.placeholder-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-400) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    font-size: 3rem;
}

/* ==========================================
   Project Detail Page
   ========================================== */
.project-content {
    flex: 1;
    padding: 2rem 0 4rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-medium);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    margin-bottom: 2rem;
}

.back-button:hover {
    background-color: var(--gray-200);
    color: var(--primary-dark);
}

.back-arrow {
    font-size: 1.25rem;
}

.project-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.project-description {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

.project-description h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-lighter);
}

#project-description-text {
    font-size: 1.05rem;
    color: var(--gray-700);
    line-height: 1.8;
}

#project-description-text p {
    margin-bottom: 1rem;
}

#project-description-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Image Gallery Section
   ========================================== */
.gallery-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

.gallery-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-lighter);
}

/* Main Gallery Display */
.gallery-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-image-container {
    flex: 1;
    position: relative;
    background-color: var(--gray-900);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.gallery-main-image:hover {
    transform: scale(1.02);
}

.gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Gallery Navigation Buttons */
.gallery-nav {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--primary-medium);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    flex-shrink: 0;
}

.gallery-nav:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.gallery-nav:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

.gallery-nav span {
    line-height: 1;
}

/* Thumbnail Strip */
.gallery-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-200);
}

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

.gallery-thumbnails::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.gallery-thumb {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    flex-shrink: 0;
    border: 3px solid transparent;
}

.gallery-thumb:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   Lightbox Modal
   ========================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
}

/* ==========================================
   Video Section
   ========================================== */
.video-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

.video-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-lighter);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background-color: var(--gray-900);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

.bottom-nav {
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    font-size: 0.95rem;
}

/* ==========================================
   Loading State
   ========================================== */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray-600);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--gray-600);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.error-message h3 {
    color: #e53e3e;
    margin-bottom: 1rem;
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Large Desktop (4 columns) */
@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (3 columns) */
@media (min-width: 900px) and (max-width: 1199px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet (2 columns) */
@media (min-width: 600px) and (max-width: 899px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header h1 {
        font-size: 2rem;
    }

    .project-title {
        font-size: 2rem;
    }
}

/* Mobile (1 column) */
@media (max-width: 599px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .header {
        padding: 1.5rem 0;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .header-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 2rem 0;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-description,
    .video-section,
    .gallery-section {
        padding: 1.5rem;
    }

    .project-description h2,
    .video-section h2,
    .gallery-section h2 {
        font-size: 1.25rem;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 15px;
    }

    /* Mobile Gallery Adjustments */
    .gallery-main {
        flex-direction: column;
    }

    .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        z-index: 10;
        background: rgba(44, 82, 130, 0.9);
    }

    .gallery-prev {
        left: 0.5rem;
    }

    .gallery-next {
        right: 0.5rem;
    }

    .gallery-image-container {
        width: 100%;
    }

    .gallery-thumb {
        width: 80px;
        height: 60px;
    }

    /* Mobile Lightbox Adjustments */
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) {
    .gallery-main-image:hover {
        transform: none;
    }

    .gallery-thumb:hover {
        transform: none;
        opacity: 0.6;
    }

    .gallery-thumb.active {
        opacity: 1;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .navbar,
    .back-button,
    .view-project-btn,
    .video-section,
    .gallery-nav,
    .lightbox {
        display: none;
    }

    body {
        background: white;
    }

    .project-card,
    .project-description,
    .gallery-section {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* Updated Thu, Jan 15, 2026  4:28:56 PM */

/* Clickable Thumbnail Link */
.project-thumbnail-link {
    display: block;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.project-thumbnail-link:hover {
    opacity: 0.9;
}
