/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh; /* Restored min-height */
  overflow-x: hidden;
  position: relative;
  background-color: #87ceeb; /* Light sky blue fallback */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page layout structure */
.page-content {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 60px); /* Changed to min-height */
  margin-top: 60px; /* Push content below navbar */
  z-index: 10;
}

/* WebGL side - now full width */
.landscape-side {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Full width */
  height: 100%;
  z-index: 5;
}

/* Content side - now an overlay */
.content-side {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%; /* Overlay width - adjust as needed */
  /* height: 100%; */
  /* Remove overflow-y: auto from here */
  z-index: 15; /* Above landscape side */
}

/* WebGL Canvas container - ensure proper sizing and appearance */
#background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* Full viewport width */
  height: 100vh; /* Full viewport height */
  z-index: 1;
  overflow: hidden;
}

#webgl-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
}

/* SVG element itself */
.landscape-svg {
  width: 100%;
  height: 100%;
  display: block;
  /* Ensure the SVG renders properly without 3D distortion */
  transform-style: flat;
  backface-visibility: visible;
}

/* SVG container styles */
.landscape-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* Remove perspective that was causing the trapezoid effect */
  perspective: none;
}

/* Content wrapper - adjust styling for overlay */
#content-wrapper {
  position: relative;
  width: 100%;
  /* min-height: 100%; / */
  padding: 20px;
  overflow-y: auto; /* Only set overflow-y here */
  background-color: transparent; /* Remove background since parent has it */
  box-shadow: none; /* Remove shadow since parent has it */
  border-radius: 0;
}

/* Navigation - now positioned at the top of the whole page */
.main-nav {
  background-color: rgba(40, 44, 52, 0.8); /* Higher opacity for better visibility */
  backdrop-filter: blur(10px);
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  width: 100%;
  position: fixed; /* Changed from sticky to fixed */
  top: 0;
  left: 0;
  z-index: 1000; /* Very high z-index to ensure it's above everything */
  height: 60px; /* Fixed height for nav */
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  list-style-type: none;
  justify-content: center;
  gap: 30px;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin-right: 20px;
}

.main-nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  padding: 8px 20px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.main-nav a:hover {
  background-color: #3498db;
  color: white;
}

/* Try 3D View button in nav */
.main-nav .try-3d-link {
    background-color: rgba(52, 152, 219, 0.3);
}

.main-nav .try-3d-link:hover {
    background-color: rgba(52, 152, 219, 0.7);
}

/* Main content area - keep on right side */
#main-content {
  padding: 2rem;
  width: 100%;
  position: relative;
  background-color: transparent; /* Ensure no background */
}

/* Resume content - keep transparent panel styling */
#resume-content {
  background-color: rgba(255, 255, 255, 0.7); /* More transparent */
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  margin: 20px 0;
  max-width: 100%; /* Use full width of the parent #main-content */
  border: 1px solid rgba(255, 255, 255, 0.2); /* Lighter border */
  position: relative;
}

/* Content panels styling for about and projects pages */
.content-panel {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.content-panel h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    font-size: 2.3rem;
}

.content-panel h2 {
    color: #2980b9;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
    padding-left: 10px;
}

.content-panel p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

.content-panel ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.content-panel ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}


/* Animation for projects coming soon panel */
.coming-soon {
    position: relative;
    font-size: 1.2em;
    font-weight: 500;
    color: #2c3e50;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    background-color: rgba(52, 152, 219, 0.1);
    border: 2px dashed rgba(52, 152, 219, 0.3);
    margin: 30px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Typography */
h1, h2, h3 {
  margin-bottom: 20px;
  color: #2c3e50;
}

#resume-content h1 {
  color: #2c3e50;
  margin-bottom: 10px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
  font-size: 2.3rem;
}

#resume-content h2 {
  color: #2980b9;
  font-size: 1.8rem;
  margin-top: 30px;
  margin-bottom: 15px;
  border-left: 4px solid #3498db;
  padding-left: 10px;
}

p {
  margin-bottom: 15px;
}

