/* Global Reset and Typography */
:root {
    --accent: #004DAF;
    /* Vivid Dark Blue Highlight */
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Geneva', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #111;
    background-color: #fafafa;
    height: 100%;
}

/* Top Navigation Bar */
.top-bar {
    position: sticky;
    top: 0;
    background-color: #fafafa;
    border-bottom: 1px solid #111;
    padding: 15px 30px;
    z-index: 100;
}

.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: -0.5px;
    cursor: pointer;
    transition: color 0.2s;
}

.site-title:hover {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    cursor: pointer;
    text-decoration: none;
    color: #777;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

/* Content Area */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
}



.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Start View (Fullscreen fixed) */
.start-fullscreen {
    height: calc(100vh - 61px);
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

.start-fullscreen.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.start-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    text-align: center;
}

.start-title {
    font-size: 6vh;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0 0 1vh 0;
}

.start-subtitle {
    font-size: 2vh;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 4vh 0;
}

.start-video-wrapper {
    width: min(800px, 100%, calc(55vh * 4 / 3));
    max-height: 55vh;
    margin: 0 auto 4vh auto;
    border: 4px solid #111;
    background: #ffffff;
    box-shadow: 8px 8px 0 #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    /* needed for ::after overlay */
}

/* Balatro-style scanline overlay */
.start-video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.10) 0px,
            rgba(0, 0, 0, 0.10) 2px,
            transparent 2px,
            transparent 4px);
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: multiply;
}

.start-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.start-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.start-intro-text {
    max-width: 600px;
}

.start-intro-text p {
    font-size: 2.2vh;
    line-height: 1.5;
    color: #444;
    margin: 0;
}

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

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

/* Projects List */
#projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 40px;
}

