body, html {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  user-select: none;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: #2d3436;
  font-family: 'PabloGrotesk', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #121212;
  color: #e6e6e6;
}

/* Dark mode toggle */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 24px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark-mode .theme-toggle {
  background: rgba(30, 30, 60, 0.7);
}

/* Window System */
.window {
  position: absolute;
  min-width: 300px;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    8px 8px 16px rgba(174, 174, 192, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.7);
  resize: both;
  z-index: 10;
}

body.dark-mode .window {
  background: rgba(30, 30, 60, 0.7);
  box-shadow: 
    8px 8px 16px rgba(0, 0, 0, 0.3),
    -8px -8px 16px rgba(50, 50, 80, 0.2);
}

.window.active {
  z-index: 100;
  box-shadow: 
    12px 12px 24px rgba(174, 174, 192, 0.3),
    -12px -12px 24px rgba(255, 255, 255, 0.8);
}

body.dark-mode .window.active {
  box-shadow: 
    12px 12px 24px rgba(0, 0, 0, 0.4),
    -12px -12px 24px rgba(50, 50, 80, 0.3);
}

.window-header {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  cursor: move;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .window-header {
  background: rgba(40, 40, 70, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-title {
  flex-grow: 1;
  font-size: 14px;
  font-weight: 500;
  font-family: 'PabloGrotesk', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-controls {
  display: flex;
  gap: 8px;
  font-size: 16px;
}

.window-control {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.window-control:hover {
  opacity: 1;
}

.window-content {
  padding: 16px;
  height: calc(100% - 60px);
  overflow: auto;
  font-family: 'PabloGrotesk', sans-serif;
}

/* Resize handle styling */
.window .resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
  background: transparent;
}

/* Fullscreen window */
.window.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0;
  z-index: 1000;
}

/* Window stacking effect */
.window:not(.active) {
  opacity: 0.9;
}

a {
  color: #009ac7;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

body.dark-mode a {
  color: #43c9ff;
}

.no-scroll {
  overflow: hidden;
}

main
{
  
  position: absolute;
  bottom: -0;
  z-index: -1000;
  overflow-y: hidden;

  
}.hide-header {
  display: none;
}

#defaultCanvas0
{
  overflow-y: hidden;}
.no-overflow
{
  overflow: hidden;
}
a:hover {
  color: #007ba1;
}

a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #009ac7;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@font-face {
  font-family: 'PabloGrotesk';
  src: url('fonts/PabloGrotesk_13MARVF.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
h2 {
  /* margin: 0; */
  /* margin-right: auto; */
  padding: 0;
  color: #eeeeee;
  margin-left: 5px;
  font-family: 'PabloGrotesk', sans-serif;
}
#media-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1800px;
  margin: 0 auto;
  overflow-y: hidden;
  position: relative;
}

@media (min-width: 1200px) {
  #media-container {
    grid-template-columns: repeat(6, 1fr);
  }
}

#media-container img,
#media-container video {
  width: 100%;
  aspect-ratio: 9/16;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  margin: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    8px 8px 16px rgba(174, 174, 192, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#media-container img:hover,
#media-container video:hover {
  transform: translateY(-5px);
  box-shadow: 
    12px 12px 20px rgba(174, 174, 192, 0.4),
    -12px -12px 20px rgba(255, 255, 255, 0.8);
}

body.dark-mode #media-container img,
body.dark-mode #media-container video {
  background: rgba(30, 30, 60, 0.7);
  box-shadow: 
    8px 8px 16px rgba(0, 0, 0, 0.3),
    -8px -8px 16px rgba(50, 50, 80, 0.2);
}

.empty-space {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 60px;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    8px 8px 16px rgba(174, 174, 192, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.empty-space:hover {
  transform: translateY(-5px);
  box-shadow: 
    12px 12px 20px rgba(174, 174, 192, 0.4),
    -12px -12px 20px rgba(255, 255, 255, 0.8);
}

body.dark-mode .empty-space {
  background: rgba(30, 30, 60, 0.7);
  box-shadow: 
    8px 8px 16px rgba(0, 0, 0, 0.3),
    -8px -8px 16px rgba(50, 50, 80, 0.2);
}

#media-container.fullscreen-mode img:not(.fullscreen),
#media-container.fullscreen-mode video:not(.fullscreen) {
  display: none;
}

#media-container.fullscreen-mode {
  position: relative;
}

#media-container.fullscreen-mode .fullscreen {
  width: auto;
  height: 100vh;
  max-height: 100%;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  object-fit: contain;
  z-index: 9999;
}
.parallax {
  perspective: 1px;
  transform-style: preserve-3d;
}

@media (max-width: 768px) {
#media-container.fullscreen-mode .fullscreen {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  margin: 0;
  object-fit: cover;
  z-index: 9999;
}}
#additional-info {
  position: fixed;
  bottom: 0;
  right: 0;
  max-width: 80%;
  max-height: 80%;
  display: none; /* Hide by default */
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 99999;
  flex-direction: row;
  flex-wrap: nowrap;
  margin: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 
    8px 8px 16px rgba(174, 174, 192, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.7);
}

