/* =========================
   Base reset & typography
   ========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --project-text-margin-right: 20vw;
}


body {
  font-family: "Times New Roman", Times, serif;
  background: #ffffff;
  color: #333;
}


/* =========================
   NAVBAR
   ========================== */

#A2614359952.nav-shell {
  width: 100%;
  z-index: 299;
  padding-top: .5rem;

  position: relative;
  top: 0;

}


.title-container {
  font-size: 1.5vw;
  margin-top: .5rem;
}

/* Rad med allt i */
.nav-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
}

/* Textdelen (titel + länkar + tagline) */
.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;  
  width: 100%;
  gap: 1rem;                       
  flex-wrap: nowrap;               
  white-space: nowrap;             
}

.left-links {
  display: flex;
  gap: 1rem;                        
  align-items: center;
  white-space: nowrap;
}

/* Länkarna */
.main-nav {
  cursor: pointer;
  text-decoration: underline;
  color: inherit;
}

#title_text {
  color: blue;
  font-weight: 500;
  white-space: nowrap;  
}

.main-nav:hover,
.project-link:hover {
  color: blue;
}

.project-link {
  cursor: pointer;
}

/* Tagline */
.tagline {
  flex: 1;                          /* take leftover space */
  overflow: hidden;
  text-overflow: ellipsis;          /* fades with "…" when too long */
  white-space: nowrap;
}

/* =========================
   Header
   ========================== */

.header {
  font-size: 6rem;
  padding: 1rem;
}

/* =========================
   Layout wrappers
   ========================== */

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0rem;/* space between sections */
  padding: 0 1rem 4rem 1rem;
}

main {
  padding-top: 0rem; /* adjust if you have a fixed navbar */
}

.projects-shell{
  margin-top: 2rem;
}

/* =========================
   Two-column text sections
   ========================== */

.two-column {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.two-column h2 {
  font-size: 1.3rem;
  text-decoration: underline;
  color: blue;
  font-weight: normal;
}

.two-column p {
  font-size: 1rem;
  margin-top: 0.5rem;
  line-height: 1.2rem;
  color: #000;
}

ul {
  font-size: 1rem;
  line-height: 1.2rem;
  list-style-type: none;
}

/* =========================
   Image grid (gallery)
   ========================== */

/* the list of bars */
.image-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* important: no fixed width here, flex will control it */
}

.project-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The “row” box */
.project {
  position: relative;
  width: 100%;
  height: 40px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;

  border-top: .5px solid #000;
  border-left: .5px solid #000;
  border-right: .5px solid #000;
  border-bottom: 0;

  transition: height 0.4s ease, border-color 0.3s ease;
  overflow: hidden;
}

/* Hidden image behind the text */
.project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: brightness(90%) blur(12px);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0; 
  
}

.project-image.gif {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;

  z-index: 0;
}

/* Hover OR touch-hover: grow bar + reveal image */
.project:hover,
.project.touch-hover {
  height: 400px;
  border-color: #000;
}

.project:hover .project-image,
.project.touch-hover .project-image {
  filter: blur(0px);
  opacity: 1;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.project:hover .project-image.gif,
.project.touch-hover .project-image.gif {
  opacity: 1;
}

.project:hover .project-image.static,
.project.touch-hover .project-image.static {
  opacity: 0;
}



/* Active project bar (used in split mode too) */
.project.active-project {
  height: 100px; /* 🔹 this is the “grown” state when active */
}

/* Keep the image visible for the active bar */
.project.active-project .project-image {
  filter: blur(0px);
  opacity: 1;
}


.project.active-project .project-image.gif {
  opacity: 0;
}
.project.active-project:hover .project-image.gif {
  opacity: 1;
}
.project.active-project .project-image.static {
  opacity: 1;
}

/* Keep the text white like on hover */
.project.active-project .project-meta span {
  background-color: white;   /* solid block */
  color: rgb(255, 255, 255);              /* readable contrast */
  text-shadow: none;
}

/* When bars are retracted (split mode), hover grows only to 200px */
.projects-shell.detail-open-split .project:hover {
  height: 100px;
}

/* Disable giant text hover when side menu is active */
.projects-shell.detail-open-split .project:hover .project-meta span {
  font-size: inherit !important;
  color: rgb(255, 255, 255) !important;  /* keep normal color */
  text-shadow: none!important;
}


.projects-shell.detail-open-split .project-meta {
  
  font-size: 1.1vw;
  grid-template-columns: minmax(9vw, 1fr) minmax(9vw, 1fr) minmax(5vw, 1fr);
}

/* =========================
   Project meta (text inside the bar)
   ========================== */

.menu-instruction{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(2rem, 1fr) minmax(2rem, 1fr) minmax(2rem, 1fr);
  width: 100%;
  height: 100%;
  padding: 0 0.75rem;
  font-size: 1.5rem;
  align-items: center;

  border-top: .5px solid #000;
}

.menu-instruction span{
  align-items: center;
  text-decoration: none;
  color: rgb(0, 0, 0) !important;
  padding: 1rem 1rem;
  background: transparent;
  text-shadow: none;
}

.project-meta {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(2rem, 1fr) minmax(2rem, 1fr) minmax(2rem, 1fr);
  width: 100%;
  height: 100%;
  padding: 0 0.75rem;
  font-size: 1.5rem;
  align-items: center;
  text-shadow: #00000071 0px 0px 3px;

  background: none !important;
}



/* add bottom border only on the last project row */
.project-container:last-child .project {
  border-bottom: .5px solid #000;
}

/* shared text style */
.project-meta span {
  text-decoration: none;
  color: rgb(255, 255, 255);
  padding: 0.25rem 0.5rem;
  background: none !important;
  transition:
    font-size 0.25s ease,
    color 0.25s ease,
    background-color 0.25s ease,
    padding 0.25s ease;

    white-space: nowrap;
    z-index: 2;
}

.project:hover .project-meta {
  mix-blend-mode: exclusion;
}

.project:hover .project-meta span,
.project.touch-hover .project-meta span {
  font-size: 4vw;
  color: rgb(255, 255, 255);
  background: none !important;
  text-shadow: none;
}


.cv-about-open:hover .project-meta span{
  font-size: inherit;
  color: rgb(255, 255, 255);
  background: none !important;
  text-shadow: none;
}



/* Column alignments */
.meta-title {
  justify-self: start;
}

.meta-type {
  justify-self: start;
}

.meta-year {
  justify-self: end;
}

/* =========================
   SPLIT LAYOUT (bars + detail)
   ========================== */

.projects-shell {
  display: flex;
  align-items: flex-start;
  width: 100%;
  column-gap: 1.5rem;          /* space between bars and detail */
}

/* LEFT column: gallery/bars */
#gallery {
  flex: 1 1 100%;
  max-width: 100%;
  /* animate shrink */
  transition: flex-basis 0.4s ease, max-width 0.4s ease;
}

