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

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #fff;
    color: #000;
}

nav {
    display: flex;
    height: 100vh;
}

.column {
    border-right: 1px solid #000;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.column.parents {
    flex-shrink: 0;
    padding-right: 6rem;
    border-right: none;
    justify-content: flex-start;
}

.name-header {
    margin-bottom: 2rem;
}

.parent-items-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Lift the menu via a positioned offset rather than `transform`:
       a transform promotes this box to its own GPU layer, which caused
       intermittent repaint "stripe" ghosts of the active highlight when
       switching menu items. position/top repaints normally (no layer). */
    position: relative;
    top: -15%;
    /* The lift raises this (flex:1) box over the header; without this its
       empty upper area would intercept clicks meant for the name/icons. */
    pointer-events: none;
}

/* On short viewports the proportional lift would push the menu items up into
   the header and overlap the name/social icons. Drop the lift there; desktop /
   portrait-mobile keep the intended raised position. */
@media (max-height: 500px) {
    .parent-items-wrapper {
        top: 0;
    }
}

.profile-image {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
    cursor: pointer;
}

.profile-image.red {
    filter: url(#red-channel);
}

.profile-image.green {
    filter: url(#green-channel);
}

.profile-image.blue {
    filter: url(#blue-channel);
}

.name {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    cursor: pointer;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.social-links a:hover {
    opacity: 1;
}

.social-links img {
    width: 1rem;
    height: 1rem;
}

.column.children {
    width: 280px;
    flex-shrink: 0;
    background-color: #000;
    color: #fff;
    display: none;
    border-right: 1px solid #000;
    padding-right: 0;
}

.column.children.active {
    display: flex;
}

.column.content {
    width: 480px;
    flex-shrink: 0;
    border-right: none;
}

.column.content.info-active {
    border-left: 12px solid #000;
}

.column.external {
    flex: 1;
    border-right: none;
    display: none;
    padding: 0;
}

.column.external.active {
    display: block;
}

.external-iframe {
    width: 100%;
    height: 100vh;
    border: none;
}

.parent-item {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.02s ease;
    padding: 0.5rem 6rem 0.5rem 0.5rem;
    margin-left: -0.5rem;
    margin-right: -6rem;
    /* Re-enable clicks (parent wrapper sets pointer-events:none). */
    pointer-events: auto;
}

.parent-item.active {
    font-weight: bold;
    background-color: #000;
    color: #fff;
    opacity: 1;
}

.children-list {
    list-style: none;
    display: none;
    width: 100%;
}

.children-list.active {
    display: block;
}

.children-list li {
    margin-bottom: 1rem;
}

.children-list a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.02s ease;
    display: block;
    line-height: 1.4;
    padding-right: 2rem;
}

.children-list a.active {
    font-weight: bold;
    background-color: #fff;
    color: #000;
    padding: 0.3rem 2rem 0.3rem 0.5rem;
    margin-left: -0.5rem;
    margin-right: -1px;
    position: relative;
}

.content-iframe {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border: none;
    display: none;
}

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

.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.back-button {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: #000;
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 100;
}

.back-button.inverted {
    background: #fff;
    color: #000;
}

/* Hidden SVG container holding color-channel filters. */
.svg-defs {
    display: none;
}

/* Intermediate breakpoint: external column takes full screen when active */
@media (max-width: 1400px) {
    .column.external.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        z-index: 50;
        background: #fff;
    }
}

@media (max-width: 768px) {
    .back-button.visible {
        display: block;
    }

    nav {
        flex-direction: column;
    }

    .column {
        border-right: none;
        border-bottom: none;
        min-height: 100vh;
        padding: 1.5rem;
        display: none;
    }

    .column.parents {
        width: 100%;
        display: flex;
    }

    .column.parents.hidden {
        display: none;
    }

    .column.children {
        width: 100%;
    }

    .column.children.active {
        display: flex;
    }

    .column.children.hidden {
        display: none;
    }

    .column.content {
        width: 100%;
        display: none;
        overflow-x: hidden;
    }

    .column.content.mobile-active {
        display: flex;
    }

    .column.external {
        width: 100%;
        padding: 0;
    }

    .column.external.active {
        display: none;
    }

    .column.external.mobile-active {
        display: block;
    }
}
