/* RESET & BASE */
* {
  margin: 0 10px;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'axalp-grotesk';
  src: url('../fonts/axalp-grotesk.otf') format('opentype');
}

:root {
  --text-color: #f0f0f0;
  --bg-color: #0a0a0a;
  --border-color: #a0a0a0;
  --dark-accent-color: cyan;
  --light-accent-color: rgba(6, 77, 65, 0.973);
  --dark-button-color: #525252;
}
  html,
  body,
  #Page,
  .page.projects,
  .projects-container-wrapper {
    height: 100vh;
  }


body {
  font-family: 'Exo 2', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* BORDERED CONTAINER FOR MAIN CONTENT */
.container {
  position: fixed;
  width: 96%;
  height: 93%;
  margin: 35px 15px;
  padding: 0%;
  align-items: center;
  vertical-align: middle;
  z-index: 9995;
  border: 0.25px solid var(--border-color);
}

body.dark {
  --text-color: #dfdfdf;
  --bg-color: #0a0a0a;
  --border-color: #dfdfdf96;
  --button-color: var(--text-color);
}

body.dark.accent-on {
  --text-color: var(--dark-accent-color);
  --border-color: var(--dark-accent-color);
  --button-color: var(--dark-accent-color);
}

body.light {
  --text-color: black;
  --bg-color: #f7f6f0;
  --border-color: black;
  --button-color: var(--text-color);
}

body.light.accent-on {
  --text-color: var(--light-accent-color);
  --border-color: var(--light-accent-color);
  --button-color: var(--light-accent-color);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.sidebar,
.content,
.project-title,
.project-info,
.bio-text,
.siteHeader_title,
.siteHeader_label,
.siteHeader_nav a {
  color: var(--text-color);
}

.siteHeader_nav li a:hover,
.project-title:hover {
  color: #888888;
  /* or use a variable if you want */
}

.siteHeader_nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.siteHeader_nav li {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 10px;
  position: relative;
  display: flex;
  align-items: center;
  height: 1.5rem;
}

.siteHeader_nav li a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  transition: opacity 0.2s ease;
  line-height: 1;
  padding-left: 1px;
}

/* Hide text and show circle */
.siteHeader_nav li.is-selected a {
  font-size: 0;
  line-height: 0;
  position: relative;
  padding-left: 0;
}

/* Circle Dot */
.siteHeader_nav li.is-selected a::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

/* Reset non-selected items */
.siteHeader_nav li:not(.is-selected) a {
  font-size: inherit;
  line-height: 1.4;
}

#Page {
  height: 100vh;
  /* Viewport height */
}


/* LOADING SCREEN BASE */
.loading-screen {
  position: fixed;
  margin: 0;
  padding: 0;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  touch-action: none;
  user-select: none;
  pointer-events: all;
  cursor: wait;
}

/* TEXT WRAPPER */
.loading-text {
  display: flex;
  align-items: center;
  max-width: 95%;
  margin: 0;
  padding: 0;
  letter-spacing: 0;
  font-size: 0;
}

/* TEXT STYLES */
.loading-text .load1 {
  font-size: 4rem;
  text-align: center;
  font-family: 'Jura', sans-serif;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-color);
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
}

.loading-text .load2 {
  font-size: 4rem;
  text-align: center;
  font-family: 'Jura', sans-serif;
  font-weight: 100;
  color: transparent;
  background: var(--text-color);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 2px;
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: 0.05s;
}

/* PROGRESS BAR */
.loading-progress-bar {
  width: 800px;
  height: 4px;
  background-color: var(--text-color);
  margin-top: 15px;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards, growBar 1.2s ease-out forwards;
  animation-delay: 0.1s, 0.1s;
}

/* FADE + GROW ANIMATIONS */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes growBar {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

.loading-screen.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {

  .loading-text span {
    padding: 0;
    margin: 0;
    max-width: 97%;
  }

  .loading-text {
    gap: 10px;
    display: contents;
  }

  .loading-text .load1 {
    font-size: 1.65rem;
    font-weight: 800;
    font-family: 'Jura', sans-serif;
    letter-spacing: 0px;
    text-align: center;
  }

  .loading-text .load2 {
    font-size: 1.65rem;
    font-weight: 100;
    font-family: 'Jura', sans-serif;
    letter-spacing: 0px;
    text-align: center;
  }

  .loading-progress-bar {
    width: 80%;
    height: 3px;
  }
}

/* THREE.JS BACKGROUND */
#bgCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* SIDEBAR + CONTENT WRAPPER */
.content-wrapper {
  position: relative;
  z-index: 10;
  /* above the canvas */
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: flex;
}

/* Sidebar (Left) */
.sidebar {
  max-width: 560px;
  padding: 0;
  margin: 0;
  background: transparent;
  /* container border is still visible */
}

.siteHeader_title {
  font-size: 4.25rem;
  font-weight: 100;
  font-family: 'axalp-grotesk', 'Jura', sans-serif;
  margin-left: 15px;
  margin-top: 3%;
  margin-bottom: 0;
}

.siteHeader_label {
  font-size: 1rem;
  font-weight: 500;
  font-family: 'axalp-grotesk', 'Exo 2', sans-serif;
  opacity: 0.95;
  margin-top: 0;
  margin-bottom: 10%;
  padding-top: 0;
  padding: 10px;
}

/* Main Content (Right) */
.content {
  flex: 1;
  position: relative;
  height: 100%;
  overflow: hidden;
  display: block;
}

.bio-text {
  position: fixed;
  font-size: 1.25rem;
  bottom: 6%;
  right: 4%;
  max-width: 380px;
  text-align: start;
  line-height: 1.4;
  padding: 0;
  margin: 0;
}

/* THEME SWITCH (Outside the border, rotated) */
.theme-switch-wrapper {
  position: fixed;
  left: 0.7%;
  top: 82%;
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left center;
  z-index: 9995;
  font-family: 'Jura', sans-serif;
}

.theme-switch {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.theme-switch button {
  all: unset;
  cursor: pointer;
  position: relative;
  font-size: 0.875rem;
  padding-left: 20px;
  color: var(--button-color);
  text-transform: uppercase;
  font-family: inherit;
  display: flex;
  align-items: center;
  height: 18px;
}

.theme-switch button::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 1.5px solid currentColor;
  background-color: transparent;
  flex-shrink: 0;
}

.theme-switch button.is-selected::before {
  background-color: currentColor;
}

/* FOOTER (Outside the border, bottom-left) */
.outer-footer {
  position: fixed;
  left: 1.84%;
  opacity: 0.45;
  bottom: 1%;
  font-size: 0.67rem;
  font-family: 'Exo 2', sans-serif;
  color: var(--text-color);
  font-weight: bolder;
  margin: 0;
  padding: 0;
  z-index: 9999;
}

/* ---------- Projects Section Styles ---------- */

/* Projects Section Container */

.page {
  opacity: 1;
  transition: none !important;
  /* avoid conflicting browser transitions */
}

.page.projects {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  touch-action: pan-y;
}


.projects-container-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  height: 100%;
  overflow: visible;
}