.project-card {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-hero {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border: 1px solid #111;
    background-color: #eaeaea;
}

.project-hero-wrapper {
    position: relative;
    overflow: hidden;
}

.project-hero-wrapper img {
    transition: transform 0.4s ease;
}

.project-card:hover .project-hero-wrapper img {
    transform: scale(1.02);
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    border-bottom: 2px solid #111;
    padding-bottom: 10px;
    transition: all 0.2s ease;
}

.project-card:hover .project-info {
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.project-title {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.project-icon {
    font-size: 24px;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.project-card:hover .project-icon {
    transform: translateX(6px);
    /* Arrow moves right */
}

/* Single Project Details */
.back-link {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 40px;
    padding: 0;
    color: #777;
    text-decoration: underline;
    transition: color 0.2s;
}

.back-link:hover {
    color: #111;
}

.project-detail {
    display: flex;
    flex-direction: column;
}

/* Project detail: single 1000px column, everything left-aligned within it */
.project-detail {
    max-width: 1000px;
    margin: 0 auto;
    display: block;
}

.detail-header {
    margin-bottom: 40px;
}

.detail-title {
    font-size: 40px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin: 0 0 10px 0;
}

.detail-meta {
    display: flex;
    gap: 30px;
    font-size: 13px;
    text-transform: uppercase;
    color: #777;
    border-bottom: 1px solid #111;
    padding-bottom: 15px;
    font-weight: bold;
}

.detail-hero {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #111;
}

.magazine-spread {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 30px;
    row-gap: 0; /* Removed for manual control over section spacing */
    margin-top: 70px;
    padding-bottom: 120px;
    align-items: start;
}

/* Column spans */
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* Section chapter header — spans full row, like "01  BACKGROUND" */
.chapter-header {
    grid-column: span 12;
    display: flex;
    align-items: baseline;
    gap: 20px;
    border-top: 1px solid #ccc;
    padding-top: 30px;
    margin-top: 50px; /* Reduced from 80px for tighter layout */
    margin-bottom: 40px; 
}

.chapter-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    letter-spacing: -0.5px;
    line-height: 1;
    font-family: 'Geneva', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.chapter-title {
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: #111;
    margin: 0;
    line-height: 1;
    font-family: 'Geneva', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Custom Header Alignments */
.chapter-header.right-align {
    justify-content: flex-end;
    text-align: right;
}

/* Body text column */
.mag-text h3 {
    font-size: 22px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.2px;
    color: #111;
    margin: 0 0 16px 0;
}

.mag-text p {
    font-size: 17px;
    line-height: 1.3; /* Tight, high-density spacing */
    color: #444;
    margin: 0 0 24px 0; /* Space between paragraphs */
}

.mag-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #eee;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
}

.mag-img {
    width: 100%;
    aspect-ratio: 4/3; 
    object-fit: cover;
    display: block;
    background-color: #eee;
    border: 1px solid #000;
}

.result-img-full {
    width: 100%;
    height: auto;
    aspect-ratio: auto; 
    display: block;
    border: 1px solid #000;
    margin-bottom: 40px; /* Space between stacked result images */
}

.mag-slideshow {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

/* What / Why / Who intro row */
.intro-questions {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 30px;
    grid-column: span 12;
    padding-bottom: 40px; /* Reduced from 80px to close gap to the first header line */
}

.intro-questions .mag-text h3 {
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--accent);
    margin: 0 0 25px 0; /* More air below intro titles */
}

.intro-questions .mag-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Hero */
.hero-opener {
    margin-bottom: 70px;
}

.hero-opener img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lead accent text - used as intro/summary */
.mag-text-highlight {
    font-size: 22px;
    line-height: 1.4;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
}

.mag-conclusion {
    font-size: 17px;
    line-height: 1.75;
    color: #444;
}

/* Layout Utilities for Asymmetry */
.col-off-1 { grid-column-start: 2; }
.col-off-2 { grid-column-start: 3; }

.mag-center-10 {
    grid-column: 2 / span 10;
}

.mag-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Specific alignments for 5/6 split with central gap */
.mag-col-left-5  { grid-column: 1 / span 5; }
.mag-col-right-5 { grid-column: 8 / span 5; }
.mag-col-left-6  { grid-column: 1 / span 6; }
.mag-col-right-6 { grid-column: 7 / span 6; }

/* History Timeline (Chapter 03 Special) */
.mag-text-2col {
    grid-column: span 12;
    column-count: 2;
    column-gap: 60px;
    margin-bottom: 50px;
    column-fill: auto;
}

.mag-text-2col p:first-child {
    margin-top: 0;
}

.timeline-horizontal {
    grid-column: span 12;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-top: 0;
    margin-top: 50px;
}

/* The horizontal axis line positioned strictly at 220px */
.timeline-horizontal::before {
    content: '';
    position: absolute;
    top: 180px; 
    left: 0;
    right: 40px; /* Shortened to avoid colliding with dividers */
    height: 1px;
    background: #ccc;
    z-index: 1;
}

/* Arrowhead indicating progression */
.timeline-horizontal::after {
    content: '';
    position: absolute;
    top: 180px;
    right: 38px; /* Offset matching the shortened line */
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid #ccc;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-h-item {
    width: 30%;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Image container area to prevent weird cropping */
.timeline-img-box {
    width: 240px; 
    height: 160px; /* Fixed height for consistency */
    display: flex;
    align-items: flex-end; 
    justify-content: flex-start;
    margin-bottom: 20px; 
}

.timeline-h-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 1px solid #000;
    background: #eee;
}

/* Markers on the line - Anchored precisely to the 220px axis */
.timeline-h-item::before {
    content: '';
    position: absolute;
    top: 180px; /* Centered between images and dates */
    left: 0;
    width: 11px;
    height: 11px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateY(-50%); /* Centering foolproofly on the 1px line */
    z-index: 2;
}

.timeline-h-date {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px; /* Spacing below the axis line */
    margin-bottom: 10px;
}

.timeline-h-caption {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.timeline-h-caption strong {
    color: #000;
    display: block;
    margin-bottom: 4px;
}

/* Evolution Interactive Scroller (Chapter 04) */
.evolution-scroller {
    grid-column: span 12;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding: 40px 0;
    margin-top: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
    /* Dynamic masks: 0 = transparent (fade), 1 = opaque (no fade) */
    --mask-l: 1;
    --mask-r: 0;
    mask-image: linear-gradient(to right, 
        rgba(0,0,0, var(--mask-l)) 0, 
        black 40px, 
        black calc(100% - 40px), 
        rgba(0,0,0, var(--mask-r)) 100%);
    -webkit-mask-image: linear-gradient(to right, 
        rgba(0,0,0, var(--mask-l)) 0, 
        black 40px, 
        black calc(100% - 40px), 
        rgba(0,0,0, var(--mask-r)) 100%);
}

.evolution-scroller::-webkit-scrollbar {
    height: 6px;
}

.evolution-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.evolution-scroller::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.evo-item {
    flex: 0 0 330px; /* Slightly wider to break perfect 3-column alignment on 1000px grids */
    scroll-snap-align: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.evo-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f4f4f4;
    border: 1px solid #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-family: 'Geneva', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.evo-placeholder span {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #ddd;
}

.evo-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border: 1px solid #111;
    background-color: #eee;
    transition: transform 0.3s ease;
}

.evo-item:hover .evo-img {
    transform: scale(1.02);
}

/* Subtle depth effect for the scroller items */
.evolution-scroller:active .evo-item {
    cursor: grabbing;
}

/* About View */
.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 80px;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.profile-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, #eaeaea, #eaeaea 5px, #fafafa 5px, #fafafa 10px);
}

.profile-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-section h3 {
    margin: 0 0 15px 0;
    border-bottom: 1px solid #111;
    padding-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
}

.contact-section p,
.contact-section li {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.5;
}

.contact-section ul {
    padding-left: 20px;
    margin: 0;
}

.about-main h2 {
    margin: 0 0 40px 0;
    font-size: 36px;
    font-weight: normal;
    border-bottom: 2px solid #111;
    padding-bottom: 15px;
}

.cv-section {
    margin-bottom: 50px;
}

.cv-section h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: normal;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.cv-item {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
}

.cv-year {
    width: 130px;
    flex-shrink: 0;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.cv-details {
    flex: 1;
    font-size: 17px;
    line-height: 1.6;
}

//* Kenneth View */
#kenneth-view {
    height: calc(100vh - 61px);
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

#kenneth-view.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.kenneth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1000px;
    margin: 0;
    padding: 30px;
    border: 2px solid #111;
    background: #fafafa;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    transition: opacity 0.5s ease;
}

.kenneth-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gatekeeper-img {
    width: 100%;
    max-height: 45vh;
    aspect-ratio: 4/3;
    object-fit: cover;
    border: 2px solid #111;
    display: block;
    background-color: #333;
    overflow: hidden;
}

.shake-anim {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-3px, 0, 0); }
    20%, 80% { transform: translate3d(5px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
    40%, 60% { transform: translate3d(8px, 0, 0); }
}

.kenneth-dialogue {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
}

.dialogue-box {
    border: 2px solid #111;
    padding: 20px;
    background: #fff;
    min-height: 120px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 17px;
    line-height: 1.6;
    font-weight: bold;
    box-shadow: inset 2px 2px 0px #eaeaea;
}

.dialogue-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#password-input {
    flex: 1 1 200px;
    padding: 12px;
    border: 2px solid #111;
    font-family: inherit;
    font-size: 16px;
}

#password-input:focus {
    outline: none;
    border-color: var(--accent);
}

.kenneth-dialogue button {
    font-family: 'Geneva', sans-serif;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #111;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    text-transform: uppercase;
}

.kenneth-dialogue button:active {
    transform: translate(2px, 2px);
}

.btn-submit {
    background: #fff;
    padding: 10px 20px;
}

.btn-submit:hover {
    background: #eaeaea;
}

.btn-nita {
    background: var(--accent);
    color: #fff;
    padding: 10px 20px;
}

.btn-nita:hover {
    background: #00367a;
}

.unlockable-content {
    animation: fadeIn 1s ease-in;
    position: fixed;
    top: 61px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 61px);
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Story Slideshow Layout --- */
.story-wrapper {
    background: #fff;
    color: #000;
    font-family: 'Geneva', 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    width: 95%;
    max-width: 800px;
    height: auto;
    border: 4px solid #000;
    position: relative;
    box-shadow: 6px 6px 0px #000;
    display: flex;
    flex-direction: column;
}

.story-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #111;
    overflow: hidden;
    border-bottom: 4px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#story-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.story-nav {
    position: absolute;
    background: #fff;
    color: #000;
    border: 3px solid #000;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 20;
    box-shadow: 3px 3px 0 #000;
}

