/* ========================================
   Black & White — Exploration
   Benaja Raphael Heger
   ======================================== */

/* ---------- Reset ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #000;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    /* smooth scrolling for hash links */
    scroll-behavior: smooth;
}

/* ===================================================================
   NAVIGATION BAR
   =================================================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    display: flex;
    justify-content: flex-end;
    gap: 3vw;
    padding: 2rem 4rem;
    box-sizing: border-box;
    /* Magic color inversion */
    mix-blend-mode: difference;
    color: white;
}

.main-nav a {
    color: inherit;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.main-nav a:hover {
    opacity: 0.5;
}

.nav-logo {
    margin-right: auto;
}

/* ===================================================================
   NEW PAGES (BACKGROUND & CONTACT)
   =================================================================== */
.page-container {
    min-height: 100vh;
    padding: 8rem 4rem 4rem 4rem;
    box-sizing: border-box;
    background: #fff;
    color: #000;
}

.page-title {
    font-size: clamp(4rem, 10vw, 15rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.85;
    margin: 0 0 4rem 0;
}

.education-timeline {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 2.5rem;
    max-width: 1360px;
    margin-left: 2vw;
}

.timeline-years {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 52rem;
    padding-right: 1.75rem;
    list-style: none;
}

.timeline-years::before {
    content: '';
    position: absolute;
    top: 0.7rem;
    bottom: 0.7rem;
    right: 0;
    width: 4px;
    background: #000;
}

.timeline-years li {
    position: relative;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.6;
}

.timeline-years li:first-child::after {
    content: '';
    position: absolute;
    top: 0.3rem;
    right: calc(-1.75rem - 4px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #000;
}

.education-history {
    min-width: 0;
    list-style: none;
}

.education-period--current {
    padding-bottom: 7rem;
}

.education-dates {
    font-size: 0.8rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
}

.education-track {
    min-width: 0;
}

.education-track--parallel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 5rem);
}

.education-item {
    min-width: 0;
}

.education-item > .education-dates {
    margin-bottom: 1rem;
}

.education-dates,
.education-context {
    color: #666;
}

.education-school {
    font-size: clamp(1.65rem, 2.5vw, 2.2rem);
    font-weight: bold;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin: 0 0 1rem 0;
}

.education-period--current .education-school {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.education-degree {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    opacity: 0.8;
}

.education-details {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.7;
}

.education-details p + p {
    margin-top: 1.5rem;
}

.education-course {
    margin-top: 1.8rem;
}

.education-course .education-degree {
    margin-bottom: 0.25rem;
}

.education-course .education-dates {
    margin-bottom: 0.75rem;
}

@media (max-width: 1000px) {
    .background-page .page-container {
        padding-right: 2rem;
        padding-left: 2rem;
    }

    .education-timeline {
        grid-template-columns: 4.5rem minmax(0, 1fr);
        gap: 2rem;
        margin-left: 0;
    }

}

@media (max-width: 760px) {
    .background-page .main-nav {
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: space-between;
        gap: 1rem;
        padding: 1.5rem;
    }

    .background-page .main-nav a {
        font-size: 0.8rem;
    }

    .background-page .nav-logo {
        grid-column: 1 / -1;
    }

    .background-page .page-container {
        padding: 9rem 1.5rem 3rem;
    }

    .background-page .page-title {
        font-size: clamp(2rem, 10vw, 4.5rem);
        margin-bottom: 3rem;
    }

    .education-timeline {
        grid-template-columns: 4rem minmax(0, 1fr);
        gap: 1.25rem;
    }

    .timeline-years {
        padding-right: 1.1rem;
        min-height: 0;
    }

    .timeline-years li {
        font-size: 0.8rem;
    }

    .timeline-years li:first-child::after {
        right: calc(-1.1rem - 4px);
    }

    .education-track--parallel {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 5rem;
}

.contact-link {
    font-size: clamp(3rem, 8vw, 10rem);
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    transition: transform 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    transform: translateX(20px);
}

::selection {
    background: #000;
    color: #fff;
}

a { text-decoration: none; color: inherit; }

img, video {
    display: block;
    max-width: 100%;
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-word {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.name-line {
    display: block;
    font-size: clamp(3rem, 10vw, 9rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-family: 'Inter', sans-serif;
    color: #000;
    text-transform: uppercase;
}

.name-line .char {
    display: inline-block;
    opacity: 0;
    animation: charReveal 0.15s ease-out forwards;
}

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

/* ---------- Definition ---------- */
.definition {
    max-width: 620px;
    margin: 0 auto;
}

.phonetic {
    font-size: 1.1rem;
    color: #999;
    margin-bottom: 16px;
    font-style: italic;
}

.def-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    font-weight: 400;
}

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

/* ---------- Scroll Hint ---------- */
.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #bbb;
    animation: bobUpDown 2.5s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes bobUpDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(10px); }
}

/* ===================================================================
   MAXIM SECTION
   =================================================================== */
.maxim-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: #fff;
    color: #000;
    padding: 0;
}

#transition-canvas-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: clamp(70px, 10vw, 140px);
    pointer-events: none;
    z-index: 2;
}

#transition-canvas-container canvas,
.panel-transition canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.maxim-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    padding-right: 60px;
}

