@font-face {
  font-family: "ByteBounce";
  src: url("/fonts/ByteBounce.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --first-color: #77AC53;
  --second-color: #152614;
  --third-color: #1E441E;
  --fourth-color: #F3EFF5;
  --fifth-color: #746F72;
  --font-primary: "ByteBounce", sans-serif;
}

.first-color   { color: var(--first-color); }
.second-color  { color: var(--second-color); }
.third-color   { color: var(--third-color); }
.fourth-color  { color: var(--fourth-color); }
.fifth-color   { color: var(--fifth-color); }

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* mobile site and main page content */
#mainPageContent {
  display: flex;
  background-color: var(--fourth-color);
}
#mobileNotice {
    display: none;
    height: 100vh;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--font-primary);
}

h1{
  color: var(--second-color);
}

#landing-page-header {
    height: 3rem;
    display: flex;
    justify-content: space-between;
    margin: 1rem;
    margin-bottom: 6rem;
    position: fixed;
    z-index: 26;
}

#home-link button {
    background-color: transparent;
    border: none;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-primary);
    color: var(--secondary-color);
    z-index: 25;
}

#home-link button:hover {
    background-color: transparent;
    text-decoration: underline;
    transition: color 0.3s ease;
}

    

  /* Content goes here */
  .screen-content {
    position: absolute;
    inset: 14px;
    display: flex;
    flex-direction: column;
    transition: transform 0.7s cubic-bezier(0.85, 0, 0.15, 1);
    will-change: transform;
    font-family: var(--font-primary)
  }

  .screen-content > section {
    min-height: 100%;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

    #static {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0.07;
      z-index: 99999; /* On top of content */
      pointer-events: none; /* Allow interactions through static */
      transition: opacity 0.2s ease-in;
    }
    #static.transition {
        opacity: 0.4;
    }

    #transition-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      z-index: 99998; /* On top of content */
      pointer-events: none; /* Allow interactions through static */
      transition: opacity 0.1s ease-in;
      background-color: var(--fourth-color);
    }
    #transition-overlay.transition {
        opacity: 1;
    }

    .page-transition {
      opacity: 0;
    }

    #logo-3d {
        width: 300px;
        height: 300px;
        pointer-events: none;
    }

    .logo-3d-style {
        display: flex;
        justify-content: center;
        height: 300px;
        width: 100%;
        position: fixed;
        z-index: 24;
        pointer-events: none;
    }

    #link-3d {
        width: 400px;
        height: 300px;
    }

    #link-2-3d {
        width: 400px;
        height: 300px;
    }

    #page-links {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            margin: 0 auto;
            width: 70%;
        }
        #page-links div {
            margin-left: 2rem;
            margin-right: 2rem;
        }
        #page-links div:hover {
            cursor: pointer;
        }

        h1 {
          margin-bottom: 30px;
          font-size: 4rem;
        }

.utilities {
  flex-direction: column;
}

.table-wrapper {
  background: var(--first-color);
  padding: 25px;
  border-radius: 12px;
  font-family: 'Arial';
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid #2a2a38;
  text-align: left;
}

th:last-child,
td:last-child,
th:nth-last-child(2),
td:nth-last-child(2) {
  text-align: right;
}

button {
  background: var(--third-color);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

button.delete {
  background: var(--second-color);
}

.add-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  margin-top: 20px;
}

.add-form input {
  padding: 10px;
  border-radius: 6px;
  border: none;
  background-color: var(--fourth-color);
}