/* Other job, section, and list styling */
.section {
  margin-bottom: 2rem;
}

.contact-info {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 20px;
}

.job-title {
  font-weight: bold;
}

.job-dates {
  font-style: italic;
  color: #555;
}

.job {
  margin-bottom: 25px;
  padding-left: 15px;
  border-left: 3px solid #f0f0f0;
  transition: border-color 0.3s ease;
}

.job:hover {
  border-left-color: #3498db;
}

.job h3 {
  color: #34495e;
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.job-details ul {
  margin-left: 20px;
  margin-top: 10px;
  list-style-type: disc;
}

.job-details li {
  margin-bottom: 8px;
}

.patent-details {
  font-style: italic;
  color: #555;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.5);
}

/* Animation styles */
@keyframes cloudFloat {
  from { transform: translateX(0); }
  to { transform: translateX(30px); }
}

@keyframes waterShimmer {
  0% { opacity: 0.75; }
  50% { opacity: 0.9; }
  100% { opacity: 0.75; }
}

/* Animation for trees to create subtle movement */
@keyframes treeShift {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* Low-poly specific transitions for interactive elements */
.tree {
  transition: transform 0.3s ease, fill 0.3s ease;
}

.tree:hover {
  transform: translateY(-5px);
  fill: #4CAF50;
}

/* Enhanced interactive styles for SVG elements */
.tree {
  transition: transform 0.3s ease, fill 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.tree:hover {
  transform: translateY(-5px) scale(1.05);
  filter: brightness(1.1);
}

/* Make houses interactive */
.houses rect {
  transition: transform 0.2s ease, fill 0.3s ease;
  cursor: pointer;
}

.houses rect:hover {
  fill: #EFEBE9;
}

/* Cloud animation with random durations */
.cloud:nth-child(1) {
  animation: cloudFloat 67s linear infinite alternate;
}

.cloud:nth-child(2) {
  animation: cloudFloat 53s linear infinite alternate-reverse;
}

.cloud:nth-child(3) {
  animation: cloudFloat 79s linear infinite alternate;
}

/* Lake animation for low-poly style */
.lake {
  animation: waterShimmer 8s ease-in-out infinite;
}

/* River segments animation */
.river {
  animation: waterShimmer 6s ease-in-out infinite alternate;
}

/* Enhanced animation styles for depth layers */
@keyframes cloudFloat {
  from { transform: translateX(0); }
  to { transform: translateX(30px); }
}

@keyframes waterShimmer {
  0% { opacity: 0.75; }
  50% { opacity: 0.9; }
  100% { opacity: 0.75; }
}

@keyframes treeShift {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* Layer-specific transitions for better depth */
.far-mountains, .mid-mountains, .mountains-front {
  transition: transform 0.8s ease-out;
}

.cloud {
  transition: transform 1.5s ease-out;
}

.valley-settlements .village, .valley-settlements .cabin {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.valley-settlements .village:hover, .valley-settlements .cabin:hover {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.1);
}

.waterfall-left polygon, .waterfall-right polygon {
  transition: opacity 0.5s ease;
}

/* Lake and river styles */
.lake, .river-left, .river-right, .mountain-lake {
  transition: transform 2s ease-in-out, opacity 2s ease;
}

/* Special class when landscape is hidden */
.landscape-hidden .content-side {
  width: 100%;
  left: 0;
  right: 0;
}

.landscape-hidden .landscape-side {
  display: none;
  pointer-events: none;
}

/* Responsive styles */
/* @media (max-width: 1200px) {
  #main-content {
    max-width: 55%;
  }
} */

/* Tablet-specific styles - improved layout */
@media (min-width: 769px) and (max-width: 992px) {
  .content-side {
    width: 90%; /* Wider content area for tablets (was 80%) */
    right: 0;
  }
  
  #content-wrapper {
    padding: 15px; /* Adjusted padding for tablets */
  }
  
  .content-panel {
    margin: 15px auto; /* Better centered margins */
    max-width: 95%; /* Use more available space */
  }
  
  /* Better tablet landscape handling */
  .landscape-side {
    height: 60vh; /* Taller in tablet view */
  }
  
  /* Improve resume container on tablets */
  .resume-container {
    max-width: 100%; /* Use full width of content area */
    margin: 10px auto;
  }
  
  /* Adjust navigation for tablets */
  .main-nav ul {
    gap: 15px; /* Adjusted spacing */
  }

  /* Ensure proper column layout in tablet */
  .job-details ul {
    columns: 1; /* Force single column on tablets */
  }
}

@media (max-width: 992px) {
  body {
    flex-direction: column; /* Stack on smaller screens */
  }
  
  .page-content {
    flex-direction: column; /* Stack on smaller screens */
    height: auto; /* Allow content to determine height */
    min-height: calc(100vh - 60px); /* Ensure minimum height */
  }
  
  .landscape-side {
    width: 100%;
    height: 22vh; /* Half height on mobile */
  }

  /* Mobile-specific adjustments for content wrapper */
  #content-wrapper {
    position: relative;
    height: auto; /* Allow content to determine height */
    /* min-height: 50vh;  */
  }
  
  /* Mobile-specific adjustments for content-side */
  .content-side {
    position: relative; /* Change to relative for better mobile scroll */
    width: 100%;
    height: auto;
  }
  
  #main-content {
    max-width: 100%;
    margin: 0 auto;
  }
  
  #resume-content {
    padding: 25px;
  }
  
  .content-area {
    padding: 10px;
  }
  
  #main-content {
    padding: 1.5rem;
  }

  .content-side {
    width: 70%; /* Wider on smaller screens */
  }
}

