:root {
    --bg-color: #0d0d0d;
    --text-color: #f4f4f4;
    --color-primary: #6C6CCE;
    --color-secondary: #74C9AA;
    --border-color: #333333;
    --surface-light: rgba(116, 201, 170, 0.05);
}

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

body {
    font-family: 'Geist Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    text-transform: uppercase;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 5%;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(13, 13, 13, 0.95);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-primary);
}

.contact-info {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
}

.contact-info p {
    margin-bottom: 0.25rem;
}

/* Main Container */
.portfolio-container {
    padding: 4rem 5%;
}

.category-section {
    margin-bottom: 6rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.category-section:first-child {
    border-top: none;
    padding-top: 0;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--color-primary);
    display: inline-block;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.5rem;
}

.subcategory-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 3rem 0 1.5rem 0;
    color: #aaa;
}

.subcategory-title .roles {
    font-size: 0.8rem;
    color: var(--color-secondary);
    margin-left: 0.5rem;
}

/* Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.video-wrapper {
    background: #111;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; /* Fixes the external card absolute positioning */
}

.video-wrapper:hover {
    transform: translateY(-5px);
    border-color: var(--color-secondary);
}

/* Aspect Ratio for IFrames */
.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    background: #000;
    display: block;
}

.video-info {
    padding: 1rem;
    background: #151515;
    flex-grow: 1;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.video-year {
    font-size: 0.8rem;
    color: #888;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: rgba(108, 108, 206, 0.1);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* External Video Card Styling */
.external-video-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    aspect-ratio: 16 / 9;
    background-color: var(--surface-light);
    border-bottom: 1px solid var(--border-color); /* Match internal border */
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
}

.video-wrapper:hover .external-video-card {
    background-color: rgba(108, 108, 206, 0.1);
}

/* Provide spacing so the info div doesn't overlap the absolute positioned card */
.video-wrapper:has(.external-video-card) {
    padding-top: calc(100% * 9 / 16); /* Force 16:9 ratio placeholder */
}

.external-title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.external-icon {
    font-size: 1.5rem;
    color: var(--color-secondary);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.video-wrapper:hover .external-icon {
    color: var(--color-primary);
}

.external-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-family: 'Geist Mono', monospace;
    line-height: 1.3;
}

.external-subtitle {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Footer */
.site-footer {
    padding: 2rem 5%;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 5%;
    }
    .contact-info {
        text-align: left;
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
    .category-section {
        margin-bottom: 4rem;
    }
}

/* --- Tabs Navigation --- */
.portfolio-nav-section {
    padding: 3rem 5% 0 5%;
    text-align: left;
}

.nav-heading {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: 'Geist Mono', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--color-primary);
}

.tab-btn.active {
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    border-radius: 4px;
    background: rgba(116, 201, 170, 0.05);
}

/* --- Tabs Content --- */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

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

.coming-soon-message {
    text-align: center;
    padding: 6rem 1rem;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    margin-top: 2rem;
}

.coming-soon-message h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

/* --- Hero Bio --- */
.hero-bio {
    padding: 2rem 5% 0 5%;
    max-width: 800px;
}

.hero-bio p {
    font-size: 0.95rem;
    color: #999;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-transform: none; /* Keep the bio readable with normal casing, or use uppercase if strict */
}

.highlight-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(108, 108, 206, 0.4);
    text-underline-offset: 4px;
}

.highlight-link:hover {
    color: var(--color-secondary);
    text-decoration-color: var(--color-secondary);
}