.maxim-image {
    overflow: hidden;
    padding-top: 40px;
}

.maxim-image img {
    width: 100%;
    height: calc(100vh - 40px);
    object-fit: cover;
    object-position: center top;
}

.maxim-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.motto-sub {
    font-size: 1rem;
    color: #888;
    font-weight: 400;
    margin-top: 16px;
    font-style: italic;
}

/* ===================================================================
   BIG TEXT
   =================================================================== */
.big-text {
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

/* ===================================================================
   SECTION HEADERS
   =================================================================== */
.section-header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    position: relative;
}

.section-title {
    font-size: clamp(4rem, 15vw, 25rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    line-height: 0.85;
    margin: 0;
    width: 100%;
    text-align: center;
}

.distorted-letter {
    display: inline-block;
    position: relative;
    animation: letter-jitter 0.15s infinite;
}

@keyframes letter-jitter {
    0% { transform: skew(0deg) translate(0px, 0px); opacity: 1; }
    25% { transform: skew(-20deg) translate(-2px, 3px); opacity: 0.8; }
    50% { transform: skew(15deg) translate(3px, -2px); opacity: 0.9; }
    75% { transform: skew(-10deg) translate(-3px, -1px); opacity: 0.7; }
    100% { transform: skew(5deg) translate(2px, 2px); opacity: 1; }
}

/* ===================================================================
   MEDIA SECTIONS — No gaps, full width, no cropping
   =================================================================== */
.media-section {
    width: 100%;
    position: relative;
    background: #000;
    z-index: 1;
}

/* Label overlaid on media */
.label-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index: 6;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hiking-wrapper {
    top: 75%;
}

.media-label {
    font-size: clamp(4rem, 20vw, 35rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #fff;
    text-shadow: 0 10px 40px rgba(0,0,0,0.8);
    line-height: 0.85;
    text-transform: uppercase;
}

.app-label {
    font-size: clamp(3rem, 13vw, 20rem);
}

.learn-more {
    display: inline-block;
    margin-top: 1rem;
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.learn-more:hover {
    opacity: 1;
}.media-container {
    width: 100%;
    position: relative;
    background: #000;
    line-height: 0;
    overflow: visible;
    z-index: 1;
}

/* Smaller variant — scales content down, no cropping */
.media-container--small {
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-container--small .media-video,
.media-container--small .media-image {
    width: 75%;
    margin: 0 auto;
}

/* Default media — full width, natural aspect ratio, NO cutoff */
.media-video {
    width: 100%;
    display: block;
}

.media-image {
    width: 100%;
    display: block;
}

/* ===================================================================
   GLITCH OVERLAY CANVASES
   =================================================================== */
.glitch-canvas {
    pointer-events: none;
    z-index: 4;
}

/* ===================================================================
   PIANO PLAY BUTTON
   =================================================================== */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 5;
}

.play-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===================================================================
   INFO PANEL
   =================================================================== */
.media-section.panel-open .label-wrapper {
    left: 33.33%;
    transform: translate(-50%, -50%) scale(0.666);
}

.media-section.panel-open .hiking-wrapper {
    transform: translate(-50%, -50%) scale(0.666);
}

.media-section.panel-open .learn-more {
    opacity: 0;
    pointer-events: none;
}

.info-panel {
    position: absolute;
    top: 0;
    right: -33.33%;
    width: 33.33%;
    min-height: 100%;
    background: #fff;
    color: #000;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    box-sizing: border-box;
    transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel-transition {
    position: absolute;
    left: 0;
    width: 100%;
    height: clamp(40px, 6vw, 80px);
    pointer-events: none;
}

.panel-transition--top {
    bottom: calc(100% - 1px);
}

.panel-transition--bottom {
    top: calc(100% - 1px);
}

.media-section.panel-open .info-panel {
    right: 0;
}

.media-section.panel-open {
    z-index: 20;
}


.info-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.info-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.info-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2rem;
}

.app-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.app-item {
    /* Borders removed as requested */
}

.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 4px; /* Added left/right padding to prevent clipping */
    cursor: pointer;
    transition: opacity 0.3s;
}

.app-header:hover {
    opacity: 0.7;
}

.app-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: contain; /* Changed from cover to prevent cropping */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: transparent; /* In case of transparent PNGs */
}

.app-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.app-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.5;
}