@media (max-width: 768px) {
  #content-wrapper {
    align-items: center;
  }
  
  #main-content {
    margin-right: auto;
    margin-left: auto;
  }
  
  .content-peek-trigger {
    display: block; /* Show on mobile */
  }
  
  #resume-content h1 {
    font-size: 1.8rem;
  }
  
  #resume-content h2 {
    font-size: 1.5rem;
  }
  
  .main-nav ul {
    gap: 10px;
  }
  
  .main-nav a {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  
  .content-area {
    padding: 5px;
  }
  
  #main-content {
    padding: 1rem;
  }

  .content-side {
    width: 90%; /* Almost full width on mobile */
    right: 5%; /* Center it */
    left: 5%;
    height: auto;
    max-height: 80%;
    top: 10%;
  }

  .content-panel {
    padding: 20px;
    margin: 10px;
  }
  
  .content-panel h1 {
    font-size: 1.8rem;
  }
  
  .content-panel h2 {
    font-size: 1.3rem;
  }
}

/* Add a content peek trigger area for mobile */
.content-peek-trigger {
  position: absolute;
  top: 50%;
  left: -20px;
  transform: translateY(-50%);
  width: 20px;
  height: 60px;
  background: rgba(52, 152, 219, 0.7);
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  display: none; /* Hidden by default, shown on mobile */
}

/* Special animation classes for SVG elements */
.svg-animate-on-scroll {
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Special class when landscape is hidden */
.landscape-hidden .content-side {
    width: 100%;
		left: 0;
}

/* Main content structure */
.content-area {
  width: 100%;
  max-width: 1200px; /* Limit width on larger screens */
  margin: 0 auto;
  padding: 20px;
  z-index: 20;
}

/* Landscape loader - now a centered overlay */
.landscape-loader {
  position: fixed;
  top: 60px; /* Below navbar */
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background-color: rgba(18, 18, 18, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 900; /* Above content but below nav */
  transition: all 0.6s ease-out;
  color: white;
  pointer-events: auto;
}

/* Resume container styling */
.resume-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* Make sure content-wrapper doesn't block clicks when resume is minimized */
/* .landscape-side.has-minimized-resume ~ .content-side #content-wrapper {
  pointer-events: none; 
}

.landscape-side.has-minimized-resume ~ .content-side .resume-container,
.landscape-side.has-minimized-resume ~ .content-side .resume-header,
.landscape-side.has-minimized-resume ~ .content-side .resume-toggle {
  pointer-events: auto; 
} */