/* RIGHT column: detail panel */
.project-detail-panel {
  flex: 0 0 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  /* animate grow + fade in */
  transition: flex-basis 0.4s ease, max-width 0.4s ease, opacity 0.35s ease;
}

/* .projects-shell.detail-open-classic #gallery {
  display: none;
} */

.projects-shell.detail-open-classic .project-detail-panel {
  flex: 1 1 100%;
  max-width: 100%;
  opacity: 1;
}


/* SPLIT mode for ALL projects –
   bars retract left, detail grows on the right */
.projects-shell.detail-open-split #gallery {
  display: block;
  flex: 0 0 25%;
  max-width: 25%;
  position: sticky;         /* keep visible while scrolling */
  top: 1rem;                /* adjust to sit under your nav */
  align-self: flex-start;
  height: calc(100vh - 6rem);
  overflow-y: auto;
}

/* Make the right panel scrollable in split mode */
.projects-shell.detail-open-split .project-detail-panel {
  flex: 1 1 auto;
  max-width: 100%;
  opacity: 1;
  max-height: calc(100vh - 6rem); /* fits under nav */
  overflow-y: auto;
}

/* =========================
   Contact box
   ========================== */

/* Base contact box */
.contact-block {
  /* make sure it sits in the same column as the menu */
  grid-column: 1 / 2;   /* if projects-shell is a CSS grid */
  margin-top: 1.5rem;
  padding: 0.75rem 0.75rem 1rem;
  font-size: 1vw;
}

/* optional: match menu width on mobile/desktop 
.projects-shell.detail-open-split .contact-block {
   tweaks if needed when split layout is active 
}*/

/* inner text styling */
.contact-inner p {
  margin: 0.1rem 0;
}

.contact-inner p:first-child {
  color: rgb(0, 0, 0);
}




/* =========================
   Project detail view
   ========================== */

/* (you can delete the --project-text-margin-right variable entirely) */

/* Project detail card */
.project-detail {
  background: #ffffff;
  /*border: 1px solid #000;*/
  width: 100%;
  max-width: 100vw;              /* readable width on desktop */
  box-sizing: border-box;
  padding: 1rem 1rem 1rem;
  margin: 0 auto 2rem;           /* center the card */
  display: block;
  flex-direction: column;
  align-items: stretch;
  scroll-margin-top: 16px;       /* small breathing room inside the panel */
}

.project-description {
  margin-right: var(--project-text-margin-right);
  font-size: 1.1rem;
  line-height: 1.5;
  color: #000;
  margin-bottom: 2rem;
  padding: 0;                    /* padding handled by .project-detail */
}

.project-description p {
  margin: 0 0 0.75rem 0;         /* simple bottom margin between paragraphs */
}

/* CV & About don’t need special margin overrides any more,
   so you can completely remove the old #project-detail-100/101 rules. */


/* ========
   Override
   ======== */

/* CV section (Experience / Education) */
#project-detail-100 {
  --project-text-margin-right: 0rem;
}

/* About + Contact section */
#project-detail-101 {
  --project-text-margin-right: 0rem;
}