.marketing {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-card {
  position: relative;
  max-width: 900px;
  opacity: 0;
  transform: translateY(80px);
  transition: all 1s ease;
}

.brand-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-card img {
  width: 100%;
  border-radius: 16px;
}

.brand-text {
  position: absolute;
  inset: 0;
  color: var(--fourth-color);
  display: flex;
  align-items: flex-end;
  padding: 40px;
  border-radius: 16px;
  font-family: 'Arial';
}

.brand-text h3 {
  font-size: 2.2rem;
  margin: 0;
}

.stack {
  flex-direction: column;
}

.logo-icon-grid {
  display: flex;
  gap: 30px;
  text-align: center;
}

.logo-icon {
  background: var(--fourth-color);
  padding: 30px;
  border-radius: 14px;
  transition: transform .3s;
}

.logo-icon:hover {
  transform: translateY(-8px);
}

.logo-icon img {
  height: 50px;
}

#loading-background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--fourth-color);
        z-index: 9998;
        transition: opacity 0.8s ease-in-out;
        opacity: 1;
    }

    #loading-background.fade-out {
        opacity: 0;
    }

    #loading-square {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: var(--first-color);
        width: 100px;
        height: 100px;
        animation: blink 1s linear infinite;
        z-index: 9999;
    }

    /* Growing state after blinking */
    #loading-square.grow {
        animation: grow 1s forwards;
        background-color: var(--fourth-color);
    }

    /* Hidden after grow */
    #loading-square.hidden {
        display: none;
    }

    #fade-in {
        opacity: 0;
        transition: opacity 0.5s ease;
        width: 100%;
        height: 100%;
        overflow: hidden;
        position: relative;
    }

    #fade-in.dim {
        opacity: 0.8 !important;
        transition: opacity 0.5s ease-in-out;
    }

    #fade-in::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0);   /* start transparent */
        pointer-events: none;           /* clicks pass through */
        transition: background 0.5s ease-in-out; /* animate darkening */
    }

    #fade-in.dim::after {
        background: rgba(0, 0, 0, 0.6); /* darker shadow */
    }

    #fade-in.menu-opened {
        display: none;
        
    }
    #fade-in.finished {
        position: fixed;
        z-index: -1;
    }

    #workWrapper {
        display: none;
        left: 0;
        padding: 0;
        position: fixed;
        top: 5%;
        transition: all 0.8s ease;
        z-index: 21;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
        height: 100vh;
    }
    #workWrapper.menu-opened {
        display: flex;
    }

    #meWrapper {
        display: none;
        left: 0;
        padding: 0;
        position: fixed;
        top: 5%;
        transition: all 0.8s ease;
        z-index: 22;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
        height: 100vh;
    }
    #meWrapper.menu-opened {
        display: flex;
    }

    

    .link {
        height: 5rem;
        width: 10rem;
        cursor: pointer;
        font-size: 1.5rem;
    }

    .link:hover {
        text-decoration: underline;
    }

    #scroll-hint-arrow {
        position: fixed;
        bottom: 5rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: 2rem;
        color: var(--third-color);
        display: none;
        animation: pulse 1.5s ease-in-out infinite;
        z-index: 50;
        cursor: pointer;
        font-family: var(--font-primary);
    }

    #me-content{
        display: flex;
        flex-direction: column;
        margin-top: 10rem;
    }
    #cube canvas{
        margin: auto;
    }
    .history {
        width: 100%;
        font-size: 2rem;
        margin: 0 auto;
        font-family: var(--font-primary);
        text-align: center;
    }

    #page-content {
      height:100vh;
      overflow: hidden;
      display: flex;
      gap: 30px;
      padding: 40px;
      text-align: center;
      justify-content: center;
      font-family: var(--font-primary);
    }

#work-content {
    display: flex;
    margin-top: 20rem;
    text-align: center;
    justify-content: center;
    gap: 30px;
}

/* Cards in a row */
.card {
  width: 300px;
  padding: 20px;
  background: var(--fifth-color);
  cursor: pointer;
  height: 300px;
  transition: background,color 0.3s;
  
}

/* Title */
.card .title {
  font-size: 1.8rem;
  font-weight: 600;
}

/* Hidden details container */
.card .details {
  margin-top: 16px;
  font-size: 1.5rem;
}

/* Individual cascading items */
.card .details p {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

/* Stagger cascade */
.card .details p:nth-child(1) { transition-delay: 0.05s; }
.card .details p:nth-child(2) { transition-delay: 0.15s; }
.card .details p:nth-child(3) { transition-delay: 0.25s; }

/* Hover triggers only this card */
.card:hover .details p {
  opacity: 1;
  transform: translateY(0);
}

/* Optional polish */
.card:hover {
    color: var(--fourth-color);
    background: var(--second-color);
}

    @keyframes pulse {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 1; }
    }

     /* Blink animation */
    @keyframes blink {
        0%, 100% { opacity: 1; }
        50% { opacity: 0; }
    }

    /* square growing animation */
    @keyframes grow {
        0% {
            width: 100px;
            height: 100px;
            opacity: 1;
        }
        100% {
            width: 300vw;
            height: 300vw; /* Ensures full coverage despite aspect ratio */
            opacity: 1;
            background-color: #fffaf0;
        }
    }

    /* Fade in animation */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

   

@media (max-height: 950px) {
   .brand-card img {
      width: 50%;
    }
    .brand-text {
      width: 45%;
      margin: auto;
      padding: 1rem;
    }

    .brand-text h3 {
      font-size: 1.5rem;
    }
    #me-content {
      margin-top: 5rem;
    }
    .history {
      font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
  #mainPageContent {
      display: none;
  }

    #mobileNotice {
        display: flex;
    }
}