/* Custom Fonts */
@font-face {
    font-family: 'Univers';
    src: url('fonts/Univers55Roman.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

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

html,
body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Univers', sans-serif;
    line-height: 1.4;
    color: #1a1a1a;
    background: #fff;
}

a {
    color: #1a1a1a;
    text-decoration: none;
}

::selection {
    background-color: rgb(242, 236, 207);
    color: cornflowerblue;
}

/* Cursor trailing dots */
.cursor-dot {
    position: fixed;
    width: 9px;
    height: 3px;
    background: black;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
}

/* Main layout */
.portfolio-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Fixed site header, spans full width, left-justified, stays put while panels scroll */
.site-header {
    flex-shrink: 0;
    text-align: left;
    padding: 1.5em 2em 1.2em;
    border-bottom: 1px solid #eee;
}

.panel-name {
    font-family: 'Univers', sans-serif;
    font-size: 1rem;
    font-weight: 100;
    margin-bottom: 0.3em;
}

.panel-name:hover {
    filter: blur(4px);
}

.panel-subtitle {
    font-family: 'Univers', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #999;
}

/* ===================== Split layout: sidebar 30 / work grid 70 ===================== */

.split-layout {
    flex: 1;
    min-height: 0;
    display: flex;
}

.cv-panel {
    flex: 0 0 30%;
    max-width: 30%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid #eee;
}

.cv-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 2em 1.8em;
}

.cv-panel-body::-webkit-scrollbar {
    display: none;
}

.work-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.work-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 2em 2em 4em;
}

.work-panel-body::-webkit-scrollbar {
    display: none;
}

/* ===================== Sidebar content: bio, tags, contact ===================== */

.bio-text {
    font-size: .9rem;
    line-height: 1.55;
    color: #444;
    margin-bottom: 2em;
}

.bio-link:hover {
    /* filter: blur(4px); */
    color: cornflowerblue;
}

.tag-section {
    margin-bottom: 1.8em;
}

.tag-heading {
    font-family: 'Univers', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: #999;
    margin-bottom: 0.6em;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.4em;
}

.tag {
    font-size: 0.85rem;
    color: #444;
    white-space: nowrap;
}

.tag:not(:last-child)::after {
    content: '·';
    margin-left: 0.7em;
    color: #ccc;
}

.view-cv-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #1a1a1a;
    margin: 0.4em 0 2em;
    padding-bottom: 1.6em;
    border-bottom: 1px solid #eee;
}

.view-cv-link:hover {
    color: cornflowerblue;
}

.contact-section {
    padding-top: 0.2em;
}

.contact-location {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.3em;
}

.contact-datetime {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.9em;
}

.contact-link {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5em;
}

.contact-link:hover {
    color: cornflowerblue;
}

/* ===================== Project card grid (right) ===================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2em 1.6em;
}

.project-card {
    display: block;
    cursor: pointer;
}

.project-card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f4f4;
    overflow: hidden;
    margin-bottom: 0.8em;
}

.project-card-thumb img,
.project-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card-title {
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 0.25em;
}

.project-card:hover .project-card-title {
    color: cornflowerblue;
}

.project-card-meta {
    font-size: 0.8rem;
    color: #999;
}

/* ===================== Project detail view (right panel) ===================== */

.project-detail-view {
    display: none;
}

.project-detail-view.active {
    display: block;
}

.project-close-btn {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1.5em;
}

.project-close-btn:hover {
    color: #1a1a1a;
}

.project-detail-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.4em;
}

.project-detail-meta-line {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1.4em;
}

.project-detail-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 1.6em;
}

.project-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-row {
    display: flex;
    gap: 10px;
}

.gallery-item {
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===================== Dedicated full-CV page ===================== */

.cv-full-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 500;
    flex-direction: column;
}

.cv-full-page.active {
    display: flex;
}

.cv-full-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.cv-full-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2.2em 2em 6em;
}

.cv-full-close {
    display: inline-block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 2.5em;
}

.cv-full-close:hover {
    color: #1a1a1a;
}

.cv-full-title {
    font-family: 'Univers', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    color: #1a1a1a;
    margin-bottom: 2em;
}

.cv-full-item {
    margin-bottom: 2.2em;
}

.cv-full-heading {
    font-family: 'Univers', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 1em;
    text-align: left;
}

.cv-full-entry {
    margin-bottom: 1.4em;
    text-align: left;
}

.cv-full-role {
    font-family: 'Univers', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 0.2em;
}

.cv-full-company {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.3em;
}

.cv-full-location {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.3em;
}

.cv-full-details {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.4;
    max-width: 480px;
}

.cv-full-skills {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    text-align: left;
}

.cv-full-contact {
    margin-top: 2.4em;
    padding-top: 1.8em;
    border-top: 1px solid #eee;
}

.cv-full-contact-location {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.3em;
}

.cv-full-contact-datetime {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 1em;
}

.cv-full-contact-link {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.5em;
}

.cv-full-contact-link:hover {
    color: cornflowerblue;
}

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

.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: #ccc;
    cursor: pointer;
    text-decoration: none;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: #999;
}

.image-lightbox::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    z-index: -1;
}

.lightbox-nav-prev,
.lightbox-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 32px;
    padding: 16px 12px;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
    font-weight: 300;
    letter-spacing: 0.1em;
    display: block;
}

.lightbox-nav-prev:hover,
.lightbox-nav-next:hover {
    color: #999;
}

.lightbox-nav-prev {
    left: 20px;
}

.lightbox-nav-next {
    right: 20px;
}

.lightbox-counter {
    display: none !important;
}

/* ===================== Responsive ===================== */

.mobile-toggle-nav {
    display: none;
}

@media (max-width: 725px) {
    body {
        font-size: 14px;
    }

    .mobile-toggle-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1em;
        padding: 0 1em 1em 1em;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
    }

    .mobile-toggle-link {
        font-size: 0.85rem;
        color: #999;
        cursor: pointer;
    }

    .mobile-toggle-link:hover {
        color: #1a1a1a;
    }

    .mobile-toggle-link.active {
        color: #1a1a1a;
        font-weight: 400;
    }

    .mobile-toggle-divider {
        color: #eee;
        font-size: 0.95rem;
    }

    .split-layout {
        overflow: hidden;
    }

    /* Only one panel shows at a time on mobile, toggled via the nav above */
    .cv-panel,
    .work-panel {
        display: none;
    }

    .cv-panel.mobile-active,
    .work-panel.mobile-active {
        display: flex;
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        min-height: 0;
        border: none;
    }

    .work-panel-body {
        padding: 1.5em;
    }

    .site-header {
        padding: 1.2em 1.5em 1em;
        text-align: center;
        border-bottom: none;
    }

    .cv-full-page .site-header {
        border-bottom: 1px solid #eee;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.5em 1em;
    }

    .cv-full-container {
        padding: 1.6em 1.5em 4em;
    }
}