.project-description h2{
  font-weight: 200;
}

.under-text {

  font-size: 1.2rem;
  line-height: 1.5rem;
  color: #000;
  margin-bottom: 1rem;
}

.back-button {
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  color: blue;
  margin-bottom: 1rem;
  display: inline-block;
  align-self: flex-start;
  background-image: url(assets/Archive/Asset\ 1.png);
  width: 2rem;
  height: 2rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

}

.hidden {
  display: none;
}

iframe {
  width: 100%;
  height: 506px;
  border: none;
  padding-top: 1rem;
}

/* Project media layout */
.project-media {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-grid-1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.image-grid-1 img {
  width: 100%;
  height: auto;
}

.image-grid-2 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: .5rem;
}

.image-grid-2 img {
  width: 100%;
  height: auto;
}

.image-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.image-grid-3 img {
  width: 100%;
  height: auto;
}

.project-media video {
  margin-top: .5rem;
  width: 100%;
  height: auto;
}

/* =========================
   Overlay images
   ========================== */

.overlay-image {
  position: absolute;
  width: 25rem;
  z-index: 9999;
  pointer-events: none;
  border: 1px solid #000;
  box-shadow: #333 2px 2px 6px;
  transition: transform 0.2s, opacity 0.2s;
}

.gallery .project,
.gallery .project * {
  pointer-events: auto;
}

.dimmed {
  opacity: 0.3;
  transition: opacity 0.3s;
}

.project.highlighted {
  opacity: 1 !important;
}

/* Prevent panel from visually scrolling before delayed scroll */
.detail-panel-frozen {
  overflow: hidden !important;
}

/* Panel is hidden until ready to scroll */
.detail-panel-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}


/* =========================
   Footer
   ========================== */

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0);
  z-index: 100;
}
/* ==========================================
   While auto-scrolling to a project:
   disable hover grow / unblur / giant text
   ========================================== */

.projects-shell.is-auto-scrolling .project:hover .project-image {
  /* keep it blurred like the default state */
  filter: blur(12px);
  opacity: 1;
}

.projects-shell.is-auto-scrolling .project:hover .project-meta span {
  /* no giant text grow during auto-scroll */
  font-size: 1.5rem; /* same as your base .project-meta font-size */
  color: rgb(255, 255, 255);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  z-index: 9999;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.hidden {
  display: none;
}

.image-grid-1 figcaption {
  text-align: left;
  text-decoration: underline;
}

.figcaption {
  text-decoration: underline;
}

.hover-video{
  pointer-events: none;
}

.bw{
  filter: grayscale(100%);
}



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

@media (max-width: 768px) {
    body.no-scroll {
    overflow: hidden;
    height: 100vh;
    }

  .image-grid-1 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

.image-grid-3{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

  .projects-shell.cv-about-open #gallery {
    display: none;
  }

  #gallery {
    flex: 1 1 100%;
    max-width: 100%;
  }

  /* Stack sidebar above content, no sticky split layout */
  .projects-shell {
    display: inline-block;
    flex-direction: column;
    gap: 1rem;
    
    
  }

  .projects-shell.detail-open-split #gallery {
    position: static;
    flex: 0 0 auto;
    max-width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .project-detail-panel,
  .projects-shell.detail-open-split .project-detail-panel,
  .projects-shell.detail-open-classic .project-detail-panel {
    flex: 0 0 auto;
    max-width: 100%;
    max-height: none;
    height: auto;
    overflow: visible;      /* whole page scrolls normally */
  }

  .project-detail {
    max-width: 100%;
    margin: 0 0 1.5rem 0;
    padding: 1.25rem 1rem 1.5rem;
  }

  .project-description {
    padding: 0;
    --project-text-margin-right: 1vw;
    font-size: 4vw;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* ---------- MOBILE NAV ---------- */

  .title-container {
    font-size: 4vw;
  }

  .nav-row {
    /*flex-direction: column;*/
    align-items: center;
  }

  .nav-main {
    flex-wrap: nowrap;         /* now allow wrapping */
    gap: 0.5rem;
  }

  .tagline {
    visibility: hidden;
    flex-basis: auto;        /* no forced new line */
    white-space: nowrap;     /* stay on one line */
    overflow: hidden;
    text-overflow: ellipsis; /* add "…" if too long */
  }

  .left-links {
    margin-left: 0;       /* right-align links */
  }

  .project-meta {
    font-size: 1rem;
    
  }

  .project-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

/* Softer hover / touch-hover on small screens (no giant text) */
.project:hover .project-meta span,
.project.touch-hover .project-meta span {
  font-size: 1.3rem;
  background-color: white;
  color: rgb(255, 255, 255);
}
.project:hover,
.project.touch-hover {
  height: 200px;
  border-color: #000;
}


  .projects-shell.detail-open-split .project-meta {
  
  font-size: 3vw;
  grid-template-columns: minmax(6vw, 1fr) minmax(9vw, 1fr) minmax(6vw, 1fr);
}
#contact-block {
    display: none !important;
  }
}

