:root {
    --primary: #00bdfe;
    --accent: #e29578;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --border: #e5e5e5;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    padding: 1rem;
}

.portfolio-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.screen-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    gap: 1rem;
    background: var(--bg-primary);
}

.company-logo {
    width: 120px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.screen-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.portfolio-list {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .portfolio-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .screen-header {
        padding: 2rem;
        gap: 1.25rem;
    }

    .company-logo {
        width: 250px;
    }

    .screen-title {
        font-size: 2rem;
    }
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.05s; }
.portfolio-item:nth-child(2) { animation-delay: 0.1s; }
.portfolio-item:nth-child(3) { animation-delay: 0.15s; }
.portfolio-item:nth-child(4) { animation-delay: 0.2s; }
.portfolio-item:nth-child(5) { animation-delay: 0.25s; }
.portfolio-item:nth-child(6) { animation-delay: 0.3s; }
.portfolio-item:nth-child(7) { animation-delay: 0.35s; }
.portfolio-item:nth-child(8) { animation-delay: 0.4s; }
.portfolio-item:nth-child(9) { animation-delay: 0.45s; }
.portfolio-item:nth-child(10) { animation-delay: 0.5s; }

.portfolio-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.portfolio-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.portfolio-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.youtube-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #ff0000;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
}

.youtube-icon-btn:hover {
    background-color: #cc0000;
    transform: scale(1.08);
}

.youtube-icon-btn.disabled {
    background-color: #e5e5e5;
    cursor: not-allowed;
    opacity: 0.6;
}

.portfolio-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.portfolio-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.know-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.know-more-btn:hover {
    background: var(--primary);
    color: white;
}

/* Modal Styles */
#videoModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

#videoModal .modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: black;
    border-radius: 8px;
    overflow: hidden;
}

#closeModal {
    position: absolute;
    top: -40px;
    right: 0;
    background: #ff0000;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#youtubeFrame {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
}