#additional-info.visible {
  display: flex;
}

.info-content {
  color:white;
  display: flex;
  flex-direction: row;
 
  margin-right: 10px;
  margin-bottom: 10px;
}

.info-content h2 {
  font-size: 32px;
  margin: 0;
  margin-right: 10px;
}
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #009ac7  ;
  opacity: 0;
  visibility: hidden;
  z-index: 5; /* Added */
}
#overlay.active {
  opacity: 1;
  visibility: visible;
}

.info-content p {
  font-size: 32px;
  font-weight: inherit;
  font-family: sans-serif;
  margin: 0;
    margin-right: 10px;
}
header {
  position: fixed;
  top: 0;
  height: auto;
  width: 100%;
  font-size: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1rem;
  font-family: 'Inter', sans-serif;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

header nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav ul li {
  margin-left: 20px;
  margin-right: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

header nav ul li:not(:hover) {
  font-weight: normal;
}

header nav ul li:first-child {
  margin-left: auto;
}

header nav ul li a {
  color: #2d3436;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

header nav ul li a:hover {
  color: #009ac7;
  background: rgba(0, 154, 199, 0.1);
}

@media (min-width: 768px) {
  header {
    font-size: 25px;
    
  }

  header nav ul li {
    margin-left: 20px;
    margin-right: 10px;
  }
  
  .desktop {
    display: inline-block;
  }
  
  .mobile {
    font-size: 30px;
    display: none;
  }
}

@media (max-width: 767px) {
  .desktop {
    display: none;
  }
  
  .mobile {
    display: inline-block;
  }
}

 h1 {
  margin: 0;
  margin-right: auto;
  font-size: 25px;
  padding: 0;
  margin-left: 5px;
    font-family: 'PabloGrotesk', sans-serif;
user-select: none;
    color: #009ac7;
  }
  
    .keyword {
  color: #009ac7;
  font-weight: 500;
  padding: 0.2em 0.4em;
  border-radius: 8px;
  background: rgba(0, 154, 199, 0.1);
  transition: all 0.3s ease;
}

.keyword:hover {
  background: rgba(0, 154, 199, 0.2);
  transform: translateY(-2px);
}
 #fullscreenbg
 {
  width: 100%;
  height: 100%;
  z-index: -100;
  position: fixed;
  left: 0;
  top: 0;
 }
@media (min-width: 768px) {  h1:hover {
    font-size: 50px;
    color: #009ac7;
    margin-top:30px;
    font-family: 'PabloGrotesk', sans-serif;
  }}


@media (max-width: 768px) {
  .info-content
  {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    margin-left: 10px;}
  #additional-info {
  font-size: 12px;
  
  display:none;
  justify-content: flex-start;
  }

  .info-content p {
    font-size: 25px;
  
    margin: 0;
      margin-bottom: 10px;
  }}

@media (min-width: 768px) {
.page-content {
  margin-left: 5px;
  margin-top: 50px;
  font-size: 25px !important;
  font-family: 'PabloGrotesk', sans-serif;
  max-width: 65%;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 
    8px 8px 16px rgba(174, 174, 192, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.7);
}
}
.page-content {
  max-width: 70%;
  margin: 50px auto 0;
  font-size: 25px !important;
  font-family: 'PabloGrotesk', sans-serif;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 
    8px 8px 16px rgba(174, 174, 192, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.7);
}
.page-content h1 {
  margin-top: 0;
}


.page-content ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.page-content ul li {
  margin-bottom: 10px;
}

#defaultCanvas0 {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: -1;
}

/* Hide the old header/navigation */
header {
  display: none;
}

/* Adjust media container for window system */
#media-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

/* Reset page content for window system */
.page-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Window types - each content type can have specific styles */
.window.about,
.window.contact,
.window.cv {
  width: 500px;
  height: 400px;
}

.window.work {
  width: 800px;
  height: 600px;
}

.window.about .window-content,
.window.contact .window-content,
.window.cv .window-content,
.window.work .window-content {
  font-size: 16px;
  line-height: 1.5;
}

/* Fix the cursor for non-draggable areas */
.window-content {
  cursor: default;
}

/* Project Windows */
.window.project {
  width: 600px;
  height: auto;
  min-height: 600px;
  max-height: 90vh;
  box-shadow: 
    12px 12px 24px rgba(174, 174, 192, 0.3),
    -12px -12px 24px rgba(255, 255, 255, 0.8);
  z-index: 20;
}

.window.project.fullscreen {
  z-index: 1500 !important;
}

body.dark-mode .window.project {
  box-shadow: 
    12px 12px 24px rgba(0, 0, 0, 0.4),
    -12px -12px 24px rgba(50, 50, 80, 0.3);
}

.window.project .window-content {
  padding: 0;
  overflow: auto;
  height: calc(100% - 40px);
}

.project-window-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-window-content img,
.project-window-content video {
  width: 100%;
  height: auto;
  max-height: calc(90vh - 150px);
  object-fit: contain;
  display: block;
  background: rgb(20, 20, 20);
  flex-grow: 1;
}

.project-details {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: 'PabloGrotesk', sans-serif;
}

body.dark-mode .project-details {
  background: rgba(30, 30, 60, 0.8);
  color: #e6e6e6;
}

.project-details h3 {
  margin-top: 0;
  color: #009ac7;
}

body.dark-mode .project-details h3 {
  color: #43c9ff;
}

/* Project tag pills */
.tag-pill {
  display: inline-block;
  background: rgba(0, 154, 199, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #009ac7;
}

body.dark-mode .tag-pill {
  background: rgba(67, 201, 255, 0.1);
  color: #43c9ff;
}

/* Projects grid and cards in the Work window */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  width: 100%;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.15);
}

body.dark-mode .project-card {
  background: rgba(30, 30, 60, 0.7);
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card:hover {
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.4);
}

.project-card img,
.project-card video {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
}

.project-card div {
  padding: 0.75rem;
}

body.dark-mode .project-card div {
  color: #e6e6e6;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .window {
    width: 90vw !important;
    max-width: 90vw !important;
    height: 80vh !important;
    max-height: 80vh !important;
    top: 10vh !important;
    left: 5vw !important;
    position: fixed !important;
    z-index: 1000 !important;
  }
  
  /* Stack windows on mobile */
  .window.about { transform: translateY(-2vh); z-index: 101 !important; }
  .window.contact { transform: translateY(-4vh); z-index: 102 !important; }
  .window.work { transform: translateY(-6vh); z-index: 103 !important; }
  .window.cv { transform: translateY(-8vh); z-index: 104 !important; }
  
  .window.project {
    z-index: 500 !important;
  }
  
  .window.active {
    transform: translateY(0) !important;
    z-index: 1000 !important;
  }
  
  .window.fullscreen {
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 2000 !important;
  }
}