/* Main CSS - Loaded asynchronously for non-critical styles */

/* Simple Grid Navigation */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: 400px;
}

@media (min-width: 768px) {
  main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    min-height: 100vh;
  }
}

.project-grid {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 200px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  border-radius: 0 !important;
  border: none;
}

.project-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-number {
  font-size: 0.75rem;
  font-weight: 300;
  opacity: 0.8;
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
}

/* Project-specific colors */
.project-card.project-014 {
  background-color: #E7EAEE;
  color: #000;
}

.project-card.about-us {
  background-color: #FF680A;
  color: #fff;
}

.project-card.blog {
  background-color: #5C5C5C;
  color: #fff;
}

/* Project page styles */
body.project-page {
  overflow-y: auto !important;
  height: auto !important;
  position: static !important;
  width: 100%;
}

.page-wrapper {
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-y: auto;
}

.content-container {
  position: relative;
  z-index: 10;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
  min-height: 100vh;
}

.back-link {
  display: inline-block;
  text-transform: lowercase;
  font-size: 0.875rem;
  font-weight: 300;
  margin-bottom: 2rem;
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 0.8;
}

.back-link:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.back-link:hover:after {
  transform: scaleX(1);
}

/* Two-column layout */
.two-column-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar h1 {
  font-size: 2rem;
  font-weight: 300;
  margin-top: 0;
  margin-bottom: 1rem;
}

.sidebar-text {
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.8;
  font-weight: 300;
  max-width: 40ch;
  margin-top: 1rem;
  position: relative;
}

.main-content h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.project-intro {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 60ch;
  opacity: 0.9;
  font-style: italic;
}

.project-description p {
  margin-bottom: 1.5rem;
  font-weight: 300;
  line-height: 1.6;
  max-width: 60ch;
}

/* Media queries for responsive layout */
@media (min-width: 768px) {
  .content-container {
    padding: 3rem;
  }
  
  .two-column-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 3rem;
  }
  
  .main-content {
    flex: 1;
    padding-left: 4rem;
  }
  
  .sidebar h1 {
    font-size: 2.5rem;
  }
  
  .main-content h2 {
    font-size: 2.5rem;
  }
  
  .project-intro {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
  }
}

/* Responsive header adjustments */
@media (min-width: 1200px) {
  header {
    padding: 3rem 1rem 2rem 1rem;
  }
  
  header p {
    font-size: 1rem;
  }
}

/* Desktop-only telemetry */
.desktop-only {
  display: none !important;
}

.telemetry {
  display: none !important;
}

@media (min-width: 1024px) {
  .desktop-only {
    display: block !important;
  }
  
  .telemetry {
    display: flex !important;
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    flex-direction: column;
    gap: 0.25rem;
    font-family: 'DM Sans', serif, 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif, system-ui;
    font-size: 0.875rem;
    font-weight: 300;
    opacity: 0.8;
    line-height: 1.5;
    z-index: 10;
  }

  .metric {
    display: flex;
    gap: 0.5rem;
    text-align: right;
  }

  .metric-label {
    color: inherit;
    opacity: 1;
  }

  .metric-value {
    font-weight: 300;
    min-width: 3rem;
    text-align: right;
  }
}

/* Page-specific background colors */
body.project-014 {
  background-color: #E7EAEE !important;
  color: #000 !important;
}

body.about-us {
  background-color: #FF680A !important;
  color: #fff !important;
}

body.blog {
  background-color: #5C5C5C !important;
  color: #fff !important;
}

/* Responsive SVG styling */
.project-description img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
}

.project-description svg {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 2rem auto;
}

/* Mobile-specific adjustments for images and SVGs */
@media (max-width: 768px) {
  .project-description img,
  .project-description svg {
    margin: 1.5rem auto;
    max-width: calc(100vw - 4rem) !important;
    width: calc(100vw - 4rem) !important;
  }
  
  .content-container {
    padding: 1.5rem;
  }
}
