:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #161616;
    --border-color: #222222;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-tertiary: #666666;
    --accent-color: #3498db;
    --accent-dark: #2980b9;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Left Panel Styles */
.left-panel {
    width: 35%;
    position: fixed;
    height: 100vh;
    background: var(--bg-secondary);
    padding: 2.5rem;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.profile-section {
    margin-bottom: 3rem;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    margin-bottom: 1.5rem;
}

.name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.bio {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.section-title {
    font-size: 1.1rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.tech-stack {
    margin-bottom: 2.5rem;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.stack-item {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stack-item:hover {
    transform: translateY(-5px);
}

.stack-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stack-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Right Panel Styles */
.right-panel {
    width: 65%;
    margin-left: 35%;
    padding: 2.5rem;
    background: var(--bg-primary);
}

.filters {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.projects-grid {
    display: grid;
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-media {
    position: relative;
    height: 400px;
    background: var(--bg-tertiary);
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 2rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.detail-group h4 {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.detail-group p {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-media:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

.project-stats {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    color: var(--accent-color);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .left-panel {
        position: relative;
        width: 100%;
        height: auto;
        padding: 2rem;
    }
    
    .right-panel {
        width: 100%;
        margin-left: 0;
    }
    
    .project-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.video-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.play-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

.video-container.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.project-content {
    padding: 2rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-description {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* ── Project Preview (non-video cards) ── */
.project-preview {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.preview-icon {
    font-size: 3.5rem;
    line-height: 1;
}

.preview-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.badge-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.live {
    background: #22c55e;
    color: #fff;
}

.badge.llc {
    background: var(--accent-color);
    color: #fff;
}

.badge.open-source {
    background: #8b5cf6;
    color: #fff;
}

/* ── Preview gradient backgrounds ── */
.chartsense-preview {
    background: linear-gradient(135deg, #0f2240 0%, #1d5fa8 60%, #2d7dd2 100%);
}

.smkauto-preview {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.perpulator-preview {
    background: linear-gradient(135deg, #1a0533 0%, #4a0e8f 60%, #7c3aed 100%);
}

.storageswipe-preview {
    background: linear-gradient(135deg, #0f1923 0%, #1e3a5f 50%, #2563eb 100%);
}

.threeddp-preview {
    background: linear-gradient(135deg, #1a0a0a 0%, #7f1d1d 60%, #b91c1c 100%);
}

.horizon-preview {
    background: linear-gradient(135deg, #042f2e 0%, #0f766e 60%, #14b8a6 100%);
}

/* ── Links section (sidebar) ── */
.links-section {
    margin-top: 2.5rem;
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ext-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ext-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.ext-link .arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.ext-link:hover .arrow {
    transform: translateX(4px);
}

/* ── Badge overlay on media ── */
.project-media {
    position: relative;
}

.media-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

/* ── Screenshot image ── */
.project-thumbnail {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* ── StorageSwipe no-demo sub-text ── */
.preview-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-top: 0.25rem;
}

/* ── StorageSwipe 4-up screenshot strip ── */
.ss-strip {
    display: flex;
    gap: 3px;
    background: #0a0a0a;
    height: 400px;
    overflow: hidden;
}

.ss-strip img {
    flex: 1;
    width: 0;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}