/* =========================
   RESET & GLOBALS
========================= */

@property --accent-color {
    syntax: "<color>";
    inherits: true;
    /* initial-value: #5f5f5f; */
    initial-value: #000000;
}

:root {
    --color-text: rgb(0, 0, 0);
    --header-height: 90px;
    
    /* Project accenrgb(255, 0, 0) */
    /* --accent-color: #5f5f5f; */
    --accent-color: #000000;
    transition:
    --accent-color 1000ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----------------------------------------- */

/* Video styling */
#intro video {
    width: auto;       /* keeps original width */
    height: auto;      /* keeps original height */
    max-width: 100%;   /* scale down if needed, but not up */
    max-height: 100vh; /* prevents overflow */
    object-fit: contain; /* preserves clarity */
    z-index: 1;
}

/* Intro text box */
#intro {
    inset: 0;
    gap: 32px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    justify-content: center;  /* vertically center wrapper */
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Wrapper to control vertical alignment of text + video */
#intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px; /* very small gap between text and video */
}

/* Text box above video */
#intro-text {
    text-align: center;
    color: #000;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
}

/* Video styling */
#intro video {
    width: 100vw;
    max-width: 1000px;
    aspect-ratio: 16 / 9;   /* 👈 CRUCIAL */
    max-height: 60vh;

    object-fit: contain;
    display: block;
}

/* Button below everything */
#enter-site {
    font-family: inherit;
    background-color: #ffffff;
    color: #000000;
    border: dashed;
    padding: 12px 24px;
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;      /* distance from video */

    opacity: 0;                   /* start invisible */
    transition: opacity 1s ease; /* fade in transition */
    /* z-index: 99999; */
}

/* Fade-in class */
#enter-site.show {
    opacity: 1; /* visible */
}

#enter-site:hover {
    background-color: #dadada;
}

/* Button below everything */
#over-mij{
    font-family: inherit;
    background-color: #ffffff;
    color: #000000;
    border: dashed;
    padding: 12px 24px;
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 8px;      /* distance from video */

    opacity: 0;                   /* start invisible */
    transition: opacity 1s ease; /* fade in transition */
    /* z-index: 99999; */
}

/* Fade-in class */
#over-mij.show {
    opacity: 1; /* visible */
}

#over-mij:hover {
    background-color: #dadada;
}

/* Hidden state */
#intro.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
/* ----------------------------------------- */

html,
body {
  height: 100%;
  overflow: hidden;
}

html {
  background-color: #ffffff;
  font-family: 'Outfit', Arial, sans-serif;
  font-weight: 400;
  font-size: 6px;

  /* Prevent layout shift from scrollbar */
  scrollbar-gutter: stable;
}

::selection {
  background: var(--accent-color);
  color: #ffffff;
}

/* Column 2 positioning for instruction */
.column.content {
    position: relative; /* parent for absolute children */
}

/* Instruction text centered */
#instruction-text1,
#instruction-text2 {
    position: absolute;
    top: 50%;
    left: 50%;
    text-align: center;
    font-size: 16px;
    font-weight: 500;      /* bold */
    color: #000000;
    font-style: italic;
    line-height: 1.5;
    pointer-events: none; /* clicks pass through */
    transition: opacity 0.1s ease;
}

#instruction-text1 {
    transform: translate(-100%, -100%); /* perfect center */
}

#instruction-text2 {
    transform: translate(-40%, 0%); /* perfect center */
}

/* Fade out class */
#instruction-text.hidden {
    opacity: 0;
}



/* =========================
   MAIN LAYOUT
========================= */

.container {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  background-color: #ffffff;
  overflow: hidden; /* prevents accidental body scroll */
}

/* Shared column styling */
.column {
  padding: 0 20px;
  overflow-y: auto;
  border-right: 3px dashed var(--accent-color);
}

.column:last-child {
  border-right: none;
}

/* =========================
   COLUMN SIZING (FLEX ONLY)
========================= */

.projects {
  flex: 0 0 20%;
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 40px;
}

.content {
  flex: 0 0 50%;                 /* ~40% of screen */
  height: 100vh;
  overflow-y: auto;
}

/* =========================
   TYPOGRAPHY
========================= */

.content p {
    font-size: 14px;
    color: #000;
    margin-top: 30px;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 300;
}

/* Sticky headers */
/* .column h1,
.column h2 {
    font-weight: 500;
    font-style: italic;
    position: sticky;
    top: 0;
    height: var(--header-height);
    line-height: var(--header-height);
    padding-bottom: 10px;
    z-index: 10;
    margin: 0;
    text-align: center;
} */

.column h1 {
    font-weight: 500;
    font-style: italic;

    position: sticky;
    bottom: 0;

    height: var(--header-height);
    line-height: var(--header-height);

    background: #ffffff;
    z-index: 10;

    margin: 0;
    text-align: center;

    border-top: 1px solid #000;
}

/* =========================
   PROJECT LIST
========================= */

.projects ul {
  list-style: none;
  margin-top: 20px;
}

