:root {
    --bg-color: #242424;
    --text-color: #f5f5f5;
    --gradient: #212121;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #DFDFDF;
        --text-color: #242424;
        --gradient: #DBD8CC;
    }
}

@media (prefers-color-scheme: dark) {
  [id^="work-entry00"] {
    color: inherit !important;
  }
}

body, html {
    font-family: Arial, Helvetica, sans-serif;
    font-kerning: normal;
    line-height: 12px;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 0;
    background:
    var(--bg-color);
}

.top-text-container {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    text-align: center;
    line-height: 7px;
    z-index: 3;
}

.top-line {
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    margin: 10px auto 10px;
}

.text-columns {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
}

.text-columns .column1 {
    text-align: justify;
    font-size: 25px;
    line-height: 20px;
    padding: 0 5px;
    opacity: 0.3;
}

.text-columns .column2 {
    flex: 1;
    text-align: justify;
    padding: 0 5px;
    opacity: 0.7;
}

.text-columns .column3 {
    flex: 1;
    text-align: justify;
    padding: 0 5px;
    opacity: 0.7;
}

.text-columns .column4 {
    flex: 1;
    text-align: justify;
    padding: 0 5px;
    opacity: 0.7;
}

#scene-container {
    position: fixed;
    top: 50%;  /* Adjust as needed */
    right: -10px;  /* Adjust to move closer to the right */
    transform: translateY(-50%);  /* Centers vertically */
    width: 60%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

#scene-container canvas {
    pointer-events: auto; /* This re-enables interaction with the 3D object */
}

.content-wrapper {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.content-wrapper * {
    pointer-events: auto;
}

.navbar {
    position: fixed;
    left: 100px;
    top: 20px;
    padding-left: 70px;
    padding-top: 15vh;
    max-height: 90vh;
    max-width: 90vw;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.nav-item {
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 12px;
}

.section-content {
    visibility: visible;
    opacity: 1;
    max-height: 2000px; /* Adjust this value based on your content */
    overflow-y: scroll;
    overscroll-behavior: contain;
    transition: visibility 0s, opacity 0.2s ease, max-height 0.2s ease, margin-bottom 0.2s ease;
    font-size: 12px;
    cursor: default;
    user-select: text;
    margin-left: 20px;
}

.section-content.active {
    visibility: visible;
    opacity: 1;
    height: auto;
    transition: visibility 0s, opacity 0.2s ease, height 0.2s ease, margin-bottom 0.2s ease;
}

.section-content:not(.active) {
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    transition: visibility 0s 0.2s, opacity 0.2s ease, max-height 0.2s ease, margin-bottom 0.2s ease;
}

#work {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.work-entry {
    cursor: pointer;
    margin-top: 10px;
    max-width: 300px;
    min-width: 250px;
    flex: 1 1 calc(33.333% - 20px);
}

#work-entry001 {
color: #674C31;
}

#work-entry002 {
    color: #2D712A;
}

#work-entry003 {
    color: #DD8064;
}

#work-entry004 {
    color: #0A21BA;
}

#work-entry005 {
    color: #F3D955;
}

#work-entry006 {
    color: #F9B9B4;
}

#work-entry007 {
    color: #36402B;
}

#work-entry008 {
    color: #F15623;
}

.work-content {
    visibility: visible;
    border: 1px dashed var(--text-color);
    opacity: 1;
    max-height: 1000px; /* Adjust this value based on your content */
    overflow: hidden;
    transition: visibility 0s, opacity 0.2s ease, max-height 0.2s ease, margin-top 0.2s ease;
    font-size: 12px;
    margin-top: 10px;
    margin-left: 20px;
}

.work-content.active {
    visibility: visible;
    opacity: 1;
    height: auto;
    transition: visibility 0s, opacity 0.2s ease, height 0.2s ease, margin-top 0.2s ease;
    margin-top: 10px;
}

.work-content:not(.active) {
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    transition: visibility 0s 0.2s, opacity 0.2s ease, max-height 0.2s ease, margin-top 0.2s ease;
}

#data-label {
    text-decoration: underline;
}

#sample-data {
    font-size: 8px;
}

.bottom-left-box {
    position: fixed;
    left: 20px;
    bottom: 20px;
    border: 1px solid var(--text-color);
    padding: 10px;
    max-width: 160px;
    z-index: 1;
    transition: bottom 0.3s ease;
    font-size: 8px;
    line-height: 7px;
}

.bottom-left-box p {
    margin: 0;
    text-align: left;
    white-space: pre-line;
}

.bottom-left-box img {
    display: block;
    margin: 5px auto;
    max-width: 100%;
}

.bottom-left-box .code {
    text-align: center;
    margin-top: 5px;
    font-size: 8px;
}

.bottom-left-box img {
    display: none;
    margin: 5px auto;
    max-width: 100%;
}

.barcode-black, .barcode-white {
    display: none;
}

@media (prefers-color-scheme: light) {
    .bottom-left-box {
        border: 1px solid var(--text-color);
    }
    .bottom-left-box .barcode-black {
        display: block;
    }
    .bottom-left-box .barcode-white {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    .bottom-left-box {
        border: 1px solid var(--text-color);
    }
    .bottom-left-box .barcode-white {
        display: block;
    }
    .bottom-left-box .barcode-black {
        display: none;
    }
}

/* Transitions for smooth show/hide effects */
.section-content,
.work-content {
    transition: all 0.3s ease;
}

/* Hover effect for interactive elements */
.nav-item > span:hover,
.work-entry:hover {
    opacity: 0.8;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    body, html {
      font-size: 14px;
    }

    #headphone-text {
        line-height: 7px;
        max-width: 70px;
    }

    .top-text-container {
        width: 95%;
        top: 5px;
        line-height: 5px;
    }

    .top-line {
        width: 99%;
        height: 0.5px;
    }

    .text-columns {
        font-size: 5px;
    }

    .text-columns .column1 {
        flex: 1;
        text-align: left;
        padding: 0 5px;
    }
    
    .text-columns .column2 {
        flex: 1;
        text-align: left;
        padding: 0 5px;
    }
    
    .text-columns .column3 {
        flex: 1;
        text-align: left;
        padding: 0 5px;
    }
    
    .text-columns .column4 {
        flex: 1;
        text-align: left;
        padding: 0 5px;
    }

    #scene-container {
          width: 80%; /* Adjust as needed */
          height: 50vh; /* Adjust as needed */
          right: 2px; /* Center horizontally */
          top: 250px; /* Adjust vertical position */
    }
  
    .navbar {
      left: 10px;
      padding-left: 10px;
      padding-top: 20vh;
      width: 90%;
      max-height: 80vh;
      overflow-y: scroll;
      overscroll-behavior: auto;
    }
  
    .nav-item {
      font-size: 16px;
    }
  
    .section-content {
      font-size: 14px;
      overflow-y: scroll;
      overscroll-behavior: auto;
    }
  
    .work-content {
      font-size: 12px;
    }

    #sample-data {
        font-size: 6px;
    }
  
    .bottom-left-box {
      left: 10px;
      bottom: 10px;
      max-width: 100px;
      font-size: 6px;
      line-height: 7px;
    }

    .bottom-left-box img {
    display: block;
    margin: 5px auto;
    max-width: 100%;
    }

    .bottom-left-box .code {
        text-align: center;
        margin-top: 5px;
        font-size: 6px;
    }
  }