.app-item.expanded .app-toggle {
    transform: rotate(180deg);
}

.app-desc-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-item.expanded .app-desc-wrapper {
    grid-template-rows: 1fr;
}

.app-desc-inner {
    min-height: 0;
    overflow: hidden;
}

.app-desc {
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
    padding-bottom: 1.5rem;
    margin: 0;
}

.app-link {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.app-link:hover {
    opacity: 0.7;
}

.close-panel {
    align-self: flex-start;
    background: none;
    border: none;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 0;
    position: relative;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.close-panel:hover {
    opacity: 0.6;
}

/* ===================================================================
   SCROLL REVEAL
   =================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.definition .reveal:nth-child(1) { transition-delay: 0.5s; }
.definition .reveal:nth-child(2) { transition-delay: 0.65s; }

.maxim-text .reveal:nth-child(1) { transition-delay: 0.1s; }
.maxim-text .reveal:nth-child(2) { transition-delay: 0.55s; }
.maxim-text .reveal:nth-child(3) { transition-delay: 1.0s; }
.maxim-text .reveal:nth-child(4) { transition-delay: 1.5s; }

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 5rem 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    z-index: 10;
}

.site-footer p {
    margin: 0;
    position: relative;
    z-index: 10;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 900px) {
    .maxim-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0;
    }

    .maxim-image img {
        height: 60vh;
    }

    .maxim-text {
        padding: 0 24px;
    }

    .label-wrapper {
        top: 20px;
        left: 20px;
        transform: none;
        text-align: left;
    }

    .info-panel {
        width: 100%;
        right: -100%;
        padding: 2rem;
    }
    
    .media-section.panel-open .label-wrapper {
        left: 20px;
        transform: none;
        opacity: 0;
    }

    .section-header {
        padding: 80px 24px;
    }

    .media-container--small .media-video,
    .media-container--small .media-image {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .big-text {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .scroll-hint {
        display: none;
    }

    .maxim-section {
        padding: 60px 0;
    }

    .play-btn {
        width: 72px;
        height: 72px;
    }

    .play-btn svg {
        width: 36px;
        height: 36px;
    }

    .label-wrapper {
        top: 16px;
        left: 16px;
        transform: none;
        text-align: left;
    }

    .media-container--small .media-video,
    .media-container--small .media-image {
        width: 100%;
    }
}

/* ===================================================================
   CATEGORY ACCORDION
   =================================================================== */
.category-item {
    max-width: 800px;
    margin: 4rem auto 0;
    padding-bottom: 1.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: opacity 0.3s;
}

.category-header:hover {
    opacity: 0.7;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.category-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.5;
}

.category-item.expanded .category-toggle {
    transform: rotate(180deg);
}

.category-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-item.expanded .category-content-wrapper {
    grid-template-rows: 1fr;
}

.category-content-inner {
    min-height: 0;
    overflow: hidden;
}

/* ===================================================================
   CHAPTER ONE OVERLAY
   =================================================================== */
.chapter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease;
}

.chapter-title {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 768px) {
    .chapter-title {
        font-size: 2.5rem;
    }
}

/* ===================================================================
   CHAPTER TWO SECTION
   =================================================================== */
.chapter-two-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 2rem;
}

#chapter-two-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
    z-index: 2;
    background: #000;
}

#exploitation-screen {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.exploitation-def {
    margin-bottom: 3rem;
}

#exploitation-word {
    font-size: clamp(2rem, 9vw, 8rem);
    margin-bottom: 1rem;
    color: #fff;
    white-space: nowrap;
}

#exploitation-screen .name-line {
    color: #fff;
}

#exploitation-screen .def-text {
    color: #eee;
}

#exploitation-screen .phonetic {
    color: #aaa;
}

.exploitation-desc {
    max-width: 800px;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #ddd;
}

.chapter-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}
.chapter-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .exploitation-desc {
        font-size: 1.2rem;
    }
}
