/* =========================================
   Design Tokens & Themes
   ========================================= */

:root {
    /* Light Theme (Default) */
    --bg-color: #F4F4F4;
    --text-color: #333333;
    --accent-color: #777777;
    --card-bg: #ffffff;
    --border-color: #dddddd;
    --highlight: #000000;

    --font-mono: 'JetBrains Mono', monospace;
    --spacing-unit: 1rem;
    --header-height: 120px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: #999999;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --highlight: #ffffff;
}

/* =========================================
   Base Layout
   ========================================= */

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-y: scroll;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-speed);
}

a:hover {
    opacity: 0.6;
}

/* =========================================
   Header & Theme Toggle
   ========================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: calc(var(--spacing-unit) * 1) 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}

.header-left,
.header-right {
    flex: 1;
}

.header-right {
    text-align: right;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 5px;
    transition: transform var(--transition-speed);
}

.theme-btn:hover {
    transform: rotate(15deg);
}

.role-nav {
    max-width: 1200px;
    margin: calc(var(--spacing-unit) * 1) auto 0;
    padding: 0 calc(var(--spacing-unit) * 2);
}

.role-nav ul {
    list-style: none;
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    overflow-x: auto;
    scrollbar-width: none;
}

.role-nav ul::-webkit-scrollbar {
    display: none;
}

.role-nav a {
    font-size: 0.85rem;
    text-transform: lowercase;
    opacity: 0.4;
    white-space: nowrap;
    position: relative;
    padding-bottom: 4px;
}

.role-nav a.active {
    opacity: 1;
}

.role-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
}

/* =========================================
   Hero Section
   ========================================= */

/* =========================================
   Hero Section
   ========================================= */

.hero-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding: 2rem 0 4rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    flex: 2;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 280px;
    height: 280px;
    border: 1px dashed var(--border-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0.4;
    text-align: center;
    color: var(--text-color);
    background: transparent;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-bio {
    font-size: 1.1rem;
    max-width: 650px;
    opacity: 0.9;
}

.highlight {
    font-weight: 700;
}

/* =========================================
   Navigation (Below Hero)
   ========================================= */

.sticky-nav {
    position: sticky;
    top: 60px;
    /* Accounts for fixed header thickness if any */
    background-color: var(--bg-color);
    z-index: 50;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================================
   Projects & Cards
   ========================================= */

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 2rem) calc(var(--spacing-unit) * 2) 8rem;
}

.role-section {
    display: none;
    animation: fadeIn 0.6s ease forwards;
}

.role-section.active-section {
    display: block;
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 3rem;
    opacity: 0.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 3rem;
}

.text-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1rem;
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.card-image-container {
    width: 100%;
    aspect-ratio: 3 / 4;
    /* A4-ish Vertical Alignment */
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.poster-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.4;
    padding: 1rem;
    text-align: center;
}

.play-icon {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.project-card:hover .play-icon {
    opacity: 0.7;
}

.card-info {
    padding: 1.5rem 0 0.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.card-meta {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: auto;
}

/* Text Cards */
.text-card {
    aspect-ratio: auto;
    padding: 2rem;
}

.text-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.text-card .card-title {
    font-size: 1.25rem;
}

/* =========================================
   Lightbox
   ========================================= */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 500px;
}

.lightbox-content.wide {
    max-width: 1000px;
}

.close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
}

.iframe-container {
    width: 100%;
    position: relative;
    padding-bottom: 177.78%;
    /* 9:16 default */
    background: #000;
}

.lightbox-content.wide .iframe-container {
    padding-bottom: 56.25%;
    /* 16:9 */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Mobile
   ========================================= */

@media (max-width: 768px) {
    .header-content {
        padding: 0 1.5rem;
    }

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

    .content {
        padding-top: calc(var(--header-height) + 1rem);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .text-grid {
        grid-template-columns: 1fr;
    }
}