.projects li {
  padding: 10px;
  cursor: pointer;
}

.projects li:hover {
  background-color: #ffffff;
}

/* =========================
   PROJECT MEDIA (COLUMN 2)
========================= */

.content .images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content img {
    width: 100%;
    height: auto;
    image-rendering: crisp-edges;
    /* filter: contrast(1.1) brightness(1.05); */
}

.content .images img,
.content .images video {
  width: 100%;
  display: block;
  margin-bottom: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* =========================
   DRAGGABLE ITEMS
========================= */

.draggable {
  cursor: grab;
}

.draggable:hover {
  outline: 2px dashed var(--accent-color);
}

.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  cursor: grabbing;
}

/* Draggables inside canvas */
.canvas .draggable {
  position: absolute;
  cursor: grab;
}

.canvas .draggable:active {
  cursor: grabbing;
}

/* Selected canvas item */
.canvas .draggable.selected {
  outline: 2px solid var(--accent-color);
}

/* Delete button */
.delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    user-select: none;
}

/* =========================
   PROJECT THUMBNAILS (COLUMN 1)
========================= */

.projects .images {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
}

.projects img,
.projects video {
    width: 100%;
    display: block;
    position: static !important;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
    padding-top: 16px;
}

.projects img:hover,
.projects video:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* =========================
   IMAGE ENTRANCE ANIMATION
========================= */

/* Only apply slide-up animation to column 2 content images/videos */
.content .images img:not(.canvas .draggable),
.content .images video:not(.canvas .draggable) {
    opacity: 0.5;               /* start hidden */
    transform: translateY(300px);
    animation-fill-mode: forwards; /* keep final state */
}