.projects-container {
  height: 100%;
  width: 100vw;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  position: relative;
  will-change: transform;
  contain: content;
  overscroll-behavior: none;
  scroll-behavior: auto;
  touch-action: pan-y;  /* improves mobile swiping */
  pointer-events: all;
  -webkit-overflow-scrolling: touch;  /* iOS momentum scroll */
  padding-bottom: 150px;
  padding-top: 60px;
  text-align: end;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Chrome, Safari, Opera */
.projects-container::-webkit-scrollbar {
  display: none;
}

/* Individual Project Item */
.project-item {
  opacity: 1;
  transform: translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Project Title (Link) */
.project-title {
  font-family: 'axalp-grotesk', 'Jura', sans-serif;
  font-size: 3.3rem;
  font-weight: 100;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
  margin-bottom: 0;
}

.project-title:hover {
  color: #888888;
  /* Gray on hover */
}

/* Project Info (Not a link) */
.project-info {
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* RESPONSIVE (MOBILE) */
@media (max-width: 768px) {

  html,
  body {
    height: 94%;
    width: 94%;
  }

  .container {
    position: fixed;
    width: 90%;
    height: 95%;
    margin-left: auto;
    margin-right: 2%;
    margin-top: 4%;
    margin-bottom: auto;
  }

  .content-wrapper {
    flex-direction: column;
    margin: 0;
    padding: 0;
  }

  .sidebar {
    width: 100%;
    margin: 0;
    padding: 0;
    margin-bottom: 30px;
  }

  .siteHeader_title {
    font-size: 1.65rem;
    margin-left: -1.6%;
    margin-top: 4.5%;
    padding: 0;
  }

  .siteHeader_label {
    font-size: 0.68rem;
    font-weight: 100;
    margin-left: -4.5%;
    padding-top: 0;
  }

  .bio-text {
    font-size: 0.85rem;
    width: 165px;
    bottom: 6%;
    right: 5%;
    max-width: 90%;
  }

  .outer-footer {
    font-size: 0.45rem;
    left: 9.45%;
    margin: 0;
  }

  .theme-switch,
  .theme-switch-wrapper,
  .theme-switch button {
    font-size: 0.7rem;
    top: 77%;
    left: 0.4%;
  }

  .theme-switch button::before {
    width: 8px;
    height: 8px;
  }

  .siteHeader_nav ul {
    margin-left: -5%;
    padding-left: 0;
  }

  .siteHeader_nav li {
    font-size: 0.75rem;
    height: 0.95rem;
    font-weight: bold;
    margin-left: 0;
    padding-left: 0;
  }

  .siteHeader_nav li.is-selected a::before {
    height: 6px;
    width: 6px;
  }

  .siteHeader_nav li a {
    line-height: 0;
  }

  .projects-container {
    max-width: 100vw;
    margin: 0;
    padding-bottom: 200px;
    padding-top: 0;
    padding-right: 0;
  }

  .projects-container-wrapper {
    margin-right: 0;
    margin-top: 10%;
    padding-right: 0;
  }

  .projects-container::before,
  .projects-container::after {
    height: 2%;
  }

  .project-title {
    font-size: 1.35rem;
    padding: 0;
    margin: 0;
  }

  .project-info {
    font-size: 0.55rem;
    margin-right: 0;
  }
}

/* ---------- Info Section ---------- */

.page.info {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  width: 100%;
}

.info-links {
  display: flex;
  flex-direction: column;

  gap: 5px;
  font-family: 'Jura', sans-serif;
}

.info-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.info-links a:hover {
  opacity: 0.6;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .info-links a {
    font-size: 0.9rem;
    gap: 3px;
  }

  .info-links {
    gap: 3px;
    padding: 0;
  }
}