.story-nav:hover {
    color: #000;
    background: #fff;
    border-color: #000;
}

.story-left, .story-right {
    top: 50%;
    transform: translateY(-50%);
}

.story-left { left: 30px; }
.story-right { right: 30px; }

.story-forward {
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.story-dialogue {
    min-height: 120px;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.story-dialogue p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

#story-reset-btn {
    margin-top: 15px;
    background: #fff;
    color: #000;
    border: 4px solid #000;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
}

/* --- Ötzi Dating Sim Layout --- */
#otzi-wrapper {
    display: flex;
    flex-direction: column;
    width: 95%;
    max-width: 600px;
    height: auto;
    border: 4px solid #000;
    box-shadow: 6px 6px 0 #000;
    background: #fff;
    overflow: hidden;
    margin: auto;
    position: relative;
}

#otzi-scene {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 4px solid #000;
}

#otzi-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#otzi-dialogue-area {
    flex-shrink: 0;
    padding: 20px;
    height: 160px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

#otzi-text {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
    color: #111;
}

#otzi-choices {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.otzi-choice-btn {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-family: 'Geneva', sans-serif;
    font-size: 13px;
    font-weight: bold;
    text-align: left;
    background: #fff;
    color: #000;
    border: none;
    border-top: 1px solid #000;
    cursor: pointer;
    text-transform: uppercase;
}

.otzi-choice-btn:hover { background: #efefef; }
.otzi-choice-btn:active { background: #000; color: #fff; }

#otzi-nav {
    position: absolute;
    bottom: 10px;
    right: 20px;
}

.otzi-nav-btn {
    background: transparent;
    color: #111;
    border: 2px solid #111;
    padding: 5px 12px;
    font-family: 'Geneva', sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.4; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 900px) {
    .kenneth-container { grid-template-columns: 1fr; }
    .magazine-spread { display: flex; flex-direction: column; gap: 40px; }
}

}