/* Keyframes remain the same */
@keyframes slideUpFade {
    0% {
        opacity: 0.5;
        transform: translateY(300px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   LIGHTBOX - Full screeen images
========================= */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;

    /* 👇 THIS fixes centering */
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-topbar {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    align-items: center; /* 👈 PERFECT vertical alignment */
    gap: 14px;
    z-index: 10002;
}

/* Close button (unchanged style) */
.lightbox-close {
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Viewport that clips zoom & pan */
.lightbox-viewport {
    width: 90vw;
    height: 90vh;
    overflow: hidden;
    position: relative;

    /* 👇 THIS is the missing piece */
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-viewport:active {
    cursor: grabbing;
}

/* Image becomes transform-based */
.lightbox-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    pointer-events: auto;
}
/* Controls inherit same baseline */
.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    padding: 0;
}

.lightbox-controls button:hover {
    opacity: 0.7;
}

#lb-reset {
    font-size: 26px;
}

/* =========================
   FLOATING SIGNATURE
========================= */

.floating-signature {
  position: absolute;
  top: 5px;
  right: -15px;
  width: 5vw;
  z-index: 9998;
  pointer-events: auto;
  cursor: pointer;
}

.floating-signature:hover {
    transform: rotate(-10deg) scale(1.15);
    transition: transform 0.25s cubic-bezier(.24,.8,.38,1.24);
}

/* =========================
   SCROLLBAR STYLING
========================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) #ffffff;
}

/* Chrome, Edge, Safari */
*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: #ffffff;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 6px;
  border: 2px solid #ffffff;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-color);
}

.projects,
.content {
  overflow-y: auto;
}

.canvas {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.canvas-tiers {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.canvas-tier {
    flex: 1;
    border-top: 3px dotted var(--accent-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 0; /* hide direct text without affecting child elements */
}

.canvas-tier::before {
    content: attr(data-tier-number); /* use a custom data attribute */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-2deg);
    /* font-style:  italic; */
    font-size: 15rem;
    opacity: 0.15;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    pointer-events: none;
    user-select: none;
}

.canvas-tier.has-image::before {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.canvas-tier:first-child {
    border-top: none;
}

.canvas-tier img,
.canvas-tier img.draggable {
    display: block;
    pointer-events: auto;
    cursor: grab;
    transition: transform 0.3s ease, left 0.3s ease, top 0.3s ease;
}


.canvas-tier img.selected {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    /* do NOT change width/height */
}

/* visual feedback */
.canvas-tier.hover {
    background: rgba(0,0,0,0.04);
}

.canvas-footer {
    height: 44px; /* or a smaller px value */
    padding: 4px 0; /* optional: fine-tune spacing inside */
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    /* font-style: italic; */
    font-size: 10px;
    font-weight: 400;
    color: var(--accent-color);
    border-top: 1px solid var(--accent-color);
}



.download-btn,
.overmij-btn {
    font-family: inherit;
    background-color: #ffffff;
    /* margin-left: 20px; */
    padding: 8px 16px;
    border: dashed;
    color: var(--accent-color);
    font-weight: 400;
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
    flex: 1;
}

.download-btn {
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    justify-content: center;   /* ✅ THIS FIXES HORIZONTAL CENTERING */
}

.overmij-btn {
    padding: 8px 10px;
}


.download-btn:hover,
.overmij-btn:hover {
    background-color: #e4e4e4;
}

.download-icon {
    width: 18px;
    height: 18px;
    fill: currentColor; /* 🔥 inherits text color */
    display: block;          /* avoids inline SVG baseline weirdness */
}

.button-wrapper {
    display: flex;
    gap: 20px;          /* keeps the space between buttons */
    width: 100%;
}

/* ---------------CREDENTIALS-------------- */
.credentials-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px; /* added bottom padding */
    font-family: inherit;
    line-height: 1.6;
    flex: 1;
}

.credentials-page-body {
    height: 100vh;
    overflow-y: auto;       /* enable vertical scrolling */
}

.credentials-page h1 {
    font-weight: 800;
    margin-top: 30px;
    margin-bottom: 12px;
    font-size: 4.5rem;
    /* color: var(--accent-color); */
    /* border-bottom: 2px solid var(--accent-color); */
    padding-bottom: 4px;
}

.credentials-page h2 {
    font-weight: 600;
    font-style: italic;
    margin: 0 0 5px;
    font-size: 2.9em;
    /* color: var(--accent-color); */
    /* border-bottom: 2px solid var(--accent-color); */
    padding-bottom: 2px;
}

.credentials-page h1 + h2 {
    margin-top: 12px;
}


.credentials-page ul {
    list-style: disc inside;
    margin-bottom: 20px;
    font-size: 2rem;
}

.credentials-btn {
    font-family: inherit;
    background-color: #ffffff;
    color: #000000;
    border: dashed;
    padding: 12px 24px;
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 24px;
    margin-bottom: 20px;
}

.credentials-btn:hover {
    background-color: #dadada;
}

.credentials-block {
    margin-bottom: 40px;
}

.credential-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-bottom: 16px;
    align-items: start;
}

.credential-subtitlerow {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-auto-flow: row;
    gap: 8px 20px; /* row gap = 8px, column gap = 20px */
    margin-bottom: 4px;
    align-items: baseline;
}

.credential-title {
    font-weight: 600;
    font-style: italic;
    margin: 0 0 5px;
    font-size: 2.9em;
    /* color: var(--accent-color); */
    /* border-bottom: 2px solid var(--accent-color); */
    padding-bottom: 2px;
}

.credential-title ul {
    margin: 8px 0 0 20px;
    padding: 0;
    font-size: 2rem;
    font-style: normal;
    font-weight: 400;
    text-align: justify;
}

.credential-subtitle {
    font-weight: 400;
    font-style: italic;
    /* margin: 0 0 -2px; */
    font-size: 2.5em;
    /* color: var(--accent-color); */
    /* border-bottom: 2px solid var(--accent-color); */
    /* padding-bottom: 2px; */
}

.credential-year {
    font-weight: 500;
    font-size: 1.8rem;
    /* font-style: italic; */
    white-space: nowrap;
    opacity: 0.8;
    justify-self: end;
}

.credential-skill {
    font-weight: 500;
    font-size: 1.8rem;
    /* font-style: italic; */
    white-space: nowrap;
    opacity: 0.8;
    justify-self: end;
}

#Typeblock {
    position: relative;
}

.content-with-image {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1300px;   /* was 1200px */
    margin: 0 auto;         /* centers everything */
}

/* The image on the right */
.side-image {
    width: 200px;        /* adjust as you like */
    max-width: 100%;
    height: auto;
    /* position: sticky;    optional: image stays visible while scrolling */
    margin-top: 60px;   /* 👈 moves image down */
    color: #000000;
    border: dashed;
}

/* Right column */
.side-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* align text with image left edge */
}

/* Text under the image */
.side-info {
    margin-top: 10px;
    font-size: 1.9rem;
    line-height: 1.4;
    font-weight: 500;
    width: 200px;   /* match the image width */
}

.side-info p {
    margin: 8px 0; /* space between paragraphs */
    text-align: justify;
}

.side-info a {
    color: inherit;
    text-decoration: none;
}

.side-info a:hover {
    text-decoration: underline;
}

/* ---------------Side image for mobile---------- */
@media (max-width: 768px) {

    .content-with-image {
        flex-direction: column;
        gap: 20px;
    }

    /* 🔑 CHANGE ORDER ON MOBILE */
    .side-column {
        order: -1;          /* move to top */
        width: 100%;
        align-items: center;
    }

    .credentials-page {
        order: 0;
    }

    .side-image {
        margin-top: 20px;
        width: 60%;
        max-width: 220px;
    }

    .side-info {
        width: 100%;
        font-size: 1.7rem;
        padding-left: 5%;
        padding-right: 5%;
    }

    .credential-row,
    .credential-subtitlerow {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .credential-year,
    .credential-skill {
        justify-self: start;
    }
}

/* -------------------------------- */

.site-header nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 400;
}

.site-header nav a.active {
    text-decoration: underline;
    font-weight: 600;
}

.site-header {
    text-align: center;
    padding: 10px 0;
    background: var(--accent-color);
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* background: var(--accent-color); */
    text-align: center;
    padding: 10px 0;
    z-index: 999;
}


