@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/space-grotesk.woff2') format('woff2');
}

:root {
    --bg: #050505;
    --text: #F2F2F2;
    --text-muted: #666666;
    --border: rgba(255, 255, 255, 0.08);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.profile {
    padding: 15vh 5% 10vh;
    max-width: 1400px;
    margin: 0 auto;
}

.profile-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.avatar {
    max-width: 400px;
    height: auto;
    object-fit: cover;
}

.bio h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.bio p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.works {
    max-width: 1400px;
    margin: 0 auto 15vh;
    padding: 0 5%;
}

.work-section {
    border-bottom: 1px solid var(--border);
}

.work-section:first-of-type {
    border-top: 1px solid var(--border);
}

.work-section summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5vh 0;
    cursor: pointer;
    list-style: none;
}

.work-section summary::-webkit-details-marker {
    display: none;
}

.work-section summary h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 200;
    letter-spacing: -0.05em;
    line-height: 1;
    transition: color 0.4s ease;
}

.work-section summary:hover h2 {
    color: var(--text-muted);
}

.toggle-icon {
    width: 22px;
    height: 22px;
    position: relative;
}

.toggle-icon::before, .toggle-icon::after {
    content: '';
    position: absolute;
    background-color: var(--text);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-icon::before { width: 100%; height: 1px; }
.toggle-icon::after { height: 100%; width: 1px; }

details[open] .toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.portfolio-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    margin-top: -1.5vh;
    margin-bottom: 3vh;
    animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 0 10vh 0;
    animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.carousel-track {
    display: flex;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 0 1vw;
    opacity: 0.3;
    transform: scale(0.85);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    cursor: default;
}

.slide-media {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.carousel-slide.active .slide-media iframe {
    pointer-events: auto;
}

.slide-caption {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.slide-tag {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.slide-title {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text);
}

.placeholder {
    font-size: 2rem;
    font-weight: 200;
    color: var(--text-muted);
}

/* Nav Buttons - Styled for dark mode */
.nav-btn {
    position: absolute;
    top: calc(50% - 5vh); /* Adjusted for padding */
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.nav-btn:hover svg {
    stroke: var(--bg);
}

.prev-btn { left: 2vw; }
.next-btn { right: 2vw; }


body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Semi-Diagonal Film Strip --- */
.filmstrip-wrap {
    position: absolute;
    top: -40px;
    left: -15vw;
    width: 130vw;
    height: 220px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.filmstrip {
    width: 100%;
    transform: rotate(-3.5deg);
    opacity: 0.55;
}

.film-track {
    position: relative;
    display: flex;
    width: max-content;
    background: #121212;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    animation: filmReel 120s linear infinite;
    will-change: transform;
}

.film-set {
    display: flex;
    flex-shrink: 0;
}

/* 16px sprocket pattern */
.film-track::before,
.film-track::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Crect x='3' y='1' width='10' height='10' rx='2' ry='2' fill='%23050505'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    z-index: 2;
}

.film-track::before {
    top: 4px;
}

.film-track::after {
    bottom: 4px;
}

.film-frame {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 176px;
    height: 66px;
    margin-right: 16px;
    padding: 3px 8px;
    background: #090909;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.film-window {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    height: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.05);
}

.edge-code {
    font-size: 7px;
    letter-spacing: 0.12em;
    color: #e09f3e;
    opacity: 0.7;
    font-family: monospace;
}

@keyframes filmReel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.profile {
    position: relative;
    z-index: 1;
}

.cv-wrapper {
    padding: 0 0 3rem 0;
    display: flex;
    flex-direction: column;
    animation: reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cv-wrapper .cv-category:first-child {
    margin-top: 0 !important;
}

.cv-category {
    margin: 2rem 0 0.5rem !important; 
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.cv-row {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s ease;
}

.cv-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.cv-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.08em;
    width: 100px;
    flex-shrink: 0;
}

.cv-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.cv-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
}

.cv-role {
    color: var(--text-muted);
    font-weight: 300;
}

.cv-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
    text-align: right;
    white-space: nowrap;
}


@media (max-width: 768px) {
    .profile {
        padding: 15vh 5% 5vh;
    }
    .profile-content {
        flex-direction: column;
        align-items: flex-start; 
        gap: 24px; 
    }

    .bio h1 {
        font-size: 2rem;
        padding-bottom: 0.5rem;
    }

    .avatar {
        max-width: 65%; 
    }

    .carousel-slide {
        flex: 0 0 85%;
        max-width: 85%;
    }
    
    .slide-media {
        aspect-ratio: 16 / 9;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
    }

.portfolio-subtitle {
        font-size: 1rem;
        margin-top: -1vh;
        margin-bottom: 2vh;
    }

    .cv-row {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 0;
    }
    
    .cv-info {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .cv-date {
        width: auto;
        margin-bottom: 0;
    }
    
    .cv-desc {
        text-align: left;
    }
}


.site-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 5%;
    margin-top: auto;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-content a {
    color: var(--text);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-content a:hover {
    opacity: 0.7;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.6;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.yt-facade {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}
.yt-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.yt-facade:hover img {
    opacity: 1;
}
.yt-facade button {
    position: absolute;
    width: 68px;
    height: 48px;
    background: rgba(33, 33, 33, 0.8);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    pointer-events: none;
}
.yt-facade:hover button {
    background: #ff0000;
}

.representation {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rep-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.rep-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.rep-details a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rep-details a:hover {
    color: var(--text-muted);
}

.rep-divider {
    color: var(--border);
    font-size: 0.8rem;
    user-select: none;
}

@media (max-width: 768px) {
    .rep-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .rep-divider {
        display: none;
    }
}
